-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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.
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.
dfd97cd
to
11f84dd
Compare
elaborate drops and inline don't seem to actually need it
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 |
(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