Uh oh!
There was an error while loading. Please reload this page.
Compile some CGUs in parallel at the start of codegen - #67889
Conversation
michaelwoerister
left a comment
There was a problem hiding this comment.
Looks good to me with nits addressed.
I hope we really can get rid of OnGoingCodegen entirely at some point.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
michaelwoerister
commented
Jan 6, 2020
Heads up, @bjorn3: This PR changes the codegen backend protocol. |
bjorn3
commented
Jan 6, 2020
Thanks for the ping @michaelwoerister! This is in a part which I don't yet use though. Because cranelift-module compiles a function as soon as you define it, isn't possible for me to use multiple threads until there are parallel rustc builds for every nightly. |
bors
commented
Jan 6, 2020
☔ The latest upstream changes (presumably #67886) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Jan 7, 2020
This looks like a nice small improvement! In the limit I'm looking forward to when we can fully reap the benefits here, including:
I don't think we can get here until we remove the single-threaded compiler completely though. While this is adding complexity to an already complex backend it's not too too bad and has some modest wins. I think the biggest wins though are going to come when we're able to remove the coordinator thread entirely. |
michaelwoerister
commented
Jan 9, 2020
Thanks, @Zoxc. @bors r+ I'm r+ing under the assumption that the job server questions is resolved to @Mark-Simulacrum's and @alexcrichton's satisfaction. I don't know the details there. |
bors
commented
Jan 9, 2020
📌 Commit e3a36c0d78c69ea59a6bde4bae0729dc3545a7b4 has been approved by |
bors
commented
Jan 9, 2020
☔ The latest upstream changes (presumably #67988) made this pull request unmergeable. Please resolve the merge conflicts. |
Zoxc
commented
Jan 9, 2020
@bors r=michaelwoerister |
bors
commented
Jan 9, 2020
📌 Commit 69bacd0 has been approved by |
Compile some CGUs in parallel at the start of codegen This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`. Based on rust-lang#67777. r? @michaelwoerister cc @alexcrichton@Mark-Simulacrum
Compile some CGUs in parallel at the start of codegen This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`. Based on rust-lang#67777. r? @michaelwoerister cc @alexcrichton@Mark-Simulacrum
Rollup of 9 pull requests Successful merges: - #67000 (Promote references to constants instead of statics) - #67756 (Collector tweaks) - #67889 (Compile some CGUs in parallel at the start of codegen) - #67930 (Rename Result::as_deref_ok to as_deref) - #68018 (feature_gate: Remove `GateStrength`) - #68070 (clean up E0185 explanation) - #68072 (Fix ICE #68058) - #68114 (Don't require `allow_internal_unstable` unless `staged_api` is enabled.) - #68120 (Ban `...X` pats, harden tests, and improve diagnostics) Failed merges: r? @ghost
Compile some CGUs in parallel at the start of codegen This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`. Based on rust-lang#67777. r? @michaelwoerister cc @alexcrichton@Mark-Simulacrum
Rollup of 8 pull requests Successful merges: - #67756 (Collector tweaks) - #67889 (Compile some CGUs in parallel at the start of codegen) - #67930 (Rename Result::as_deref_ok to as_deref) - #68018 (feature_gate: Remove `GateStrength`) - #68070 (clean up E0185 explanation) - #68072 (Fix ICE #68058) - #68114 (Don't require `allow_internal_unstable` unless `staged_api` is enabled.) - #68120 (Ban `...X` pats, harden tests, and improve diagnostics) Failed merges: r? @ghost
This brings the compilation time for
syntex_syntaxfrom 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compilingnCGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least forsyntex_syntax.Based on #67777.
r? @michaelwoerister
cc @alexcrichton@Mark-Simulacrum