Skip to content

Remove dead instructions in terminate blocks #142879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Jun 22, 2025

Terminate blocks look pretty in the IR I've looked at, so no actual perf delta from this. But it seems reasonable to note produce unused IR.

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2025
@Mark-Simulacrum
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 22, 2025

⌛ Trying commit a46ef2d with merge e688330

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 22, 2025
Remove dead instructions in terminate blocks

Opening as draft for perf. It looks like terminate blocks are actually pretty uncommon, and dead instructions shouldn't cost us much, so I'm not expecting any meaningful delta from this.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 22, 2025
@rust-bors
Copy link

rust-bors bot commented Jun 22, 2025

☀️ Try build successful (CI)
Build commit: e688330 (e688330f9b59aa0229fd4de423dc2354b85bbb98, parent: a30f1783fe136d92545423dd30b12eb619973cdb)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e688330): comparison URL.

Overall result: ❌ regressions - 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)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.9%, 2.9%] 1

Max RSS (memory usage)

Results (primary -2.5%, secondary -3.1%)

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)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-3.1% [-3.6%, -2.5%] 2
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

Cycles

Results (primary 3.1%, secondary 2.2%)

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

mean range count
Regressions ❌
(primary)
3.1% [3.1%, 3.1%] 1
Regressions ❌
(secondary)
2.2% [2.1%, 2.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% [3.1%, 3.1%] 1

Binary size

Results (primary 1.1%)

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

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

Bootstrap: 689.082s -> 691.002s (0.28%)
Artifact size: 371.89 MiB -> 371.92 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 23, 2025
@Mark-Simulacrum Mark-Simulacrum marked this pull request as ready for review June 23, 2025 11:15
@rustbot
Copy link
Collaborator

rustbot commented Jun 23, 2025

r? @WaffleLapkin

rustbot has assigned @WaffleLapkin.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 23, 2025

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@Mark-Simulacrum
Copy link
Member Author

Regressions look spurious to me based on history of that benchmark.

@WaffleLapkin
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 23, 2025

📌 Commit a46ef2d has been approved by WaffleLapkin

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 Jun 23, 2025
@workingjubilee
Copy link
Member

forcing rollup=never drain:

@bors p=5

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

⌛ Testing commit a46ef2d with merge d14d202...

@bors
Copy link
Collaborator

bors commented Jun 25, 2025

☀️ Test successful - checks-actions
Approved by: WaffleLapkin
Pushing d14d202 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 25, 2025
@bors bors merged commit d14d202 into rust-lang:master Jun 25, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 25, 2025
Copy link
Contributor

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 8cf5fad (parent) -> d14d202 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard d14d202262d13df896b0c624b0cec6e4bfde631a --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-aarch64-linux: 6040.3s -> 7923.6s (31.2%)
  2. dist-apple-various: 8577.7s -> 7254.0s (-15.4%)
  3. x86_64-apple-1: 6787.1s -> 7641.1s (12.6%)
  4. dist-x86_64-apple: 8889.9s -> 7812.6s (-12.1%)
  5. x86_64-apple-2: 4321.1s -> 3909.6s (-9.5%)
  6. aarch64-gnu-debug: 3993.9s -> 3662.4s (-8.3%)
  7. dist-i686-msvc: 6866.3s -> 7377.3s (7.4%)
  8. dist-s390x-linux: 5071.8s -> 4701.4s (-7.3%)
  9. x86_64-rust-for-linux: 2673.8s -> 2487.9s (-7.0%)
  10. aarch64-apple: 5378.7s -> 5006.3s (-6.9%)
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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