-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Parallelize some phases of compilation between a crate and its dependency #3431
Comments
Added far-future milestone |
LLVM is now used threadsafely. Still relevant, though I'm not sure how you plan to actually link the crate... |
There's a lot of potential for parallel compilation in LLVM itself. The function pass is an embarrassingly parallel task since it runs on each function in isolation. http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063826.html I think this would be a huge win for us. |
Triage: no change, and the LLVM parallel function pass patch seems dead: http://llvm-reviews.chandlerc.com/D1152 |
Cargo now provides a multi-crate compilation manager, so the remaining task here is to improve parallelism between The hardest part of this may be the dynamic job management to balance CPU utilization and peak RAM use when many |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#610 |
With a single driver building multiple crates we can start running more parts of the compilation process in parallel.
The basic idea is to output the metadata about a crate before code generation so that the next compile can proceed based on that metadata.
rustc gets modified in a few ways:
The end result is that parsing and analysis will be largely done in parallel with code generation for multi-crate builds.
Beyond that we can also parse all crates in parallel.
This would require that we make sure we are using LLVM in a threadsafe way, unless we can get all the trans passes onto a single thread.
Related to #2237
The text was updated successfully, but these errors were encountered: