Skip to content

Rollup of 4 perf-sensitive pull requests - #164224

Merged
rust-bors[bot] merged 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-HbN5FJA
Oct 12, 2026
Merged

rust-bors[bot] merged 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-HbN5FJA

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

TaKO8Ki and others added 8 commits October 10, 2026 17:12
…aethlin

Treat union fields as aliasing each other in value_analysis

Fixes rust-lang#161898

The problem was that `for_each_aliasing_place` only considered enum variants and the discriminant as aliasing, so writing to one union field left the state of the other fields alone. JumpThreading then threaded the second `switchInt` on `u.a` using the value from before `u.b = 5`, and DataflowConstProp folded the read of `u.a` to a stale constant in the same way. Union field places have only been in the map since rust-lang#127087 began collecting places syntactically; before that `iter_fields` skipped unions.

I made `for_each_aliasing_place` flood everything under a union as soon as the walk reaches it, since all non-ZST union fields start at offset 0 and overlap. The alternative of not registering places below unions would also work but loses threading on union reads with no write in between.

Added a mir-opt test for each pass.
…ast, r=petrochenkov

Avoid cloning impl trait AST nodes in late resolution

I have removed unnecessary AST clones by storing `&'ast` references. This is just a refactoring and does not change behavior. I did not use an LLM in this pull request.
…, r=mati865

Implement `clone_from` for `BorrowckDomain`

I've added a similar implementation for `BorrowckDomain` as for `rustc_const_eval::check_consts::resolver::State`.

https://github.com/rust-lang/rust/blob/208a58d8c1b22a5b43c8e671077ed5ac4032abde/compiler/rustc_const_eval/src/check_consts/resolver.rs#L270-L281
…, r=nnethercote

Reserve more capacity for Symbol interner

This avoids some resizing and rehashing. More details in the added comment.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 12, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4dbaa9d 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 Oct 12, 2026
@JonathanBrouwer JonathanBrouwer changed the title Rollup of 4 pull requests Rollup of 4 perf-sensitive pull requests Oct 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

Trying commonly failed jobs
@bors try jobs=dist-various-1,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

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 12, 2026
Rollup of 4 perf-sensitive pull requests


try-job: dist-various-1
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
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 3da648e (3da648e5c933b1328150d17d1542149f6829a5f8)
Base parent: 0093837 (0093837afdf14ec7069c81da19cd51ed7d3476d9)

@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 Oct 12, 2026
@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 2h 49m 35s
Pushing e9bbadf to main...

@rust-bors
rust-bors Bot merged commit e9bbadf into rust-lang:main Oct 12, 2026
16 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 12, 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 d64de46 (parent) -> e9bbadf (this PR)

Test differences

Show 16 test diffs

Stage 1

  • [mir-opt] tests/mir-opt/dataflow-const-prop/union_field.rs: [missing] -> pass (J0)

Stage 2

  • [mir-opt] tests/mir-opt/dataflow-const-prop/union_field.rs: [missing] -> pass (J1)

