Skip to content

Adjust 64-bit ARM data layouts for LLVM update #124813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2024

Conversation

maurer
Copy link
Contributor

@maurer maurer commented May 6, 2024

LLVM has updated data layouts to specify Fn32 on 64-bit ARM to avoid C++ accidentally underaligning functions when trying to comply with member function ABIs.

This should only affect Rust in cases where we had a similar bug (I don't believe we have one), but our data layout must match to generate code.

As a compatibility adaptatation, if LLVM is not version 19 yet, Fn32 gets voided from the data layout.

See llvm/llvm-project#90415

@rustbot label: +llvm-main
cc @krasimirgg
r? @durin42

LLVM has updated data layouts to specify `Fn32` on 64-bit ARM to avoid
C++ accidentally underaligning functions when trying to comply with
member function ABIs.

This should only affect Rust in cases where we had a similar bug (I
don't believe we have one), but our data layout must match to generate
code.

As a compatibility adaptatation, if LLVM is not version 19 yet, `Fn32`
gets voided from the data layout.

See llvm/llvm-project#90415
@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 May 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 6, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label May 6, 2024
@durin42
Copy link
Contributor

durin42 commented May 6, 2024

This looks basically fine to me, but I also only peripherally understand this so...

@rustbot r? compiler

@rustbot rustbot assigned cjgillot and unassigned durin42 May 6, 2024
@nikic
Copy link
Contributor

nikic commented May 7, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented May 7, 2024

📌 Commit 4d397d3 has been approved by nikic

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 May 7, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 7, 2024
Adjust 64-bit ARM data layouts for LLVM update

LLVM has updated data layouts to specify `Fn32` on 64-bit ARM to avoid C++ accidentally underaligning functions when trying to comply with member function ABIs.

This should only affect Rust in cases where we had a similar bug (I don't believe we have one), but our data layout must match to generate code.

As a compatibility adaptatation, if LLVM is not version 19 yet, `Fn32` gets voided from the data layout.

See llvm/llvm-project#90415

`@rustbot` label: +llvm-main
cc `@krasimirgg`
r? `@durin42`
@bors
Copy link
Collaborator

bors commented May 7, 2024

⌛ Testing commit 4d397d3 with merge db74fe1...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
error: test run failed!
status: exit status: 101
command: RUST_TEST_THREADS="8" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/no-std-3/a"
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/no-std-3/a", waiting for result
--- stderr -------------------------------
thread 'main' panicked at src/tools/remote-test-client/src/main.rs:310:9:
client.read_exact(&mut header) failed with Connection reset by peer (os error 104)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@bors
Copy link
Collaborator

bors commented May 7, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 7, 2024
@nikic
Copy link
Contributor

nikic commented May 7, 2024

@bors retry remote-test-client failure

@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 May 7, 2024
@bors
Copy link
Collaborator

bors commented May 7, 2024

⌛ Testing commit 4d397d3 with merge d71b3f4...

@bors
Copy link
Collaborator

bors commented May 7, 2024

☀️ Test successful - checks-actions
Approved by: nikic
Pushing d71b3f4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 7, 2024
@bors bors merged commit d71b3f4 into rust-lang:master May 7, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 7, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d71b3f4): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.2% [-1.2%, -1.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-4.1%, -3.7%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 673.849s -> 676.36s (0.37%)
Artifact size: 315.95 MiB -> 315.83 MiB (-0.04%)

b49020 added a commit to b49020/meta-rust that referenced this pull request Nov 12, 2024
Rust data layout for aarch64 updated in 1.80.0 release following LLVM
data layout update (see: rust-lang/rust#124813).

So conditionally update data layout for aarch64 target build as well.

Signed-off-by: Sumit Garg <[email protected]>
b49020 added a commit to b49020/meta-rust that referenced this pull request Nov 13, 2024
Rust data layout for aarch64 updated in 1.80.0 release following LLVM
data layout update (see: rust-lang/rust#124813).

So conditionally update data layout for aarch64 target build as well.

Signed-off-by: Sumit Garg <[email protected]>
be-neth pushed a commit to be-neth/meta-rust that referenced this pull request Dec 18, 2024
Rust data layout for aarch64 updated in 1.80.0 release following LLVM
data layout update (see: rust-lang/rust#124813).

So conditionally update data layout for aarch64 target build as well.

Signed-off-by: Sumit Garg <[email protected]>
Signed-off-by: Benoît Mauduit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) merged-by-bors This PR was explicitly merged by bors. 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.

8 participants