diff options
author | Eugene Leviant <eleviant@accesssoftek.com> | 2017-12-12 09:12:32 +0000 |
---|---|---|
committer | Eugene Leviant <eleviant@accesssoftek.com> | 2017-12-12 09:12:32 +0000 |
commit | 36951833955cf16dee56096dda38abe249e32b4e (patch) | |
tree | 0f0ee3642da3ee74dc5a7a3fa7b2f14dc2ebbe19 /llvm/lib/Transforms/IPO/FunctionImport.cpp | |
parent | 927b31600e2b582d13a5573d4449e28d94b7713a (diff) | |
download | bcm5719-llvm-36951833955cf16dee56096dda38abe249e32b4e.tar.gz bcm5719-llvm-36951833955cf16dee56096dda38abe249e32b4e.zip |
[ThinLTO] Remove unused code from thinLTOInternalizeModule
Differential revision: https://reviews.llvm.org/D40970
llvm-svn: 320464
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 3a1d6de342f..043a04696ff 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -642,23 +642,9 @@ void llvm::thinLTOResolveWeakForLinkerModule( /// 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()) { |