10BC0 Renumber return local after state transform by cjgillot · Pull Request #147533 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Conversation

cjgillot
Copy link
Contributor
@cjgillot cjgillot commented Oct 9, 2025

The current implementation of StateTransform renames _0 before analyzing liveness. This is inconsistent, as a return terminator hardcodes a read of _0.

This PR proposes to perform such rename after analyzing the body, in fact after the whole transform. The implementation is not much more complicated.

@rustbot
Copy link
Collaborator
rustbot commented Oct 9, 2025

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 Oct 9, 2025
@rustbot
Copy link
Collaborator
rustbot commented Oct 9, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@cjgillot
Copy link
Contributor Author
cjgillot commented Oct 9, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 9, 2025
Renumber return local after state transform
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 9, 2025
@rust-bors
Copy link
rust-bors bot commented Oct 9, 2025

☀️ Try build successful (CI)
Build commit: 5d28c0f (5d28c0f97153f4ce2a271c0543e8990ff8170e75, parent: 0b278a539440be291466ea463a9b6310eaf4d7bb)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5d28c0f): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.3%, -0.1%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-4.0%, -2.4%] 8
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 473.191s -> 473.193s (0.00%)
Artifact size: 388.07 MiB -> 388.06 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 10, 2025
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.

4 participants
0