8000 attempt to recover perf by removing `exports_all_green` by pnkfelix · Pull Request #71267 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

attempt to recover perf by removing exports_all_green #71267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.)
  • Loading branch information
pnkfelix committed Apr 17, 2020
commit 1abfd4ab2358a3bbaf4bd420fc75eb1cf348d067
15 changes: 5 additions & 10 deletions src/librustc_codegen_llvm/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand All @@ -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();
Expand Down
0