summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2019-07-05 13:26:05 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2019-07-05 13:26:05 +0000
commite91f86f0ac70be2bfcb3fb862b4e6d9d9f84cf5f (patch)
treef5d1b66d575ed369304540880d3e1bed3a6ac194 /llvm/lib/Transforms/Utils
parent8ca1c65cedb0b86c9706b5ec1a962d80f48af434 (diff)
downloadbcm5719-llvm-e91f86f0ac70be2bfcb3fb862b4e6d9d9f84cf5f.tar.gz
bcm5719-llvm-e91f86f0ac70be2bfcb3fb862b4e6d9d9f84cf5f.zip
Reverted r365188 due to alignment problems on i686-android
llvm-svn: 365206
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionImportUtils.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index c9cc0990f23..8e80ee2c549 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -229,11 +229,11 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
}
}
- // Mark read/write-only variables which can be imported with specific
- // attribute. We can't internalize them now because IRMover will fail
- // to link variable definitions to their external declarations during
- // ThinLTO import. We'll internalize read-only variables later, after
- // import is finished. See internalizeGVsAfterImport.
+ // Mark read-only variables which can be imported with specific attribute.
+ // We can't internalize them now because IRMover will fail to link variable
+ // definitions to their external declarations during ThinLTO import. We'll
+ // internalize read-only variables later, after import is finished.
+ // See internalizeImmutableGVs.
//
// If global value dead stripping is not enabled in summary then
// propagateConstants hasn't been run. We can't internalize GV
@@ -241,8 +241,7 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
if (!GV.isDeclaration() && VI && ImportIndex.withGlobalValueDeadStripping()) {
const auto &SL = VI.getSummaryList();
auto *GVS = SL.empty() ? nullptr : dyn_cast<GlobalVarSummary>(SL[0].get());
- // At this stage "maybe" is "definitely"
- if (GVS && (GVS->maybeReadOnly() || GVS->maybeWriteOnly()))
+ if (GVS && GVS->isReadOnly())
cast<GlobalVariable>(&GV)->addAttribute("thinlto-internalize");
}
OpenPOWER on IntegriCloud