Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc: Move bytecode compression into codegen #45399
Conversation
rust-highfive
assigned
arielb1
Oct 20, 2017
This comment has been minimized.
This comment has been minimized.
|
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
I'm sort of perpetually unhappy with how no matter what I do the management of filenames in the backend is confusing, but hopefully it's a little less confusing than before? |
rust-highfive
assigned
michaelwoerister
and unassigned
arielb1
Oct 20, 2017
kennytm
added
the
S-waiting-on-author
label
Oct 20, 2017
michaelwoerister
approved these changes
Oct 20, 2017
|
Great find! The new parallelization and caching should definitely be a win here. The only downside I can see is that this will increase the size of the incr. cache. But hopefully we can get rid of bitcode compression entirely at some point by switching to MIR-only RLIBs. r=me modulo nits and fixing the test case. |
| @@ -1157,17 +1183,20 @@ fn execute_work_item(cgcx: &CodegenContext, | |||
| err)); | |||
| } | |||
| } | |||
| *slot = Some(obj_out); | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Oh actually we're no longer storing uncompressed bytecode in the cache (as that's not needed for the linking stage), but default builds (those without fancy |
This comment has been minimized.
This comment has been minimized.
We'll probably have to start doing that for ThinLTO, right? |
This comment has been minimized.
This comment has been minimized.
|
Heh I've thought very little about how ThinLTO interacts with incremental compilation :) In theory there's a lot of possible wins to gain there (fully incremental release builds) but I think we've got a good bit of support on the LLVM side of things to sort out before that works. |
alexcrichton
force-pushed the
alexcrichton:compress-parallel
branch
from
5a183e4
to
3bfa312
Oct 20, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors: r=michaelwoerister |
This comment has been minimized.
This comment has been minimized.
|
|
kennytm
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Oct 20, 2017
alexcrichton
force-pushed the
alexcrichton:compress-parallel
branch
2 times, most recently
from
2effe64
to
9963d13
Oct 20, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors: r=michaelwoerister |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
kennytm
added
S-waiting-on-author
and removed
S-waiting-on-bors
labels
Oct 21, 2017
alexcrichton
force-pushed the
alexcrichton:compress-parallel
branch
from
9963d13
to
8197a0b
Oct 21, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors: r=michaelwoerister |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added a commit
that referenced
this pull request
Oct 21, 2017
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 8197a0b
into
rust-lang:master
Oct 22, 2017
This comment has been minimized.
This comment has been minimized.
|
This seems to have brought some nice performance improvements: http://perf.rust-lang.org/compare.html?start=4279e2b4c14dc90191595c97ad3a019d618e7158&end=9ea3878dfec9b20993eaebfdb7566b29e49c52ab&stat=wall-time But they were eaten up immediately by switching to ThinLTO in the next PR |
alexcrichton commentedOct 20, 2017
This commit moves compression of the bytecode from the
linkmodule to thewritemodule, namely allowing it to be (a) cached by incremental compilationand (b) produced in parallel. The parallelization may show up as some nice wins
during normal compilation and the caching in incremental mode should be
beneficial for incremental compiles! (no more need to recompress the entire
crate's bitcode on all builds)