-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Allow more MIR SROA #144543
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
Allow more MIR SROA #144543
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
@@ -64,9 +64,8 @@ | |||
+ let mut _45: &mut std::future::Ready<()>; | |||
+ let mut _46: &mut std::pin::Pin<&mut std::future::Ready<()>>; | |||
+ scope 14 (inlined <Pin<&mut std::future::Ready<()>> as DerefMut>::deref_mut) { | |||
+ let mut _47: std::pin::Pin<&mut std::future::Ready<()>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
annot: See how this Pin
wrapper is now removed, when it previously couldn't be.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (d7a058b): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.8%, secondary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.6%, secondary 2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 466.325s -> 466.887s (0.12%) |
Perf is neutral on average. I don't see many simplifications in the tests, but that may just be a lack of opportunities. Still, I like having fewer special cases, so r=me if you want to go ahead as-is |
Yeah, I think that avoiding using layout here is a good reason to take it. Maybe's not that common to wrap niched scalars into transparent newtypes, but we clearly should be SRoAing those cases when they happen. @bors r=cjgillot |
☀️ Test successful - checks-actions |
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 65b6cdb (parent) -> 9ba00e0 (this PR) Test differencesShow 3 test diffs3 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 9ba00e0f9e00990fb88c1beac7172afe93b15609 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (9ba00e0): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.9%, secondary 4.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.1%, secondary -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 468.035s -> 468.487s (0.10%) |
Neutral results, worthwhile simplification, marking triaged as per #144543 (comment) @rustbot label: +perf-regression-triaged |
(for triagers) also: match-stress is currently noisy |
This removes some guards on SROA that are no longer needed:
repr(simd)
types compiler-team#838 it no longer needs to check for SIMD[rustc_layout_scalar_valid_range_*]
types compiler-team#807 it no longer needs to check for nichesWrapper(char)
andPin<&mut T>
can get SRoA'd now, where previously they weren't because the check was banning SRaA for anything with a niche -- not just things with#[rustc_layout_scalar_valid_range_*]
.[rustc_layout_scalar_valid_range_*]
types (MCP807) #133652 isn't complete yet, butNonZero
andNonNull
have already moved over, so this is fine. At worst this will mean that LLVM gets less!range
metadata on something that wasn't already fixed by UpdateNonZero
andNonNull
to not field-project (per MCP#807) #133651 or Update a bunch of library types for MCP807 #135236, but that's still sound, and unblocking general SRoA is worth that tradeoff.