-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Validate CopyForDeref and DerefTemps better and remove them from runtime MIR #145513
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
base: master
Are you sure you want to change the base?
Conversation
|
This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @vakaras Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to constck cc @fee1-dead Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr Some changes occurred to the CTFE machinery |
This comment has been minimized.
This comment has been minimized.
(note that oli is on vacation and will be for quite a while) |
This comment has been minimized.
This comment has been minimized.
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
8151b0e
to
829f66d
Compare
This comment has been minimized.
This comment has been minimized.
829f66d
to
dfd97cd
Compare
This comment has been minimized.
This comment has been minimized.
11f84dd
to
bfc73ec
Compare
r? mir |
It's been long enough since I've looked at a involved MIR change that I'm probably not best suited to this r? mir |
☔ The latest upstream changes (presumably #146666) made this pull request unmergeable. Please resolve the merge conflicts. |
bfc73ec
to
d833c90
Compare
This comment has been minimized.
This comment has been minimized.
I moved |
This comment has been minimized.
This comment has been minimized.
d99b187
to
d7824f2
Compare
☔ The latest upstream changes (presumably #142771) made this pull request unmergeable. Please resolve the merge conflicts. |
I've finally got my head around the diff, and I think this is conceptually simple but annoying to implement. I know there are currently merge conflicts, but what happens if I @bors r+ rollup=iffy (conflict-prone) |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
some optimization is behaving slightly differently on box derefs after this change, but the difference is irrelevant
it did not create DerefTemp locals when used, so it was never actually correct.
elaborate drops and inline don't seem to actually need it
d7824f2
to
bfdcede
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
(split from my WIP #145344)
This PR:
Rvalue::CopyForDeref
andLocalInfo::DerefTemp
from runtime MIREraseDerefTemps
CopyForDeref(x)
is turned intoUse(Copy(x))
DerefTemp
is turned intoBoring
DerefTemp
storing actual data that I wanted to keep from having to be kept in sync with the rest of the body in runtime MIRCopyForDeref
andDerefTemp
are only used togetherCopyForDeref
from many placesCopyForDeref
fromcustom_mir
reverting Custom MIR: SupportRvalue::CopyForDeref
#111587DerefTemp
localsderef_finder
to avoid creating newDerefTemp
s andCopyForDeref
in runtime MIR.deref_finder
that I found out don't actually do anythingr? oli-obk