Additionally, 14 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 e9bbadf6824e65b3583c2dda3a0926ec76df9143 --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. test-i686-msvc: 1h 28m -> 2h 33m (+73.3%)
  2. dist-x86_64-llvm-mingw: 1h 16m -> 2h 4m (+62.7%)
  3. test-x86_64-gnu-stable: 1h 38m -> 2h 39m (+62.5%)
  4. test-armhf-gnu: 1h 2m -> 1h 41m (+60.4%)
  5. test-x86_64-msvc-ext3: 1h 14m -> 1h 57m (+56.9%)
  6. test-x86_64-gnu-tools: 47m 50s -> 1h 11m (+50.0%)
  7. test-x86_64-gnu-llvm-22-2: 1h 10m -> 1h 44m (+49.0%)
  8. dist-powerpc-linux: 1h 6m -> 1h 35m (+44.9%)
  9. dist-x86_64-mingw: 1h 50m -> 2h 40m (+44.8%)
  10. dist-riscv64-linux-musl: 1h 4m -> 1h 30m (+39.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 (e9bbadf): comparison URL.

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

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2% [0.2%, 0.2%] 2
Regressions ❌
(secondary)
0.9% [0.6%, 1.1%] 2
Improvements ✅
(primary)
-0.3% [-0.7%, -0.1%] 67
Improvements ✅
(secondary)
-0.6% [-4.4%, -0.2%] 121
All ❌✅ (primary) -0.2% [-0.7%, 0.2%] 69

Max RSS (memory usage)

Results (primary 1.0%, secondary -2.9%)

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

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
4.7% [2.6%, 6.8%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.4% [-8.4%, -2.2%] 15
All ❌✅ (primary) 1.0% [1.0%, 1.0%] 1

Cycles

Results (secondary 1.2%)

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)
5.3% [3.2%, 7.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.1% [-7.1%, -7.1%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 74
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 53
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 74

Bootstrap: 490.869s -> 490.497s (-0.08%)
Artifact size: 406.63 MiB -> 406.75 MiB (0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 12, 2026
@rust-bors

rust-bors Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#163425 Treat union fields as aliasing each other in value_analysis e89ad7274363e58179342dcf2bf96e10cd2c72dc
(link)
#164074 Avoid cloning impl trait AST nodes in late resolution c5438cd101b090557df8d0243db47bf30a5be12c
(link)
#164089 Implement clone_from for BorrowckDomain 078dd24f1a32e3e47010e7c0b0e796621c031e7a
(link)
#164150 Reserve more capacity for Symbol interner 19d761cb1249642291660234ddd6f64645c58946
(link)

parent commit: d64de46d0a

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage all

@rust-timer

rust-timer commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator
Running triage with 47 benchmarks

Triage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
For this rollup, these benchmarks are:

  • await-call-tree
  • bitmaps-3.2.1
  • cargo-0.87.1
  • clap_derive-4.5.32-nll
  • coercions
  • cranelift-codegen-0.119.0
  • ctfe-stress-5
  • deeply-nested-multi
  • derive
  • diesel-2.2.10
  • diesel-2.2.10-new-solver
  • externs
  • eza-0.21.2
  • helloworld
  • helloworld-tiny
  • html5ever-0.31.0
  • html5ever-0.31.0-new-solver
  • hyper-1.6.0
  • image-0.25.6
  • include-blob
  • issue-46449
  • issue-58319
  • issue-88862
  • large-workspace
  • libc-0.2.172
  • many-assoc-items
  • match-stress
  • nalgebra-0.33.0
  • projection-caching
  • regex-automata-0.4.8
  • regression-31157
  • ripgrep-14.1.1
  • ripgrep-14.1.1-nll
  • serde-1.0.219
  • serde-1.0.219-new-solver
  • serde-1.0.219-nll
  • serde_derive-1.0.219
  • stm32f4-0.15.1
  • syn-2.0.101
  • syn-2.0.101-new-solver
  • token-stream-stress
  • typenum-1.18.0
  • unicode-normalization-0.1.24
  • unify-linearly
  • wf-projection-stress-65510
  • wg-grammar
  • wg-grammar-new-solver

#163425 e89ad72 Treat union fields as aliasing each other in value_analysis

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
Improvements ✅
(primary)
-0.4% [-0.6%, -0.2%] 3
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 35
All ❌✅ (primary) -0.4% [-0.6%, -0.2%] 3

Max RSS (memory usage)

Results (secondary 2.5%)

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

Cycles

Results (primary 1.8%, secondary -3.5%)

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

mean range count
Regressions ❌
(primary)
1.8% [1.5%, 2.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) 1.8% [1.5%, 2.2%] 2

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 83
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 47
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 83

#164074 c5438cd Avoid cloning impl trait AST nodes in late resolution

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.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.3% [-0.6%, -0.1%] 29
Improvements ✅
(secondary)
-0.4% [-0.8%, -0.1%] 40
All ❌✅ (primary) -0.3% [-0.6%, -0.1%] 29

Max RSS (memory usage)

Results (primary 0.8%, secondary 2.6%)

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

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

Cycles

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

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 83
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 47
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 83

#164089 078dd24 Implement clone_from for BorrowckDomain

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
Improvements ✅
(primary)
-0.2% [-0.6%, -0.1%] 21
Improvements ✅
(secondary)
-0.4% [-0.8%, -0.1%] 53
All ❌✅ (primary) -0.2% [-0.6%, -0.1%] 21

Max RSS (memory usage)

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

Cycles

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

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 82
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 47
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 82

#164150 19d761c Reserve more capacity for Symbol interner

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.7%, 1.1%] 2
Improvements ✅
(primary)
-0.4% [-0.7%, -0.2%] 10
Improvements ✅
(secondary)
-0.7% [-4.4%, -0.1%] 90
All ❌✅ (primary) -0.4% [-0.7%, -0.2%] 10

Max RSS (memory usage)

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

Cycles

Results (secondary 0.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)
7.7% [7.7%, 7.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.0% [-7.0%, -7.0%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.1%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 79
Regressions ❌
(secondary)
0.1% [0.0%, 0.2%] 47
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 79

@panstromek

Copy link
Copy Markdown
Contributor

I ran the cachegrind reproducers for helloworld doc json on all these, and they are all get_module_children noise, including the original rollup result. This thing is getting out of hand 😆

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