summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/FunctionImport.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2018-03-09 01:25:18 +0000
committerEric Christopher <echristo@gmail.com>2018-03-09 01:25:18 +0000
commit3caa0fd05099bba12f5630c3f2eeceec9a799eec (patch)
tree3a034b77a46f96d91964c044c19400bafaef9369 /llvm/lib/Transforms/IPO/FunctionImport.cpp
parent784f1bbf5e51d041f2ea811a2d593e8dfad3033f (diff)
downloadbcm5719-llvm-3caa0fd05099bba12f5630c3f2eeceec9a799eec.tar.gz
bcm5719-llvm-3caa0fd05099bba12f5630c3f2eeceec9a799eec.zip
Revert "[ThinLTO] Keep available_externally symbols live"
This reverts commit r327041 and the followup attempts at fixing the testcase as they're still failing. llvm-svn: 327094
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionImport.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index c106f1105e7..b68058cbeea 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -544,25 +544,9 @@ void llvm::computeDeadSymbols(
if (S->isLive())
return;
- // We only keep live symbols that are known to be non-prevailing if any are
- // available_externally. Those symbols are discarded later in the
- // EliminateAvailableExternally pass and setting them to not-live breaks
- // downstreams users of liveness information (PR36483).
- if (isPrevailing(VI.getGUID()) == PrevailingType::No) {
- bool AvailableExternally = false;
- for (auto &S : VI.getSummaryList())
- if (S->linkage() == GlobalValue::AvailableExternallyLinkage)
- AvailableExternally = true;
-
- if (!AvailableExternally)
- return;
-
-#ifndef NDEBUG
- for (auto &S : VI.getSummaryList())
- assert(!GlobalValue::isInterposableLinkage(S->linkage()) &&
- "Symbol with interposable and available_externally linkages");
-#endif
- }
+ // We do not keep live symbols that are known to be non-prevailing.
+ if (isPrevailing(VI.getGUID()) == PrevailingType::No)
+ return;
for (auto &S : VI.getSummaryList())
S->setLive(true);
OpenPOWER on IntegriCloud