summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/FunctionImport.cpp
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2017-12-18 10:53:45 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2017-12-18 10:53:45 +0000
commitc95b49603ea3f3ee2b41676f8c9ae3ac682786fd (patch)
tree952186f983b897ad19256256f2911fd359c22651 /llvm/lib/Transforms/IPO/FunctionImport.cpp
parent9b95b32323ccce747c5b213fe17923f7d423841b (diff)
downloadbcm5719-llvm-c95b49603ea3f3ee2b41676f8c9ae3ac682786fd.tar.gz
bcm5719-llvm-c95b49603ea3f3ee2b41676f8c9ae3ac682786fd.zip
[ThinLTO] Remove unused code
This is a re-commit of r320464, after patch for gold plugin was landed. llvm-svn: 320968
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index 927c4f54b9c..b6d6201cd23 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -678,23 +678,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()) {
OpenPOWER on IntegriCloud