Skip to content

Rollup of 3 perf-sensitive pull requests - #166611

Closed
JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-4tw0Q71
Closed

JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-4tw0Q71

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

nnethercote and others added 8 commits November 11, 2026 10:27
This helps the new solver because resolution is more expensive for it
than the old solver, so it's worth trying harder to avoid it.

The biggest win is for `nalgebra`, because it impls `Add` for a matrix
type, and `+` calls on elements also use `Add::add`. So more precise
checks are needed.

This change avoids the ICE in tests/crashes/152295.rs but doesn't
properly fix the underlying problem, so the commit also modifies that
test to re-expose the ICE.
…ted_parameters

Skip checking functions with fewer than 2 parameters.

Use a stack-allocated SmallVec instead of FxHashMap for small parameters lists

Compare (Symbol, SyntaxContext) directly to avoid calling Ident::normalize_to_macro_rules()
This is dead code now, because terminator is never None. The ice is now triggered sooner in the unwrap in `into_basic_blocks`.
This commit only makes the necessary changes. We don't remove terminator() or terminator_mut() methods to avoid too many changes at once and avoid conflicts.
…r, r=oli-obk

Add two extra early return checks to `is_recursive_terminator`

This helps the new solver because resolution is more expensive for it than the old solver, so it's worth trying harder to avoid it.

The biggest win is for `nalgebra`, because it impls `Add` for a matrix type, and `+` calls on elements also use `Add::add`. So more precise checks are needed.

r? @oli-obk
…r, r=oli-obk

Make terminator not optional in BasicBlockData

This is the final PR for changing `Option<Terminator>` to `Terminator` in `BasicBlockData`. More info in [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808).

At this point there should never be a case where the terminator is `None`. All usages of `None` were replaced in preceding PR. This PR should practically be a no-op.

First 2 commits remove dead code, the final commit replaces the Option. This PR does try to do only minimal necessary changes to avoid conflicts - i.e. we don't remove `terminator()` and `terminator_mut()` methods or any other cleanups.

This should be reviewable commit by commit. For some changes that are just removing ifs, it's useful to hide whitespace changes.
…r=panstromek,JonathanBrouwer

rustc-lint: avoid allocation and Ident reconstruction in find_duplicated_parameters

Fixes rust-lang#166410
Slowdown came from the lint in rust-lang#165366 and showed up on `externs` and `libc`

Skip checking functions with fewer than 2 parameters.
Use a stack-allocated `SmallVec` instead of `FxHashMap` for small parameters lists.

Compare `(Symbol, SyntaxContext)` directly to avoid calling `Ident::normalize_to_macro_rules()`

The warnings are unchanged, I ran tests/ui/lint/duplicate-parameter-names.rs,
but looks like we need to do perf again: time regression on `externs` and `libc` should be less.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 26, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 26, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,dist-various-2,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3,test-aarch64-msvc-2

@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d214fa1 has been approved by JonathanBrouwer

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 Nov 26, 2026
@JonathanBrouwer JonathanBrouwer changed the title Rollup of 3 pull requests Rollup of 3 perf-sensitive pull requests Nov 26, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 26, 2026
Rollup of 3 pull requests


try-job: dist-various-1
try-job: dist-various-2
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
try-job: test-aarch64-msvc-2
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 26, 2026
@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f76bf12 (f76bf125436142cf253bcfa567e2b245aefc97b0)
Base parent: e068f42 (e068f42013e833ad8c4da25776b7fba798c2ea2d)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants