Skip to content
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

Update the minimum external LLVM to 19 #139275

Merged
merged 1 commit into from
Apr 6, 2025
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Apr 2, 2025

With this change, we'll have stable support for LLVM 19 and 20.
For reference, the previous increase to LLVM 18 was #130487.

cc @rust-lang/wg-llvm
r? nikic

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Apr 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2025

Some changes occurred in coverage tests.

cc @Zalathar

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

@rust-log-analyzer

This comment has been minimized.

@@ -270,20 +269,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
("aarch64", "fhm") => Some(LLVMFeature::new("fp16fml")),
("aarch64", "fp16") => Some(LLVMFeature::new("fullfp16")),
// Filter out features that are not supported by the current LLVM version
("aarch64", "fpmr") if get_version().0 != 18 => None,
("aarch64", "fpmr") => None, // only existed in 18
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to retain this feature?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure in which context it would have been specified and needed to be filtered out before. e.g. was that only from unstable #[target_feature] or -Ctarget-feature?

Copy link
Contributor

Choose a reason for hiding this comment

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

@mrkajetanp Do we need to keep this target feature around?

It looks like there is some runtime detection support for it: https://github.com/rust-lang/stdarch/blob/65712f37fb4d8f275e5eb7bd7b0057fdd68a91aa/crates/std_detect/src/detect/arch/aarch64.rs#L162-L164

I'm not super clear on how/why we're supporting target features that LLVM doesn't.

Copy link
Contributor

Choose a reason for hiding this comment

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

The relevant discussion was here: #128192
The approach we settled on was this:

We switch it on by default through target specs on LLVM 18, it's already switched on on LLVM 19+ and it doesn't exist on older LLVM versions. But we do keep the detection in std_detect.

So, if we no longer support LLVM 18 then it should not be necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

We'll need to remove it from stdarch first though, right? If so, then I suggest:

  1. Merge this PR with the => None filter.
  2. Remove "fpmr" from stdarch.
  3. Update stdarch and drop that line in a followup.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, it would be nice to add an appropriate FIXME comment to this PR that mentions the stdarch plan.

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be desirable to keep it in stdarch for runtime detection. You no longer need to enable it for LLVM to use it, but you may still want to check whether the machine your code runs on actually supports it.

@nikic
Copy link
Contributor

nikic commented Apr 4, 2025

Okay, I think we can figure out the details of the fpmr handling as a followup...

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 4, 2025

📌 Commit 9c26a09 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 Apr 4, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 4, 2025
Update the minimum external LLVM to 19

With this change, we'll have stable support for LLVM 19 and 20.
For reference, the previous increase to LLVM 18 was rust-lang#130487.

cc `@rust-lang/wg-llvm`
r? nikic
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#138546 (Add integer to string formatting tests)
 - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names)
 - rust-lang#139028 (Make target maintainers more easily pingable)
 - rust-lang#139274 (Rustdoc: typecheck settings.js)
 - rust-lang#139275 (Update the minimum external LLVM to 19)
 - rust-lang#139328 (Fix 2024 edition doctest panic output)

Failed merges:

 - rust-lang#138947 (Refactor Apple version handling in the compiler)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r- rollup=iffy
#139363 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 4, 2025
@cuviper
Copy link
Member Author

cuviper commented Apr 4, 2025

That just needed a line-number --bless, which I had missed because that test is only-aarch64.

@bors r=nikic

@bors
Copy link
Collaborator

bors commented Apr 4, 2025

📌 Commit 7777c01 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 4, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2025
Update the minimum external LLVM to 19

With this change, we'll have stable support for LLVM 19 and 20.
For reference, the previous increase to LLVM 18 was rust-lang#130487.

cc `@rust-lang/wg-llvm`
r? nikic
@bors
Copy link
Collaborator

bors commented Apr 5, 2025

⌛ Testing commit 7777c01 with merge c01cff3...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 5, 2025

💔 Test failed - checks-actions

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 5, 2025
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 5, 2025
@cuviper
Copy link
Member Author

cuviper commented Apr 5, 2025

@bors r=nikic

@bors
Copy link
Collaborator

bors commented Apr 5, 2025

📌 Commit 12167d7 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 Apr 5, 2025
@bors
Copy link
Collaborator

bors commented Apr 5, 2025

⌛ Testing commit 12167d7 with merge c211076...

@bors
Copy link
Collaborator

bors commented Apr 6, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 6, 2025
@bors bors merged commit c211076 into rust-lang:master Apr 6, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 6, 2025
Copy link

github-actions bot commented Apr 6, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 5e17a2a (parent) -> c211076 (this PR)

Test differences

Show 56 test diffs

