Conversation
|
LLM disclosure: LLMs were used to double-check the correctness of the analysis against the RFC, Miri and existing MIR passes. It was useful since it found several issues, notably around the behavior of call destination places in the unwind path. |
e7ac990 to
191a6f0
Compare
191a6f0 to
8f7b938
Compare
8f7b938 to
1c34f63
Compare
|
This PR was rebased onto a different main 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. |
|
Would it be possible to test this independently from move elimination? |
|
We don't really have good infrastructure for testing analysis passes directly. The best I can do is generate some analysis snapshots, but it won't have any CHECK comments since those only look at the final MIR. My preference is to instead have this tested indirectly through the tests in MoveElimination. |
|
Perhaps we could annotate final MIR with dataflow results and run file check on it? For example, along the lines of https://github.com/tmiasko/rust/tree/pretty-dataflow. |
|
Yes, this seems to work, see my latest commit that builds on top of yours. How do you plan to land this? Will you be making a separate PR with your pretty infrastructure? |
|
Opened #163721 with dataflow pretty printing. |
|
By the way, I'm not super happy about the name |
|
☔ The latest upstream changes (presumably #163721) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Depends on #163335
This PR implements the lifetime analysis used by the
MoveEliminationpass from rust-lang/rfcs#3943.PreciseLivenesscalculates, at a sub-statement granularity, the points in a function where a local requires storage to be allocated. This is more fine-grained thanMaybeStorageLive, and takes borrows into account.r? tmiasko