Conversation
Member
Author
|
LLM disclosure: the initial miri support for the new semantics was LLM generated, but I've been iterating on it for a few months now and there is little of that original draft left. LLMs were also used to generate the boilerplate for the Miri pass/fail tests, but each test was manually reviewed and adjusted before committing. |
This comment has been minimized.
This comment has been minimized.
Amanieu
force-pushed
the
move-elimination/miri
branch
from
September 26, 2026 01:05
f01190d to
262618f
Compare
This comment has been minimized.
This comment has been minimized.
Amanieu
force-pushed
the
move-elimination/miri
branch
from
September 26, 2026 05:16
262618f to
4b56c27
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This branch has not been deployed
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.
Depends on #163335 and #163359
This PR implements the new MIR semantics from rust-lang/rfcs#3943 in Miri.
Notable changes:
LocalValue::LiveUnallocatedstate to represent a local that isStorageLivebut hasn't been eliminated yet.eval_place_for_writewill automatically allocate a local if needed.eval_operandreturns a "snapshot" copy of the operand at the time it was evaluated. This uses a temporary allocation that is freed at the end of the current machine step.move_out_local: it snapshots the value and then frees the original allocation, switching the local toLiveUnallocated.EvaluatedRvaluewhich allows all rvalue operands to be evaluated and snapshotted (if needed) before the destination place of an assignment is evaluated.