-
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
Emit noalias on &mut parameters by default #50744
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Shouldn't this be gated on the LLVM version? I think we still support distros using 3.9. |
@eddyb Good point, I've conditioned the default behavior on LLVM >= 6.0 now. |
@bors: r+ Nice! |
📌 Commit 0c965a6 has been approved by |
It'd be very cool to see any before/after benchmarks for this. I'm really curious as to how much of an impact it actually has. |
This is removing the panic=abort stable opt in. Is firefox on a new enough llvm that it won't regress? |
Thanks! |
📌 Commit 8acc992 has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 8acc992 has been approved by |
☔ The latest upstream changes (presumably #50807) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #50615) made this pull request unmergeable. Please resolve the merge conflicts. |
This used to be disabled due to LLVM bugs in the handling of noalias information in conjunction with unwinding. However, according to rust-lang#31681 all known LLVM bugs have been fixed by LLVM 6.0, so it's probably time to reenable this optimization. Noalias annotations will not be emitted by default if either -C panic=abort (as previously) or LLVM >= 6.0 (new). -Z mutable-noalias=no is left as an escape-hatch to allow debugging problems suspected to stem from this change.
@bors r=alexcrichton |
📌 Commit 1230813 has been approved by |
⌛ Testing commit 1230813 with merge d4cb245d65e63ab49eef3db792070fafd6c7d048... |
💔 Test failed - status-travis |
This comment has been minimized.
This comment has been minimized.
Emit noalias on &mut parameters by default This used to be disabled due to LLVM bugs in the handling of noalias information in conjunction with unwinding. However, according to #31681 all known LLVM bugs have been fixed by LLVM 6.0, so it's probably time to reenable this optimization. -Z no-mutable-noalias is left as an escape-hatch to debug problems suspected to stem from this change.
☀️ Test successful - status-appveyor, status-travis |
Is this changing the performance of some standard benchmark? |
Looks like the Rust part of the compiler is faster, but the LLVM part spends more time optimizing. So it seems promising for runtime perf; hopefully lolbench will confirm that. |
This used to be disabled due to LLVM bugs in the handling of
noalias information in conjunction with unwinding. However,
according to #31681 all known LLVM bugs have been fixed by
LLVM 6.0, so it's probably time to reenable this optimization.
-Z no-mutable-noalias is left as an escape-hatch to debug problems
suspected to stem from this change.