Add Miri support for move elimination semantics - #162048
Draft
Amanieu wants to merge 14 commits into
Draft
Conversation
- Changed `iter_intervals` to return `RangeInclusive` instead of `Range` - Added `clear_row`, `disjoint_rows` and `intersects_range` methods
This flag also has the effect of disabling DestinationPropagation, which is already covered by move elimination.
Collaborator
|
cc @rust-lang/miri This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a, @makai410 Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE machinery This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras Some changes occurred to the CTFE / Miri interpreter |
Amanieu
marked this pull request as draft
August 31, 2026 06:54
Member
Author
|
Oops, that should've been a draft. |
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support to Miri for the new MIR semantics from RFC 3943 when
-Zmir-move-eliminationis enabled. This builds on top of #157943, look at the last commit only.Notable changes:
LocalValue::LiveUnallocatedstate to represent a local that isStorageLivebut hasn't been eliminated yet.StorageLive. This is necessary for theRemoveZstspass and because several MIR constructors leave ZST places uninitialized.eval_place_for_writewhich allocates a local if it is currentlyLiveUnallocated.move_out_local: it copies the value to a temporary allocation freed at the end of the statement, and then frees the original allocation, switching the local toLiveUnallocated.FnArg::InPlacearguments that are bare locals are recorded as part of theReturnContinuation. They are freed upon returning or unwinding back to the caller.r? @ghost