Skip to content

Improve MaybeLiveLocals - #160672

Open
nnethercote wants to merge 7 commits into
rust-lang:mainfrom
nnethercote:improve-MaybeLiveLocals
Open

Improve MaybeLiveLocals#160672
nnethercote wants to merge 7 commits into
rust-lang:mainfrom
nnethercote:improve-MaybeLiveLocals

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

Details in individual commits.

r? @cjgillot

It's mostly identical to `MaybeLiveLocals`, and we can delegate most of
its operations to `MaybeLiveLocals`.

Note that there was a tiny difference between
`MaybeLiveLocals::apply_call_return_effect` and
`MaybeTransitiveLiveLocals::apply_call_return_effect`: the former uses
`state.kill(local)`, the latter used `state.remove(local)`. The two are
equivalent so the difference didn't matter, but it does demonstrate the
dangers of the code duplication.
As `LivenessTransferFunction`. This avoids renaming it via a `use` item,
which makes things clearer.
It has only two uses, and it's just a synonym for
`LivenessTransferFunction`, which has more uses.
@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants