about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2020-04-17 16:04:59 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2020-04-20 15:48:18 -0400
commit2b08d7ff30882f22223bc813b9e3bf5e25ab885d (patch)
treeeeea223aadb6225d9bf6a39300a573a93e157be0
parente900622ecfcf65b7d1d42bd292bc2fb2c97add65 (diff)
downloadrust-2b08d7ff30882f22223bc813b9e3bf5e25ab885d.tar.gz
rust-2b08d7ff30882f22223bc813b9e3bf5e25ab885d.zip
Issue #71248: attempt to recover perf by removing `exports_all_green` flag.
(My hypothesis is that my use of this flag was an overly conservative
generalization of PR 67020.)
-rw-r--r--src/librustc_codegen_llvm/back/lto.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs
index 447ba8c8a8a..329b0a837ab 100644
--- a/src/librustc_codegen_llvm/back/lto.rs
+++ b/src/librustc_codegen_llvm/back/lto.rs
@@ -500,11 +500,11 @@ fn thin_lto(
             let module_name = module_name_to_str(module_name);
 
             // If (1.) the module hasn't changed, and (2.) none of the modules
-            // it imports from nor exports to have changed, *and* (3.) the
-            // import and export sets themselves have not changed from the
-            // previous compile when it was last ThinLTO'ed, then we can re-use
-            // the post-ThinLTO version of the module. Otherwise, freshly
-            // perform LTO optimization.
+            // it imports from have changed, *and* (3.) the import and export
+            // sets themselves have not changed from the previous compile when
+            // it was last ThinLTO'ed, then we can re-use the post-ThinLTO
+            // version of the module. Otherwise, freshly perform LTO
+            // optimization.
             //
             // (Note that globally, the export set is just the inverse of the
             // import set.)
@@ -531,13 +531,8 @@ fn thin_lto(
                 let imports_all_green = curr_imports
                     .iter()
                     .all(|imported_module| green_modules.contains_key(imported_module));
-                let exports_all_green = curr_exports
-                    .iter()
-                    .all(|exported_module| green_modules.contains_key(exported_module));
-
                 if imports_all_green
                     && equivalent_as_sets(prev_imports, curr_imports)
-                    && exports_all_green
                     && equivalent_as_sets(prev_exports, curr_exports)
                 {
                     let work_product = green_modules[module_name].clone();