-
Notifications
You must be signed in to change notification settings - Fork 112
Add the parallel front end goal #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
03e68e3
Create parallel-front-end.md
SparrowLii 2463836
Add Team Asks
SparrowLii e46a52e
Update Work items
SparrowLii 8c9e544
Apply suggestion from @petrochenkov
nikomatsakis 200a5f2
Apply suggestions from code review
nikomatsakis 1514f8b
Apply suggestion from @nikomatsakis
nikomatsakis cb5ed4d
Apply suggestion from @nikomatsakis
nikomatsakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Promoting Parallel Front End | ||
|
|
||
| | Metadata | | | ||
| | :--------------- | ---------------------------------------- | | ||
| | Point of contact | @SparrowLii | | ||
| | Status | Proposed | | ||
| | Tracking issue | [rust-lang/rust-project-goals#121] | | ||
| | See also | [rust-lang/rust#113349] | | ||
| | Zulip channel | [#t-compiler/wg-parallel-rustc][channel] | | ||
|
|
||
| ## Summary | ||
|
|
||
| Continue with stabilization and performance improvements to the parallel front-end, continuing from the [2025h2 goal](https://rust-lang.github.io/rust-project-goals/2025h2/parallel-front-end.html). | ||
|
|
||
| ## Motivation | ||
|
|
||
| Verify and resolve the few remaining issues(especially related to incremental compilation), stabilize the feature, and try to further improve parallel compilation performance through various means. | ||
|
|
||
| ### The status quo | ||
|
|
||
| The parallel front-end has progressed well over the past year. We resolved [deadlock] issues and several [ICEs][ICE], added the `rustc-rayon` dependency for the parallel front-end to the rustc working tree, and enabled the parallel front-end in bootstrap. Thanks to everyone for their efforts! | ||
|
|
||
| There are still some issues when the parallel front-end and incremental compilation work together. The most pressing issue we need to address is race conditions of incremental compilation. We have opened related PRs but we still need to spend time to figure out them. | ||
|
|
||
| The inconstancy of query cycle errors between parallel and serial compilers is another point we should pay attention to. | ||
|
|
||
| Furthermore, we do not yet have robust [testing] mechanisms to guarantee correctness and consistence of the parallel front-end. we'll therefore dedicate focused effort toward on a new test suite for parallel front-end. | ||
|
|
||
| In addition, we need to document and enhance the support of surrounding tools for the parallel frontend, such as rustc-perf and Cargo. | ||
|
|
||
| After that, we will start the feature stabilization process to push parallel front end into the stable release channel. | ||
|
|
||
| Performance improvement would be long-term work. We are considering potential measures to speed up the parallel front-end, such as reducing data contention, adopting finer-grained parallelism, and enabling parallel macro expansion. | ||
|
nikomatsakis marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### What we propose to do about it | ||
|
|
||
| - Resolve remaining issues in the issue [list][open issues], especially [the major issue][big issue] related to incremental compilation. | ||
|
nikomatsakis marked this conversation as resolved.
Outdated
|
||
| - Build a parallel front end test suite to ensure the robustness and prevent regressions | ||
| - Enable the parallel front end in Cargo. | ||
| - Add more benchmarks for the parallel front end to rustc-perf | ||
| - Write a feature stabilization report and submit it for compiler FCP | ||
| - Continue improving parallel compilation performance, by parallelizing macro expansion and reducing data contention. | ||
|
nikomatsakis marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
| ### Work items over the next year | ||
|
|
||
| | Task | Owner(s) or team(s) | Notes | | ||
| | ---------------------------- | -------------------- | ----- | | ||
| | Issue Resolving | @wg-parallel-rustc | | | ||
| | Building the test suit | @ywxt | | | ||
| | Tools supporting | @ywxt | | | ||
| | Stabilization report | @SparrowLii | | | ||
| | Discussion and moral support | @wg-parallel-rustc | | | ||
|
|
||
| ## Team asks | ||
|
|
||
| | Team | Support level | Notes | | ||
| | ---------- | ------------- | ----- | | ||
| | [wg-parallel-rustc] | Large | Discussion and Implementation | | ||
| | [compiler] | Small | Code Reviews | | ||
|
|
||
| ## Frequently asked questions | ||
|
|
||
| [channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/ | ||
| [ICE]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+ice | ||
|
nikomatsakis marked this conversation as resolved.
Outdated
|
||
| [deadlock]: https://github.com/rust-lang/rust/issues?q=label%3AA-parallel-compiler+deadlock | ||
| [testing]: https://github.com/rust-lang/rust/issues/118698 | ||
| [open issues]: https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler | ||
| [big issue]: https://github.com/rust-lang/rust/issues/141540 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.