-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Lower the assume intrinsic to a MIR statement #98332
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occured to rustc_codegen_cranelift cc @bjorn3 Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
cc @rust-lang/wg-mir-opt |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 15f4f800da144f34374cdaefdf31abeab5465942 with merge ec462c48b5f3225dba4718607e400ee78bdc577d... |
☀️ Try build successful - checks-actions |
Queued ec462c48b5f3225dba4718607e400ee78bdc577d with parent 42dcf70, future comparison URL. |
Finished benchmarking commit (ec462c48b5f3225dba4718607e400ee78bdc577d): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
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.
I will give this a more thorough review later this week.
cc @JakobDegen in case you'd like to take a look as well 🙂 |
Thanks for thinking of me Wesley - I actually am on wg-mir-opt though so I had received that ping already 😆 Obviously not a concern that should block this (or indeed any one) PR, but just some thoughts: Adding a new variant to One way to do this is to do less exhaustive matching in optimizations and try and generalize things to helper functions, but not sure if that's really feasible. A more plausible thing that I could imagine though is us adding a
The idea here is that this is a fairly general "shape" for a statement to take, and it is likely that large classes of statements that we want to add in the future can be brought into this form. If we then add some requirements about the behavior of these statements (eg may only write to the output place), we can have optimizations provide a fall-through case on I'm now wondering if maybe this kind of definition makes more sense for |
☔ The latest upstream changes (presumably #98649) made this pull request unmergeable. Please resolve the merge conflicts. |
Yea, we talked about this when we created |
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
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.
One small comment. r=me when you're ready
@bors r=wesleywiser |
⌛ Testing commit a0130e6 with merge 2a0411df513195dc79ed466ad848f89ee8269373... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e7c7aa7): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
This makes #96862 (comment) easier and will generally allow us to cheaply insert assume intrinsic calls in mir building.
r? rust-lang/wg-mir-opt