Skip to content

Apply RemoveNoopLandingPads post-monomorphization#143208

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
Mark-Simulacrum:skip-noop-cleanup
Jul 22, 2026
Merged

Apply RemoveNoopLandingPads post-monomorphization#143208
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
Mark-Simulacrum:skip-noop-cleanup

Conversation

@Mark-Simulacrum

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

Copy link
Copy Markdown
Member

View all comments

On Cargo this cuts ~5% of the LLVM IR lines we generate (measured with -Cno-prepopulate-passes).

Closes #159399.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 29, 2025
@Mark-Simulacrum

This comment was marked as resolved.

@rust-timer

This comment has been minimized.

@rust-bors

This comment was marked as resolved.

rust-bors Bot added a commit that referenced this pull request Jun 29, 2025
Remove no-op cleanups as post-mono MIR opt

On cargo this cuts ~5% of the LLVM IR lines we generate (measured with -Cno-prepopulate-passes). Opening to assess performance.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 29, 2025
@rust-bors

This comment was marked as resolved.

@rust-timer

This comment has been minimized.

@rust-timer

This comment was marked as outdated.

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 29, 2025
@Mark-Simulacrum

This comment was marked as resolved.

@rust-bors

This comment was marked as resolved.

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 1, 2025
@rust-timer

This comment has been minimized.

@Mark-Simulacrum

This comment was marked as resolved.

@rust-bors

This comment was marked as resolved.

rust-bors Bot added a commit that referenced this pull request Jul 1, 2025
Remove no-op cleanups as post-mono MIR opt

On cargo this cuts ~5% of the LLVM IR lines we generate (measured with -Cno-prepopulate-passes). Opening to assess performance.
@rust-bors

This comment was marked as resolved.

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e3a4b05): 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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-4.6%, -0.2%] 22
Improvements ✅
(secondary)
-2.8% [-18.0%, -0.8%] 17
All ❌✅ (primary) -1.9% [-4.6%, 0.4%] 23

Max RSS (memory usage)

Results (primary -2.6%, secondary -1.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)
- - 0
Improvements ✅
(primary)
-2.6% [-3.8%, -1.2%] 6
Improvements ✅
(secondary)
-1.3% [-2.8%, -0.5%] 3
All ❌✅ (primary) -2.6% [-3.8%, -1.2%] 6

Cycles

