[PATCH] D40970: [ThinLTO] Remove unused (?) code from thinLTOInternalizeModule

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 01:13:15 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL320464: [ThinLTO] Remove unused code from thinLTOInternalizeModule (authored by evgeny777).

Changed prior to commit:
  https://reviews.llvm.org/D40970?vs=125990&id=126509#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D40970

Files:
  llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp


Index: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
@@ -642,23 +642,9 @@
 /// Run internalization on \p TheModule based on symmary analysis.
 void llvm::thinLTOInternalizeModule(Module &TheModule,
                                     const GVSummaryMapTy &DefinedGlobals) {
-  // Parse inline ASM and collect the list of symbols that are not defined in
-  // the current module.
-  StringSet<> AsmUndefinedRefs;
-  ModuleSymbolTable::CollectAsmSymbols(
-      TheModule,
-      [&AsmUndefinedRefs](StringRef Name, object::BasicSymbolRef::Flags Flags) {
-        if (Flags & object::BasicSymbolRef::SF_Undefined)
-          AsmUndefinedRefs.insert(Name);
-      });
-
   // Declare a callback for the internalize pass that will ask for every
   // candidate GlobalValue if it can be internalized or not.
   auto MustPreserveGV = [&](const GlobalValue &GV) -> bool {
-    // Can't be internalized if referenced in inline asm.
-    if (AsmUndefinedRefs.count(GV.getName()))
-      return true;
-
     // Lookup the linkage recorded in the summaries during global analysis.
     auto GS = DefinedGlobals.find(GV.getGUID());
     if (GS == DefinedGlobals.end()) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40970.126509.patch
Type: text/x-patch
Size: 1337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171212/75826324/attachment.bin>


More information about the llvm-commits mailing list