Skip to content

Commit 1abfd4a

Browse files
committed
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.)
1 parent 8d67f57 commit 1abfd4a

File tree

1 file changed

+5
-10
lines changed
  • src/librustc_codegen_llvm/back

1 file changed

+5
-10
lines changed

src/librustc_codegen_llvm/back/lto.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,11 @@ fn thin_lto(
500500
let module_name = module_name_to_str(module_name);
501501

502502
// If (1.) the module hasn't changed, and (2.) none of the modules
503-
// it imports from nor exports to have changed, *and* (3.) the
504-
// import and export sets themselves have not changed from the
505-
// previous compile when it was last ThinLTO'ed, then we can re-use
506-
// the post-ThinLTO version of the module. Otherwise, freshly
507-
// perform LTO optimization.
503+
// it imports from have changed, *and* (3.) the import and export
504+
// sets themselves have not changed from the previous compile when
505+
// it was last ThinLTO'ed, then we can re-use the post-ThinLTO
506+
// version of the module. Otherwise, freshly perform LTO
507+
// optimization.
508508
//
509509
// (Note that globally, the export set is just the inverse of the
510510
// import set.)
@@ -531,13 +531,8 @@ fn thin_lto(
531531
let imports_all_green = curr_imports
532532
.iter()
533533
.all(|imported_module| green_modules.contains_key(imported_module));
534-
let exports_all_green = curr_exports
535-
.iter()
536-
.all(|exported_module| green_modules.contains_key(exported_module));
537-
538534
if imports_all_green
539535
&& equivalent_as_sets(prev_imports, curr_imports)
540-
&& exports_all_green
541536
&& equivalent_as_sets(prev_exports, curr_exports)
542537
{
543538
let work_product = green_modules[module_name].clone();

0 commit comments

Comments
 (0)