-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
InstCombine away intrinsic validity assertions #105582
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 2d86c3c5de3b4cf8c1a7f0d51f5466a1b2120586 with merge 7893106e07baf9fba3abcd2391134f6cf939f6f2... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7893106e07baf9fba3abcd2391134f6cf939f6f2): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking 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 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.
|
r? @oli-obk |
dcb9c47
to
a22a62a
Compare
Waiting on DestProp improvement |
a22a62a
to
662199f
Compare
r? @cjgillot feel free to bounce back if preferred |
⌛ Testing commit 662199f with merge ed9d19a24db785dd6b0b49eead9328842892e10e... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
Failure is legit. The |
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
80bd34a
to
5bfad5c
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (885bf62): 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
*target = None; | ||
} else { | ||
// If we know the assert does not panic, turn the call into a Goto | ||
terminator.kind = TerminatorKind::Goto { target: *target_block }; |
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 don't think I entirely understand the point of this. The intrinsic will anyway compile to a goto in this case. It's not like this ever becomes a runtime check. So what is the win here?
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.
After SimplifyCfg the goto will be gone, shrinking the mir slightly. Also having to evaluate the intrinsic every time you monomorphize is slightly more expensive than evaluating it once at mir optimization time.
…d, r=cjgillot InstCombine away intrinsic validity assertions This optimization (currently) fires 246 times on the standard library. It seems to fire hardly at all on the big crates in the benchmark suite. Interesting.
(GeneratorWitnessMIR) Compute generator saved locals on MIR rust-lang/rust#101692 (ParamEnv) InstCombine away intrinsic validity assertions rust-lang/rust#105582 (Primitive::Pointer) abi: add AddressSpace field to Primitive::Pointer rust-lang/rust#107248
(GeneratorWitnessMIR) Compute generator saved locals on MIR rust-lang/rust#101692 (ParamEnv) InstCombine away intrinsic validity assertions rust-lang/rust#105582 (Primitive::Pointer) abi: add AddressSpace field to Primitive::Pointer rust-lang/rust#107248
This optimization (currently) fires 246 times on the standard library. It seems to fire hardly at all on the big crates in the benchmark suite. Interesting.