-
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
[mir-opt] Small ConstProp cleanup #71911
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
df8f3c0
to
1fbcf80
Compare
This comment has been minimized.
This comment has been minimized.
1fbcf80
to
689422b
Compare
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 689422b959b40de1da8c0a37ea4dcd63a4bb8451 with merge 8abd3d455988e5bf83282b3abdd7c23a1362bc96... |
Note: bors will probably mark the try build as failed, since the try build was started before we started double-gating on both Azure Pipelines and GitHub Actions. |
bors looks stuck in the "pending" state for GHA probably for the reasons @pietroalbini mentioned. I'll try it again to see if that fixes it: @bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 689422b959b40de1da8c0a37ea4dcd63a4bb8451 with merge 30692efbe3de0e909467c2c01e14685f76efb576... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 30692efbe3de0e909467c2c01e14685f76efb576 with parent f8d394e, future comparison URL. |
Finished benchmarking try commit 30692efbe3de0e909467c2c01e14685f76efb576, comparison URL. |
There's a merge conflict now. Needs a rebase here. |
src/test/mir-opt/simplify-arm-identity/rustc.main.SimplifyArmIdentity.diff
Show resolved
Hide resolved
r? @oli-obk r=me after a rebase. The perf wins are real and the perf losses are cgu related |
☔ The latest upstream changes (presumably #73369) made this pull request unmergeable. Please resolve the merge conflicts. |
This mode is unnecessary because it's always ok to evaluate the right-hand side of assignments even if the left-hand side should not have reads propagated.
baabf2f
to
2f49d55
Compare
@bors r=oli-obk |
📌 Commit 2f49d55 has been approved by |
…ps, r=oli-obk [mir-opt] Small ConstProp cleanup
⌛ Testing commit 2f49d55 with merge 2150cf111bb697fffd5bd8115469957d1e1e24d6... |
💥 Test timed out |
@bors retry |
@bors p=1 letting rollup=never PRs flush out |
☀️ Test successful - checks-azure |
This PR introduced a miscompilation in mir-opt-level=3: #73609 |
In fact it's not just opt-level 3, it's even the default opt-level 1. This introduced a stable-to-nightly regression. |
@@ -820,7 +818,7 @@ impl<'tcx> Visitor<'tcx> for CanConstProp { | |||
| MutatingUse(MutatingUseContext::Borrow) | |||
| MutatingUse(MutatingUseContext::AddressOf) => { | |||
trace!("local {:?} can't be propagaged because it's used: {:?}", local, context); | |||
self.can_const_prop[local] = ConstPropMode::NoPropagation; |
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.
@oli-obk so is this the diff that caused the bug? That these uses no longer prevent propagation? Instead of duplicating that use detection by handling Ref
and AddrOf
ourselves, would it make more sense to continue to use this info here (or at least do so additionally)?
No description provided.