Stage 1

  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BKEY: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BTI: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#LEAF: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#NONE: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#PACRET: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/call-metadata.rs: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [codegen] tests/codegen/unchecked_shifts.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen/unchecked_shifts.rs#LLVM18: ignore (ignored when the actual LLVM major version is 19, but the test only targets major version 18) -> [missing] (J0)
  • [codegen] tests/codegen/unchecked_shifts.rs#LLVM19PLUS: pass -> [missing] (J0)
  • [codegen] tests/codegen/vec_pop_push_noop.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen/vec_pop_push_noop.rs#llvm-19: pass -> [missing] (J0)
  • [codegen] tests/codegen/vec_pop_push_noop.rs#llvm-pre-19: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J0)
  • [ui] tests/ui/asm/aarch64/srcloc.rs: [missing] -> ignore (only executed when the architecture is aarch64) (J0)
  • [ui] tests/ui/asm/aarch64/srcloc.rs#new: ignore (only executed when the architecture is aarch64) -> [missing] (J0)
  • [ui] tests/ui/asm/aarch64/srcloc.rs#old: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)
  • [ui] tests/ui/asm/inline-syntax.rs#arm_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32e_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32em_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32emc_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)
  • [ui] tests/ui/asm/x86_64/srcloc.rs: [missing] -> pass (J0)
  • [ui] tests/ui/asm/x86_64/srcloc.rs#new: pass -> [missing] (J0)
  • [ui] tests/ui/asm/x86_64/srcloc.rs#old: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J0)

Stage 2

  • [ui] tests/ui/asm/aarch64/srcloc.rs: [missing] -> ignore (only executed when the architecture is aarch64) (J1)
  • [ui] tests/ui/asm/aarch64/srcloc.rs#new: ignore (only executed when the architecture is aarch64) -> [missing] (J1)
  • [codegen] tests/codegen/unchecked_shifts.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen/unchecked_shifts.rs#LLVM19PLUS: pass -> [missing] (J2)
  • [codegen] tests/codegen/vec_pop_push_noop.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen/vec_pop_push_noop.rs#llvm-19: pass -> [missing] (J2)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BKEY: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BTI: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#LEAF: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#NONE: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#PACRET: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/call-metadata.rs: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [codegen] tests/codegen/unchecked_shifts.rs#LLVM18: ignore (ignored when the actual LLVM major version is 19, but the test only targets major version 18) -> [missing] (J3)
  • [codegen] tests/codegen/vec_pop_push_noop.rs#llvm-pre-19: ignore (ignored when the LLVM version (19.1.1) is newer than majorversion 18) -> [missing] (J3)
  • [ui] tests/ui/asm/x86_64/srcloc.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J4)
  • [ui] tests/ui/asm/x86_64/srcloc.rs#new: ignore (only executed when the architecture is x86_64) -> [missing] (J4)
  • [ui] tests/ui/asm/aarch64/srcloc.rs#old: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J5)
  • [ui] tests/ui/asm/x86_64/srcloc.rs#old: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J5)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BKEY: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#BTI: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#LEAF: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#NONE: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/branch-protection-old-llvm.rs#PACRET: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/call-metadata.rs: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [codegen] tests/codegen/unchecked_shifts.rs#LLVM18: ignore (ignored when the actual LLVM major version is 20, but the test only targets major version 18) -> [missing] (J6)
  • [codegen] tests/codegen/vec_pop_push_noop.rs#llvm-pre-19: ignore (ignored when the LLVM version (20.1.2) is newer than majorversion 18) -> [missing] (J6)
  • [ui] tests/ui/asm/inline-syntax.rs#arm_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J7)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32e_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J7)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32em_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J7)
  • [ui] tests/ui/asm/riscv/riscv32e-registers.rs#riscv32emc_llvm_18: ignore (ignored when the LLVM version is between 19.0.0 and 99.0.0) -> [missing] (J7)
  • [ui] tests/ui/asm/aarch64/srcloc.rs: [missing] -> pass (J8)
  • [ui] tests/ui/asm/aarch64/srcloc.rs#new: pass -> [missing] (J8)
  • [ui] tests/ui/asm/x86_64/srcloc.rs: [missing] -> pass (J9)
  • [ui] tests/ui/asm/x86_64/srcloc.rs#new: pass -> [missing] (J9)

Job group index

  • J0: x86_64-gnu-llvm-19-3
  • J1: arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable
  • J2: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-1, x86_64-gnu, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J3: x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2
  • J4: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, x86_64-gnu-llvm-19-2
  • J5: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable
  • J6: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-1, x86_64-gnu, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J7: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J8: aarch64-apple, aarch64-gnu
  • J9: test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-nopt, x86_64-gnu-stable

Job duration changes

  1. dist-apple-various: 5677.3s -> 7648.0s (34.7%)
  2. x86_64-msvc-2: 6688.4s -> 7053.7s (5.5%)
  3. dist-aarch64-apple: 4316.5s -> 4506.1s (4.4%)
  4. x86_64-gnu-stable: 6475.5s -> 6751.8s (4.3%)
  5. dist-i686-linux: 5997.6s -> 6245.3s (4.1%)
  6. dist-x86_64-mingw: 7443.5s -> 7747.1s (4.1%)
  7. x86_64-gnu-llvm-19-3: 6841.7s -> 7113.6s (4.0%)
  8. dist-x86_64-msvc-alt: 7313.5s -> 7516.2s (2.8%)
  9. i686-gnu-nopt-2: 6453.7s -> 6626.4s (2.7%)
  10. x86_64-msvc-ext2: 5761.7s -> 5906.8s (2.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c211076): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 776.183s -> 775.586s (-0.08%)
Artifact size: 365.91 MiB -> 365.94 MiB (0.01%)

@cuviper cuviper added the relnotes Marks issues that should be documented in the release notes of the next release. label Apr 6, 2025
@cuviper cuviper deleted the min-llvm-19 branch April 6, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants