diff options
| author | bors <bors@rust-lang.org> | 2018-09-03 13:59:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-03 13:59:57 +0000 |
| commit | ee73f80dc963707df3b3da82976556d64cac5752 (patch) | |
| tree | 95b4ebd6c5b993d4c4c4ab8d3ce4b2c3913fad84 /src/librustc_incremental | |
| parent | 591a17d3d90d6cab51200a0e696f0d8ca63c2f87 (diff) | |
| parent | 21d05f64aa10fd15208bd6d96599275b044a0636 (diff) | |
| download | rust-ee73f80dc963707df3b3da82976556d64cac5752.tar.gz rust-ee73f80dc963707df3b3da82976556d64cac5752.zip | |
Auto merge of #53673 - michaelwoerister:incr-thinlto-2000, r=alexcrichton
Enable ThinLTO with incremental compilation. This is an updated version of #52309. This PR allows `rustc` to use (local) ThinLTO and incremental compilation at the same time. In theory this should allow for getting compile-time improvements for small changes while keeping the runtime performance of the generated code roughly the same as when compiling non-incrementally. The difference to #52309 is that this version also caches the pre-LTO version of LLVM bitcode. This allows for another layer of caching: 1. if the module itself has changed, we have to re-codegen and re-optimize. 2. if the module itself has not changed, but a module it imported from during ThinLTO has, we don't need to re-codegen and don't need to re-run the first optimization phase. Only the second (i.e. ThinLTO-) optimization phase is re-run. 3. if neither the module itself nor any of its imports have changed then we can re-use the final, post-ThinLTO version of the module. (We might have to load its pre-ThinLTO version though so it's available for other modules to import from)
Diffstat (limited to 'src/librustc_incremental')
| -rw-r--r-- | src/librustc_incremental/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustc_incremental/persist/mod.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs index e100b49c7f2..4ffd726c1d4 100644 --- a/src/librustc_incremental/lib.rs +++ b/src/librustc_incremental/lib.rs @@ -44,6 +44,7 @@ pub use persist::copy_cgu_workproducts_to_incr_comp_cache_dir; pub use persist::save_dep_graph; pub use persist::save_work_product_index; pub use persist::in_incr_comp_dir; +pub use persist::in_incr_comp_dir_sess; pub use persist::prepare_session_directory; pub use persist::finalize_session_directory; pub use persist::delete_workproduct_files; diff --git a/src/librustc_incremental/persist/mod.rs b/src/librustc_incremental/persist/mod.rs index e1f00db56d5..17d36ba3fa7 100644 --- a/src/librustc_incremental/persist/mod.rs +++ b/src/librustc_incremental/persist/mod.rs @@ -23,6 +23,7 @@ mod file_format; pub use self::fs::finalize_session_directory; pub use self::fs::garbage_collect_session_directories; pub use self::fs::in_incr_comp_dir; +pub use self::fs::in_incr_comp_dir_sess; pub use self::fs::prepare_session_directory; pub use self::load::dep_graph_tcx_init; pub use self::load::load_dep_graph; |
