Skip to content

make abi_unsupported_vector_types a hard error #139309

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 2 commits into from
Apr 24, 2025

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Apr 3, 2025

Fixes #116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a crater run when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of #116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for @rust-lang/lang. Cc @workingjubilee @veluca93

try-job: test-various
try-job: armhf-gnu
try-job: dist-i586-gnu-i586-i686-musl

@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
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

@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 Apr 3, 2025
@RalfJung RalfJung added I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Apr 3, 2025
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from f4e41c2 to 607bd91 Compare April 3, 2025 10:30
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 607bd91 to 39f82c8 Compare April 3, 2025 11:31
@@ -3,7 +3,7 @@
// x86 only.

//@ add-core-stubs
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3 -Ctarget-feature=+avx
Copy link
Member Author

Choose a reason for hiding this comment

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

@azhogin this test was using SIMD vector types without the appropriate target feature... I hope adding the target feature preserves the meaning of the test.

Copy link
Member

Choose a reason for hiding this comment

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

It does.

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 39f82c8 to d817e10 Compare April 3, 2025 12:41
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from d817e10 to 00743be Compare April 3, 2025 13:45
@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 00743be to 764fe74 Compare April 3, 2025 14:51
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Apr 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

This PR modifies run-make tests.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 764fe74 to f6eb25c Compare April 3, 2025 17:04
@@ -56,7 +56,7 @@ fn main() {
.target(&target)
.emit("llvm-ir,asm")
.input("simd.rs")
.arg("-Ctarget-feature=-soft-float,+neon,+sse")
.arg("-Ctarget-feature=-soft-float,+neon,+sse2,+msa")
.arg(&format!("-Cextra-filename=-{target}"))
.run();
Copy link
Member Author

Choose a reason for hiding this comment

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

This test will become a complete nightmare to maintain when we start to properly enforce some basic consistency of target features.

@ehuss
Copy link
Contributor

ehuss commented Apr 3, 2025

@RalfJung Do you think we can get this documented in the reference? Like maybe somewhere in the target_feature documentation or probably it makes more sense to be a part of the abi chapter with the abi chapter rework? Although I'm a little confused since Connor removed the SIMD section and I'm not sure why.

My uncertainty is emphasized because we currently don't really document SIMD, and I don't know how we plan to do that.

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from f6eb25c to 5bbf200 Compare April 4, 2025 06:01
@RalfJung
Copy link
Member Author

RalfJung commented Apr 4, 2025

@RalfJung Do you think we can get this documented in the reference? Like maybe somewhere in the target_feature documentation or probably it makes more sense to be a part of the abi chapter with the abi chapter rework? Although I'm a little confused since Connor removed the SIMD section and I'm not sure why.

My uncertainty is emphasized because we currently don't really document SIMD, and I don't know how we plan to do that.

Seems like this should be part of rust-lang/reference#1545 so I'd rather not add a separate PR now, that would just be a huge conflict.

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

☔ The latest upstream changes (presumably #139555) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

☀️ Try build successful - checks-actions
Build commit: 38a9dff (38a9dffa5728c708611806992f4b44be159706a8)

@RalfJung
Copy link
Member Author

@bors r=fee1-dead,traviscross

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

📌 Commit 64d0bb2 has been approved by fee1-dead,traviscross

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 23, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
…s, r=fee1-dead,traviscross

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
try-job: armhf-gnu
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Testing commit 64d0bb2 with merge 49fa644...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

💔 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 Apr 23, 2025
@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 64d0bb2 to 216fac3 Compare April 23, 2025 12:01
@RalfJung
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
…s, r=<try>

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
try-job: armhf-gnu
try-job: dist-i586-gnu-i586-i686-musl
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Trying commit 216fac3 with merge d9ee062...

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

☀️ Try build successful - checks-actions
Build commit: d9ee062 (d9ee0628138f28284b1676cc3a9fd8041f060f97)

@RalfJung
Copy link
Member Author

@bors r=fee1-dead,traviscross

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

📌 Commit 216fac3 has been approved by fee1-dead,traviscross

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 23, 2025
@bors
Copy link
Collaborator

bors commented Apr 24, 2025

⌛ Testing commit 216fac3 with merge c02a4f0...

@bors
Copy link
Collaborator

bors commented Apr 24, 2025

☀️ Test successful - checks-actions
Approved by: fee1-dead,traviscross
Pushing c02a4f0 to master...

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

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 fa58ce3 (parent) -> c02a4f0 (this PR)

Test differences

Show 279 test diffs

279 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c02a4f0852e6665cf3df3867982021383f5615df --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 3888.9s -> 5451.5s (40.2%)
  2. x86_64-apple-1: 8658.0s -> 7714.6s (-10.9%)
  3. dist-aarch64-apple: 5840.1s -> 5216.9s (-10.7%)
  4. dist-x86_64-apple: 8480.5s -> 9242.5s (9.0%)
  5. dist-arm-linux: 5839.8s -> 5420.9s (-7.2%)
  6. x86_64-gnu: 6779.4s -> 6389.3s (-5.8%)
  7. i686-gnu-2: 6419.6s -> 6739.7s (5.0%)
  8. x86_64-gnu-llvm-20-3: 7140.1s -> 6788.2s (-4.9%)
  9. x86_64-msvc-ext3: 7549.6s -> 7891.1s (4.5%)
  10. dist-powerpc-linux: 5438.4s -> 5193.6s (-4.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 (c02a4f0): 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)

Results (primary -0.4%, secondary -3.8%)

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.5% [0.4%, 0.5%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-2.2%, -0.5%] 2
Improvements ✅
(secondary)
-3.8% [-3.8%, -3.8%] 1
All ❌✅ (primary) -0.4% [-2.2%, 0.5%] 4

Cycles

Results (primary 0.5%)

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.5% [0.4%, 0.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.4%, 0.6%] 2

Binary size

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

Bootstrap: 775.233s -> 774.94s (-0.04%)
Artifact size: 365.14 MiB -> 365.09 MiB (-0.01%)

@RalfJung RalfJung deleted the abi_unsupported_vector_types branch April 24, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination 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-lang Relevant to the language team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet