-
Notifications
You must be signed in to change notification settings - Fork 74
Add parallel front end goal in 25h2 #330
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,75 @@ | ||||||
# Promoting Parallel Front End | ||||||
|
||||||
| Metadata | | | ||||||
| :--------------- | ------------------------------------------------- | | ||||||
| Point of contact | @SparrowLii | | ||||||
| Teams | <!-- TEAMS WITH ASKS --> | | ||||||
| Task owners | <!-- TASK OWNERS --> | | ||||||
| Status | Proposed | | ||||||
| Tracking issue | [https://github.com/rust-lang/rust/issues/113349] | | ||||||
| Zulip channel | [#t-compiler/wg-parallel-rustc][channel] | | ||||||
|
||||||
[channel]: https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/ | ||||||
|
||||||
|
||||||
## Summary | ||||||
|
||||||
Continue to parallelize front-end stabilization and performance improvements, continuing from the [2025h1 goal](https://rust-lang.github.io/rust-project-goals/2025h1/parallel-front-end.html). | ||||||
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
||||||
## Motivation | ||||||
|
||||||
Verify and resolve the few remaining deadlock and other issues, stabilize the features, and try to further improve the parallel compilation performance through several means. | ||||||
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
||||||
### The status quo | ||||||
|
||||||
Parallel front end progressed well in the first half of the year. We resolved the deadlock issue caused by the deadlock handler, added the rustc-rayon that the parallel front end depends on to the rustc working tree, and optimized the work-stealing scheduling algorithm to avoid deadlocks in the parallelization of rustc queries. | ||||||
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
||||||
Next we need to resolve and verify the remaining issue list, improve the parallel front end test suit, and include all known issues in the ui tests to ensure the stability of the features. | ||||||
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
||||||
Then we will start the feature stabilization process to push parallel front end into the stable version. | ||||||
|
||||||
In addition, there are already contributors working on improving the performance of the parallel front end, such as trying to parallelize the macro expansion process, analysing data contention in query calls, etc. (thank you very much). We will conduct more detailed analysis and implementation of these directions in the second half of the year. | ||||||
|
||||||
In addition, we need to document and enhance the support of surrounding tools for parallel frontends, such as bootstrap, rustc-perf, and Cargo. | ||||||
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
||||||
### The next 6 months | ||||||
|
||||||
- Resolve the remaining issues in the issue [list](https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler). Most of them have been solved, but are lack of ways to ensure stability. | ||||||
|
- Resolve the remaining issues in the issue [list](https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler). Most of them have been solved, but are lack of ways to ensure stability. | |
- Resolve the remaining issues in the issue [list](https://github.com/rust-lang/rust/issues?q=state%3Aopen%20label%3AA-parallel-compiler). Most of them have been solved, but are missing tests ensuring that the code won't regress again. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Land the parallel front end test [suite](https://github.com/rust-lang/rust/pull/132051) to ensure the robustness and prevent various issues from occurring again. | |
- Land the parallel front end [test suite](https://github.com/rust-lang/rust/pull/132051) to ensure the robustness and prevent various issues from occurring again. |
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
SparrowLii marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a couple more items
- Enable the parallel frontend by default on nightly, but not on stable, for preliminary testing (similarly to LLD)
- Write stabilization report for the feature and submit it for compiler FCP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you and your team planning to work on this project goal with sparrow? Just the 6 items in sparrow's list seem like a good chunk of work for a single person.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you and your team planning to work on this project goal with sparrow? Just the 6 items in sparrow's list seem like a good chunk of work for a single person.
Hopefully.
I just think a visible push for stabilization, initial stabilization report, and enabling it on nightly should happen sooner than many other items on the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added the second one.
And enable it by default (even in nightly) might require more statistics, as it may cause performance regressions compared to single-threaded in many cases.
Uh oh!
There was an error while loading. Please reload this page.