]> git.lizzy.rs Git - rust.git/commit
rustc: Implement incremental "fat" LTO
authorAlex Crichton <alex@alexcrichton.com>
Mon, 11 Feb 2019 15:46:04 +0000 (07:46 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 12 Feb 2019 12:58:31 +0000 (04:58 -0800)
commite983b4f64ee6d919a60938b6e7371a66877f4a23
treecdd3656c996f234cc7f165783c8a80046e9d792f
parenta54b5c7a645ead203d77e78245362f9e0f00dd3c
rustc: Implement incremental "fat" LTO

Currently the compiler will produce an error if both incremental
compilation and full fat LTO is requested. With recent changes and the
advent of incremental ThinLTO, however, all the hard work is already
done for us and it's actually not too bad to remove this error!

This commit updates the codegen backend to allow incremental full fat
LTO. The semantics are that the input modules to LTO are all produce
incrementally, but the final LTO step is always done unconditionally
regardless of whether the inputs changed or not. The only real
incremental win we could have here is if zero of the input modules
changed, but that's so rare it's unlikely to be worthwhile to implement
such a code path.

cc #57968
cc rust-lang/cargo#6643
src/librustc/session/mod.rs
src/librustc_codegen_llvm/back/lto.rs
src/librustc_codegen_llvm/lib.rs
src/librustc_codegen_llvm/llvm/ffi.rs
src/librustc_codegen_ssa/back/write.rs
src/librustc_codegen_ssa/traits/write.rs
src/rustllvm/PassWrapper.cpp
src/test/incremental/lto.rs [new file with mode: 0644]