Skip to content

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Sep 28, 2025

AbiAlign is a thin wrapper around Align, extant mostly because we used to track a separate quasi-notion of alignment that was never a real notion of alignment and removing all of it at once was too churny. This PR maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields for TargetDataLayout is now in terms of Align only.

This PR is about the size limit I hit before it started to seem exhausting to continue working on or review, as changes elsewhere double the amount of "rest-of-compiler" code that gets touched.

This maintains AbiAlign usage in public API and most of the compiler,
but direct access of these fields is now in terms of Align only.
@rustbot
Copy link
Collaborator

rustbot commented Sep 28, 2025

Some changes occurred in cfg and check-cfg configuration

cc @Urgau

@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Sep 28, 2025
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 28, 2025

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
..........................................         (142/142)
.
======== tests/rustdoc-gui/duplicate-macro-reexport.goml ========

[ERROR] `tests/rustdoc-gui/duplicate-macro-reexport.goml` line 2: Error: Navigating frame was detached: for command `go-to: "file://" + |DOC_PATH| + "/test_docs/macro.a.html"`
`tests/rustdoc-gui/duplicate-macro-reexport.goml` duplicate-macro-reexport output:
Protocol error: Connection closed. Most likely the page has been closed.
stack: Error: Protocol error: Connection closed. Most likely the page has been closed.
    at assert (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:18:15)
    at CdpPage.close (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:814:36)
    at async runAllCommands (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:433:13)
    at async innerRunTestCode (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:696:21)
    at async innerRunTests (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:633:17)
    at async runTests (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:824:27)


======== tests/rustdoc-gui/duplicate-macro-reexport.goml ========

[ERROR] `tests/rustdoc-gui/duplicate-macro-reexport.goml` line 2: Error: Navigating frame was detached: for command `go-to: "file://" + |DOC_PATH| + "/test_docs/macro.a.html"`
`tests/rustdoc-gui/duplicate-macro-reexport.goml` duplicate-macro-reexport output:
Protocol error: Connection closed. Most likely the page has been closed.
stack: Error: Protocol error: Connection closed. Most likely the page has been closed.
    at assert (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:18:15)
    at CdpPage.close (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js:814:36)
    at async runAllCommands (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:433:13)
    at async innerRunTestCode (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:696:21)
    at async innerRunTests (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:633:17)
    at async runTests (/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/node_modules/browser-ui-test/src/index.js:824:27)


======== tests/rustdoc-gui/search-result-display.goml ========

[WARNING] `tests/rustdoc-gui/search-result-display.goml` line 39: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?

@workingjubilee
Copy link
Member Author

...I have no idea how this affected rustdoc.

@workingjubilee
Copy link
Member Author

It's protocol errors so likely a test suite error.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2025
@Zalathar
Copy link
Contributor

LGTM

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 29, 2025

📌 Commit b3f3e36 has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 29, 2025
Comment on lines +662 to +664
AbiAlign::new(if c == self.default_address_space {
self.default_address_space_pointer_spec.pointer_align
} else if let Some(e) = self.address_space_info.iter().find(|(a, _)| a == &c) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark: In general I'm not fond of putting a complex conditional in the constructor call; I would have written this as let align = ...; followed by a separate AbiAlign::new(align).

(But in the context of a big ongoing cleanup it's also not worth haggling over, so whatever.)

bors added a commit that referenced this pull request Sep 29, 2025
Rollup of 3 pull requests

Successful merges:

 - #147100 (tests: Remove ignore-android directive for fixed issue)
 - #147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - #147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c40c16 into rust-lang:master Sep 29, 2025
18 of 20 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 29, 2025
rust-timer added a commit that referenced this pull request Sep 29, 2025
Rollup merge of #147116 - workingjubilee:remove-tdl-abialign, r=Zalathar

compiler: remove AbiAlign inside TargetDataLayout

AbiAlign is a thin wrapper around Align, extant mostly because we used to track a separate quasi-notion of alignment that was never a real notion of alignment and removing all of it at once was too churny. This PR maintains AbiAlign usage in public API and most of the compiler, but direct access of these fields for TargetDataLayout is now in terms of Align only.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 30, 2025
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue)
 - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
@workingjubilee workingjubilee deleted the remove-tdl-abialign branch September 30, 2025 23:28
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Oct 1, 2025
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue)
 - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
antoyo pushed a commit to rust-lang/rustc_codegen_gcc that referenced this pull request Oct 1, 2025
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue)
 - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Oct 2, 2025
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#147100 (tests: Remove ignore-android directive for fixed issue)
 - rust-lang/rust#147116 (compiler: remove AbiAlign inside TargetDataLayout)
 - rust-lang/rust#147134 (remove explicit deref of AbiAlign for most methods)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants