Skip to content

Parallelize AST -> HIR lowering - #163495

Open
aerooneqq wants to merge 1 commit into
rust-lang:mainfrom
aerooneqq:parallel-ast-hir-lowering
Open

aerooneqq wants to merge 1 commit into
rust-lang:mainfrom
aerooneqq:parallel-ast-hir-lowering

Conversation

@aerooneqq

@aerooneqq aerooneqq commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

Parallelize AST -> HIR lowering.

r? @petrochenkov

@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 Sep 29, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 29, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 79a91eb (79a91eb0736d9f47b5af3d4282e49ada6baa01ca)
Base parent: ea6bb45 (ea6bb45b74c24a026dab4187b1550e97b6985c8a)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (79a91eb): comparison URL.

Overall result: ❌ regressions - 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.9% [0.2%, 9.2%] 88
Regressions ❌
(secondary)
1.3% [0.1%, 7.4%] 172
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) 0.9% [-0.2%, 9.2%] 89

Max RSS (memory usage)

Results (primary 1.2%, secondary 0.4%)

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.1%, 2.8%] 4
Regressions ❌
(secondary)
3.3% [1.7%, 7.2%] 10
Improvements ✅
(primary)
-0.9% [-0.9%, -0.9%] 1
Improvements ✅
(secondary)
-4.5% [-5.9%, -2.7%] 6
All ❌✅ (primary) 1.2% [-0.9%, 2.8%] 5

Cycles

Results (primary 11.0%, secondary 2.7%)

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

mean range count
Regressions ❌
(primary)
11.0% [2.2%, 28.4%] 13
Regressions ❌
(secondary)
4.8% [2.2%, 9.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) 11.0% [2.2%, 28.4%] 13

Binary size

Results (primary -0.1%, 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.2% [0.2%, 0.2%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 4
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 4
All ❌✅ (primary) -0.1% [-0.3%, 0.2%] 8

Bootstrap: 489.575s -> 491.192s (0.33%)
Artifact size: 406.37 MiB -> 407.23 MiB (0.21%)

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

Kobzol commented Sep 30, 2026

Copy link
Copy Markdown
Member

Pretty nice results!

@rust-log-analyzer

This comment has been minimized.

@aerooneqq

aerooneqq commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Parallelization of AST -> HIR lowering broke deterministic encoding of syntax contexts 🤣 (#161450).
UPD: not that sure about that, maybe some other parts of metadata causing it, will research it.

@petrochenkov

Copy link
Copy Markdown
Contributor

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

This comment has been minimized.

@rust-bors

rust-bors Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 335f660 (335f660f9c0a0a3b69b6e32858af6d7f3af36c51)
Base parent: 7d2cd0f (7d2cd0fbc092625ea371da704f15f80216d2220e)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (335f660): 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.7% [0.2%, 1.1%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.8%, -0.7%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-0.8%, 1.1%] 11

Max RSS (memory usage)

Results (primary -3.1%, secondary -2.7%)

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.8%, 1.8%] 1
Regressions ❌
(secondary)
2.1% [2.0%, 2.2%] 2
Improvements ✅
(primary)
-3.1% [-7.8%, -1.2%] 118
Improvements ✅
(secondary)
-3.1% [-5.2%, -1.4%] 23
All ❌✅ (primary) -3.1% [-7.8%, 1.8%] 119

Cycles

Results (primary 14.6%, secondary -2.7%)

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

mean range count
Regressions ❌
(primary)
14.6% [4.4%, 27.7%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-3.0%, -2.5%] 3
All ❌✅ (primary) 14.6% [4.4%, 27.7%] 9

Binary size

Results (primary -0.0%, 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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 9
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 5
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 9

Bootstrap: 489.84s -> 488.516s (-0.27%)
Artifact size: 406.54 MiB -> 406.46 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 30, 2026
@oli-obk oli-obk self-assigned this Oct 2, 2026
@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Oct 29, 2026
@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

This comment has been minimized.

@aerooneqq
aerooneqq force-pushed the parallel-ast-hir-lowering branch from 9efc5bc to f7755c8 Compare October 29, 2026 08:41

@oli-obk oli-obk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

📋 This PR cannot be approved because it currently has the following label: S-blocked.

@petrochenkov

Copy link
Copy Markdown
Contributor

#162848 is getting delayed, so let's merge this one, it can be easily reverted if it causes issues.
@bors r=petrochenkov,oli-obk

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📋 This PR cannot be approved because it currently has the following label: S-blocked.

@petrochenkov petrochenkov removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Nov 3, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r=petrochenkov,oli-obk

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f7755c8 has been approved by petrochenkov,oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…g, r=petrochenkov,oli-obk

Parallelize AST -> HIR lowering

Parallelize AST -> HIR lowering.

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
…uwer

Rollup of 20 pull requests

Successful merges:

 - #149245 (Make inline attributes apply to the generated `poll` in async fn)
 - #163495 (Parallelize AST -> HIR lowering)
 - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added)
 - #165109 (Avoid building a region map when erasing bound regions)
 - #163393 (std: Use getexecpath() for current_exe() on OpenBSD)
 - #163625 (Add a lint helper attribute namespace )
 - #164414 (Add `let_underscore_drop_guard` lint.)
 - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint)
 - #165351 (delegation: insert probing adjustments before args check adjustments)
 - #165358 (Reenable some cg_gcc tests that were disabled)
 - #165377 (Make `no_implicit_prelude` not suppress tool attributes)
 - #165397 (Add codegen test for unused match arms removed after inlining)
 - #165398 (Rework parallel reproducibility tests)
 - #162608 (Avoid oscillating line wrapping due to symbol indices)
 - #164241 (make the safety documentation consistent in Ptr module)
 - #165029 (Use `MalformedLintAttributeInput` in more places)
 - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test)
 - #165230 (Fix rigidity assertion ICE)
 - #165293 (unstable-book: update default-visibility.md to link to tracking issue)
 - #165374 (Refactorings in preparation for the move trait)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…g, r=petrochenkov,oli-obk

Parallelize AST -> HIR lowering

Parallelize AST -> HIR lowering.

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #165416 (fix unsoundness when compiling `[diverging_const; 0]`)
 - #149245 (Make inline attributes apply to the generated `poll` in async fn)
 - #163495 (Parallelize AST -> HIR lowering)
 - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added)
 - #165109 (Avoid building a region map when erasing bound regions)
 - #163393 (std: Use getexecpath() for current_exe() on OpenBSD)
 - #163625 (Add a lint helper attribute namespace )
 - #164414 (Add `let_underscore_drop_guard` lint.)
 - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint)
 - #165351 (delegation: insert probing adjustments before args check adjustments)
 - #165358 (Reenable some cg_gcc tests that were disabled)
 - #165377 (Make `no_implicit_prelude` not suppress tool attributes)
 - #165397 (Add codegen test for unused match arms removed after inlining)
 - #165398 (Rework parallel reproducibility tests)
 - #162608 (Avoid oscillating line wrapping due to symbol indices)
 - #164241 (make the safety documentation consistent in Ptr module)
 - #165029 (Use `MalformedLintAttributeInput` in more places)
 - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test)
 - #165230 (Fix rigidity assertion ICE)
 - #165293 (unstable-book: update default-visibility.md to link to tracking issue)
 - #165374 (Refactorings in preparation for the move trait)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 3, 2026
…g, r=petrochenkov,oli-obk

Parallelize AST -> HIR lowering

Parallelize AST -> HIR lowering.

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
…uwer

Rollup of 20 pull requests

Successful merges:

 - #149245 (Make inline attributes apply to the generated `poll` in async fn)
 - #163495 (Parallelize AST -> HIR lowering)
 - #164304 ([perf] Reuse CanonicalVarKinds if no new variables were added)
 - #165109 (Avoid building a region map when erasing bound regions)
 - #163393 (std: Use getexecpath() for current_exe() on OpenBSD)
 - #163625 (Add a lint helper attribute namespace )
 - #164414 (Add `let_underscore_drop_guard` lint.)
 - #165342 (Avoid unnecessary MIR traversals in CheckPackedRef lint)
 - #165351 (delegation: insert probing adjustments before args check adjustments)
 - #165358 (Reenable some cg_gcc tests that were disabled)
 - #165377 (Make `no_implicit_prelude` not suppress tool attributes)
 - #165397 (Add codegen test for unused match arms removed after inlining)
 - #165398 (Rework parallel reproducibility tests)
 - #162608 (Avoid oscillating line wrapping due to symbol indices)
 - #164241 (make the safety documentation consistent in Ptr module)
 - #165029 (Use `MalformedLintAttributeInput` in more places)
 - #165203 (AIX: Implement TLS destructor guard in std and update dynamic-loading-cdylib test)
 - #165230 (Fix rigidity assertion ICE)
 - #165293 (unstable-book: update default-visibility.md to link to tracking issue)
 - #165374 (Refactorings in preparation for the move trait)
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors try jobs=test-x86_64-gnu-parallel-frontend

rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
Parallelize AST -> HIR lowering


try-job: test-x86_64-gnu-parallel-frontend
@rust-bors

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
Member

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #165426 (comment)

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

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#165426), which was unapproved.

View changes since this unapproval

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5863e56 failed: CI. Failed job:

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

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-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.

8 participants