Skip to content

Remove Option from terminator - #166248

Draft
panstromek wants to merge 5 commits into
rust-lang:mainfrom
panstromek:remove-option-terminator
Draft

panstromek wants to merge 5 commits into
rust-lang:mainfrom
panstromek:remove-option-terminator

Conversation

@panstromek

@panstromek panstromek commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Opening early to check perf, because the simplify part of this effort (#165934) regressed it.

Blocked on #165721 and #166243

Here the simplest way to avoid it just to honor the `split_block` function name and do a proper split which inserts a goto instead of taking the terminator out. This goto will then be replaced by adding later checks.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Nov 20, 2026
@panstromek

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@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 Nov 20, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 20, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0a666e4 (0a666e4aea703a8e0818ac892e742ed40e27042b)
Base parent: ec65cd5 (ec65cd52bba13d491ff65c9d218b39753755c84a)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0a666e4): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@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.9% [0.8%, 0.9%] 6
Improvements ✅
(primary)
-0.3% [-0.4%, -0.2%] 13
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.0%] 22
All ❌✅ (primary) -0.3% [-0.4%, -0.2%] 13

Max RSS (memory usage)

Results (primary 1.9%, 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)
1.9% [1.1%, 2.4%] 3
Regressions ❌
(secondary)
2.0% [0.4%, 4.2%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) 1.9% [1.1%, 2.4%] 3

Cycles

Results (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)
1.5% [1.1%, 2.7%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 459.547s -> 486.251s (5.81%)
Artifact size: 405.37 MiB -> 405.44 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 20, 2026
@panstromek

Copy link
Copy Markdown
Contributor Author

the next-solver-stress regression looks like noise, it's entirerly in <rustc_hir_typeck::fn_ctxt::FnCtxt>::coerce, which runs before we ever get to MIR.

@panstromek
panstromek force-pushed the remove-option-terminator branch from 221796e to ff96bcd Compare November 20, 2026 17:15
@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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

This branch has not been deployed

No deployments
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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer 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