-
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
Perform MIR NRVO even if types don't match #72451
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Single pointers get returned via register, so I think there's almost no chance this was actually responsible for the perf changes described in #72428. Just in case: @bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit d24ba6d with merge bc74f58ab5960fcfa233c8d5c77cd3407597b747... |
☀️ Try build successful - checks-azure |
Queued bc74f58ab5960fcfa233c8d5c77cd3407597b747 with parent 458a3e7, future comparison URL. |
Finished benchmarking try commit bc74f58ab5960fcfa233c8d5c77cd3407597b747, comparison URL. |
This has no effect. Perhaps we should just close this along with #72428? |
While it may look like the only difference is noise, this saves ~0.1% on average for all changes >0.0%. A few regress ~0.1%, but this is only for a few of the benchmarks, while the ~0.1% wins are for much more benchmarks. Conclusion: this change does improve compilation time, but the change is tiny. |
@bors r+ |
📌 Commit d24ba6d has been approved by |
…r=matthewjasper Perform MIR NRVO even if types don't match This is the most straightforward way to resolve rust-lang#72428, but it could cause problems in codegen since the type of `_0` may no longer match the return type of the body.
Rollup of 5 pull requests Successful merges: - rust-lang#72061 (add regression tests for stalled_on const vars) - rust-lang#72424 (fix ICE when debug-printing MIR) - rust-lang#72450 (Fix ice-rust-lang#72442) - rust-lang#72451 (Perform MIR NRVO even if types don't match) - rust-lang#72538 (Removed all instances of const_field.) Failed merges: r? @ghost
This is the most straightforward way to resolve #72428, but it could cause problems in codegen since the type of
_0
may no longer match the return type of the body.