Skip to content

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Sep 22, 2025

GVN currently evaluates constants eagerly. This is not necessary. This PR makes constant evaluation on-demand to avoid unnecessary work.

r? @ghost for perf

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 22, 2025
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 22, 2025
@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 Sep 22, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 22, 2025

☀️ Try build successful (CI)
Build commit: ca09b36 (ca09b3628a00e674c41779a484ca277693d7c998, parent: 9f32ccf35fb877270bc44a86a126440f04d676d0)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ca09b36): 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.1% [-0.1%, -0.1%] 3
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 5
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 3

Max RSS (memory usage)

Results (primary 2.7%, secondary 3.7%)

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

mean range count
Regressions ❌
(primary)
2.7% [2.5%, 2.9%] 2
Regressions ❌
(secondary)
4.3% [2.1%, 5.0%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) 2.7% [2.5%, 2.9%] 2

Cycles

Results (secondary -2.5%)

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

Binary size

Results (secondary 0.0%)

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

Bootstrap: 471.273s -> 473.396s (0.45%)
Artifact size: 387.92 MiB -> 389.96 MiB (0.53%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 22, 2025
@bors
Copy link
Collaborator

bors commented Oct 2, 2025

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

@cjgillot cjgillot force-pushed the gvn-lazy-const branch 2 times, most recently from bc72f9c to de38c09 Compare October 6, 2025 19:33
@cjgillot cjgillot marked this pull request as ready for review October 6, 2025 23:19
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 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. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 6, 2025
@cjgillot
Copy link
Contributor Author

cjgillot commented Oct 6, 2025

r? @dianqk

@dianqk
Copy link
Member

dianqk commented Oct 8, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 8, 2025

📌 Commit de38c09 has been approved by dianqk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2025
bors added a commit that referenced this pull request Oct 8, 2025
GVN: Evaluate constants lazily.

GVN currently evaluates constants eagerly. This is not necessary. This PR makes constant evaluation on-demand to avoid unnecessary work.

r? `@ghost` for perf
@bors
Copy link
Collaborator

bors commented Oct 8, 2025

⌛ Testing commit de38c09 with merge e3b5da9...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Oct 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 8, 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.

@cjgillot
Copy link
Contributor Author

cjgillot commented Oct 8, 2025

@bors r=dianqk

@bors
Copy link
Collaborator

bors commented Oct 8, 2025

📌 Commit 5da52f5 has been approved by dianqk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2025
@bors
Copy link
Collaborator

bors commented Oct 8, 2025

⌛ Testing commit 5da52f5 with merge b6f0945...

@bors
Copy link
Collaborator

bors commented Oct 8, 2025

☀️ Test successful - checks-actions
Approved by: dianqk
Pushing b6f0945 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 8, 2025
@bors bors merged commit b6f0945 into rust-lang:master Oct 8, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 8, 2025
Copy link
Contributor

github-actions bot commented Oct 8, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 7a52736 (parent) -> b6f0945 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard b6f0945e4681bc4d2faa7c22c5f61dc36abf7dd2 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-i686-linux: 6192.2s -> 7329.8s (18.4%)
  2. x86_64-rust-for-linux: 2912.7s -> 2473.9s (-15.1%)
  3. dist-x86_64-apple: 8488.6s -> 7355.3s (-13.4%)
  4. i686-gnu-nopt-1: 8143.2s -> 7194.8s (-11.6%)
  5. x86_64-gnu-stable: 7762.7s -> 7014.0s (-9.6%)
  6. aarch64-gnu-llvm-20-2: 2344.2s -> 2121.9s (-9.5%)
  7. aarch64-msvc-2: 4669.5s -> 5106.4s (9.4%)
  8. armhf-gnu: 5311.2s -> 4846.2s (-8.8%)
  9. dist-aarch64-apple: 7817.1s -> 7136.0s (-8.7%)
  10. x86_64-gnu-llvm-20-3: 6700.7s -> 6129.9s (-8.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b6f0945): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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.1% [-0.1%, -0.1%] 2
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 2

Max RSS (memory usage)

Results (primary 7.4%, secondary 3.5%)

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

mean range count
Regressions ❌
(primary)
7.4% [7.4%, 7.4%] 1
Regressions ❌
(secondary)
3.5% [3.5%, 3.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 7.4% [7.4%, 7.4%] 1

Cycles

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

Binary size

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

Bootstrap: 472.232s -> 479.914s (1.63%)
Artifact size: 388.41 MiB -> 388.45 MiB (0.01%)

@rustbot rustbot removed the perf-regression Performance regression. label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants