Skip to content

Merge BuildReducedGraphVisitor into DefPathVisitor#154945

Draft
oli-obk wants to merge 21 commits intorust-lang:mainfrom
oli-obk:merge-visitors-def-collector-brg
Draft

Merge BuildReducedGraphVisitor into DefPathVisitor#154945
oli-obk wants to merge 21 commits intorust-lang:mainfrom
oli-obk:merge-visitors-def-collector-brg

Conversation

@oli-obk
Copy link
Copy Markdown
Contributor

@oli-obk oli-obk commented Apr 7, 2026

These two visitors run right after each other on the same immutable AST. There's also a hash map for transferring the TyCtxtFeed created in the def collector to the BRG when it visits the same items. There are possibly more avenues for sharing logic, but I want to keep this PR simple.

only opening for perf runs for now. I'm still investigating how to ensure that future changes don't introduce subtle bugs by forgetting that def collection and reduced graph building are one pass now

Best reviewed commit-by-commit. I took a lot of care for making the individual changes reviewable, but all the Merge * commits aren't able to compile libcore until the last one.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 7, 2026
@oli-obk
Copy link
Copy Markdown
Contributor Author

oli-obk commented Apr 7, 2026

@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 Apr 7, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
@oli-obk oli-obk changed the title Merge visitors def collector brg Merge BuildReducedGraphVisitor into DefPathVisitor Apr 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

☀️ Try build successful (CI)
Build commit: 5d54692 (5d5469299abfae0527f2b94b434252c5a94a80a3, parent: 49b6ac01d6f4c3da812039ae846407a20961aa4c)

@rust-timer

This comment has been minimized.

@petrochenkov petrochenkov self-assigned this Apr 7, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5d54692): 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
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 19
Improvements ✅
(secondary)
-0.3% [-0.5%, -0.1%] 15
All ❌✅ (primary) -0.3% [-0.5%, -0.1%] 19

Max RSS (memory usage)

Results (primary 1.9%, secondary 2.0%)

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.4%, 2.3%] 3
Regressions ❌
(secondary)
3.0% [1.0%, 4.5%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.0% [-5.0%, -5.0%] 1
All ❌✅ (primary) 1.9% [1.4%, 2.3%] 3

Cycles

Results (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)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-3.7%, -3.7%] 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.1%] 63
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 24
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.1%] 63

Bootstrap: 487.434s -> 486.262s (-0.24%)
Artifact size: 395.10 MiB -> 395.19 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 7, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 8, 2026

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

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants