Repository navigation
Rollup of 3 perf-sensitive pull requests - #166611
Closed
JonathanBrouwer wants to merge 8 commits into
Closed
JonathanBrouwer wants to merge 8 commits into
JonathanBrouwer wants to merge 8 commits into
Conversation
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.
Member
Author
Contributor
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
This comment has been minimized.
This comment has been minimized.
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
is_recursive_terminator#165489 (Add two extra early return checks tois_recursive_terminator)r? @ghost
Create a similar rollup