Results (primary -2.4%, 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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
3.2% [0.8%, 7.1%] 4
Improvements ✅
(primary)
-2.6% [-4.3%, -1.2%] 22
Improvements ✅
(secondary)
-5.0% [-20.0%, -0.5%] 11
All ❌✅ (primary) -2.4% [-4.3%, 1.1%] 23

Binary size

Results (primary -0.6%, secondary -0.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.6% [-1.4%, -0.0%] 66
Improvements ✅
(secondary)
-0.8% [-3.6%, -0.0%] 30
All ❌✅ (primary) -0.6% [-1.4%, -0.0%] 66

Bootstrap: 461.485s -> 461.37s (-0.02%)
Artifact size: 372.20 MiB -> 371.78 MiB (-0.11%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Jul 1, 2025
@Mark-Simulacrum

This comment was marked as resolved.

@rust-bors

This comment was marked as resolved.

@Mark-Simulacrum

This comment was marked as resolved.

@rust-bors

This comment was marked as resolved.

@Mark-Simulacrum

This comment was marked as resolved.

My suspicion is that it's getting inlined; the functions have
`#[no_mangle]` but do not have `#[inline(never)]`. `#[no_mangle]` is
already iffy on generics.

I don't think it's worth trying to figure out why foo and bar are
special on 32-bit msvc.
@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

@bors try jobs=msvc,mingw

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 21, 2026
Apply RemoveNoopLandingPads post-monomorphization


try-job: *msvc*
try-job: *mingw*
@rust-bors

rust-bors Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 717e8b7 (717e8b7b44ba38ad879c523947f1818beb181da2)
Base parent: cde3f8a (cde3f8aee5a30928872e2438e3f18238a3fa306c)

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

@rustbot ready

I removed the check on i686-msvc, I'm not seeing anything obvious for why we wouldn't expect inlining in the test case and it seems quite plausible this change makes inlining more likely.

@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 Jul 21, 2026
@oli-obk

oli-obk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit dbbd8ee has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jul 22, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 22, 2026
Apply RemoveNoopLandingPads post-monomorphization



On Cargo this cuts ~5% of the LLVM IR lines we generate (measured with -Cno-prepopulate-passes).

Closes #159399.
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-loongarch64-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors rust-bors Bot 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 Jul 22, 2026
@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

💔 Test for fa268ea failed: CI. Failed job:

@mati865

mati865 commented Jul 22, 2026

Copy link
Copy Markdown
Member

The build just died without any info?

@bors retry

@rust-bors rust-bors Bot 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 Jul 22, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 22, 2026
@rust-bors

rust-bors Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: oli-obk
Duration: 3h 16m 19s
Pushing 6f72b5d to main...

@rust-bors
rust-bors Bot merged commit 6f72b5d into rust-lang:main Jul 22, 2026
15 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 22, 2026
@github-actions

Copy link
Copy Markdown
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 ae3bbe7 (parent) -> 6f72b5d (this PR)

Test differences

Show 7 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/unused-drop-pre-llvm.rs: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/unused-drop-pre-llvm.rs: [missing] -> ignore (ignored on targets without unwinding support (- depends on landing pads being optimized away, so not useful to run without it)) (J2)

Stage 2

  • [codegen] tests/codegen-llvm/unused-drop-pre-llvm.rs: [missing] -> pass (J0)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 6f72b5dd5f82226a2773d40efea7bab941892a73 --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-x86_64-llvm-mingw: 1h 27m -> 2h 13m (+52.3%)
  2. x86_64-gnu-miri: 1h 6m -> 1h 32m (+39.2%)
  3. x86_64-gnu-nopt: 1h 51m -> 2h 30m (+35.3%)
  4. x86_64-msvc-ext3: 1h 20m -> 1h 49m (+35.2%)
  5. dist-arm-linux-musl: 1h 16m -> 1h 38m (+28.4%)
  6. aarch64-apple-macos-26: 3h 21m -> 2h 24m (-28.3%)
  7. x86_64-gnu-debug: 1h 29m -> 1h 53m (+27.4%)
  8. dist-ohos-armv7: 1h 14m -> 56m 11s (-25.0%)
  9. x86_64-gnu-llvm-22-3: 1h 22m -> 1h 40m (+22.4%)
  10. dist-various-2: 45m 47s -> 35m 49s (-21.8%)
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
Copy Markdown
Collaborator

Finished benchmarking commit (6f72b5d): 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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-2.2% [-4.9%, -0.2%] 25
Improvements ✅
(secondary)
-3.4% [-20.7%, -0.2%] 22
All ❌✅ (primary) -2.2% [-4.9%, -0.2%] 25

Max RSS (memory usage)

Results (primary -1.3%, secondary -4.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)
-1.3% [-1.3%, -1.3%] 1
Improvements ✅
(secondary)
-4.8% [-6.3%, -3.3%] 2
All ❌✅ (primary) -1.3% [-1.3%, -1.3%] 1

Cycles

Results (primary -3.1%, secondary -2.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)
21.9% [20.3%, 23.5%] 2
Improvements ✅
(primary)
-3.1% [-4.7%, -1.1%] 13
Improvements ✅
(secondary)
-6.7% [-23.0%, -2.5%] 11
All ❌✅ (primary) -3.1% [-4.7%, -1.1%] 13

Binary size

Results (primary -0.7%, secondary -1.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)
- - 0
Improvements ✅
(primary)
-0.7% [-1.7%, -0.1%] 60
Improvements ✅
(secondary)
-1.3% [-4.5%, -0.1%] 30
All ❌✅ (primary) -0.7% [-1.7%, -0.1%] 60

Bootstrap: 487.635s -> 486.811s (-0.17%)
Artifact size: 387.74 MiB -> 387.67 MiB (-0.02%)

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. 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.

rustc emits unnecessary cleanup blocks for no-drop types