-
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
Make function bodies with &! arguments unreachable #112372
Conversation
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit dedc3b3 with merge 0f4641ea16e650c77a03aa649330702722a5f66f... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (0f4641ea16e650c77a03aa649330702722a5f66f): comparison URL. Overall result: ❌ regressions - 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)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.37s -> 646.714s (-0.10%) |
This comment has been minimized.
This comment has been minimized.
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit 9e5c162 with merge b7380c57d311609c0fd4f128fbe8adbbe0f96a24... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (b7380c57d311609c0fd4f128fbe8adbbe0f96a24): comparison URL. Overall result: no relevant changes - 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 benchmark run did not return any relevant results for this metric. 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. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.476s -> 647.446s (-0.31%) |
|
||
// Now we have new MIR, stash it in the TyCtxt arena and swap it in | ||
mir = fx.cx.tcx().arena.alloc(body); | ||
fx.mir = mir; |
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.
cg_clif has this code which directly emits an unreachable instruction instead for uninhabited arguments: https://github.com/bjorn3/rustc_codegen_cranelift/blob/c07d1e2f88cb3b1a0604ae8f18b478c1aeb7a7fa/src/base.rs#L252-L261 In any case would you mind adding the peel_refs()
call here too if this experiment is a success?
Implementation of rust-lang/unsafe-code-guidelines#413 (comment)
r? @ghost