Skip to content

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Oct 8, 2025

The current implementation starts by transforming all instances of _1 into (*_1), and then traverses the body again to transform (*_1) into (*(_1.0)), and again for Derefer.

This PR changes the implementation to only traverse the body once. As _1.0 cannot be not modified inside the body (we just changed its type!), we have no risk of loading from the wrong pointer.

@rustbot
Copy link
Collaborator

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

rustbot commented Oct 8, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 8, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 8, 2025
StateTransform: Only load pin field once.
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 8, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 8, 2025

☀️ Try build successful (CI)
Build commit: 8a45031 (8a45031b817c65c13e267ee4f0c1aa833399b480, parent: 7a52736039856a3626eefec32d80c9df900b7afd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8a45031): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.9%, -0.2%] 16
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -5.2%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.2% [-5.2%, -5.2%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary 0.3%)

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.9% [1.5%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -1.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)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 7
Improvements ✅
(secondary)
-1.8% [-6.0%, -0.2%] 12
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 7

Bootstrap: 472.232s -> 472.472s (0.05%)
Artifact size: 388.41 MiB -> 388.41 MiB (-0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 9, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Oct 12, 2025

☔ The latest upstream changes (presumably #145513) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Oct 13, 2025

☔ The latest upstream changes (presumably #147640) made this pull request unmergeable. Please resolve the merge conflicts.

@BoxyUwU
Copy link
Member

BoxyUwU commented Oct 14, 2025

r? compiler

@rustbot rustbot assigned jdonszelmann and unassigned BoxyUwU Oct 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2025

This PR was rebased onto a different master 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.

@jdonszelmann
Copy link
Contributor

r? compiler

@rustbot rustbot assigned wesleywiser and unassigned jdonszelmann Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

8 participants