[PATCH] D74751: [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker()

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 15:35:03 PST 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/LTO/ThinLTOCodeGenerator.cpp:214
 
-  FunctionImporter Importer(Index, Loader);
+  FunctionImporter Importer(Index, Loader, false);
   Expected<bool> Result = Importer.importFunctions(TheModule, ImportList);
----------------
tejohnson wrote:
> It seems like we'd want to do the same thing here in the old LTO API whenever we have a TM (some of the callers of these routines do).
Added some comments.

May I ask what is the old LTO API? Are most functions in ThinLTOCodeGenerator.cpp related to the old LTO API?

I try passing ClearDSOLocalOnDeclarations as long as the information is available. `llvm-lto.cpp:707` `ThinGenerator.crossModuleImport(*TheModule, *Index, *Input);` does not pass the information.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74751/new/

https://reviews.llvm.org/D74751





More information about the llvm-commits mailing list