summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-02-05 17:17:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-02-05 17:17:51 +0000
commitb4edfb9af93c39f448ac649edff3be4d17263297 (patch)
treec25cddc1a2e1c106dd8d263626456c9b89dcd6c3 /llvm/lib/Transforms/Utils
parent2329fcd293e138924d96d4b2643dab7f3d60c3f3 (diff)
downloadbcm5719-llvm-b4edfb9af93c39f448ac649edff3be4d17263297.tar.gz
bcm5719-llvm-b4edfb9af93c39f448ac649edff3be4d17263297.zip
LTO: Include dso-local bit in ThinLTO cache key.
Differential Revision: https://reviews.llvm.org/D42713 llvm-svn: 324253
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionImportUtils.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index 6b5f593073b..bf6cce96f49 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -206,16 +206,8 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
// definition.
if (GV.hasName()) {
ValueInfo VI = ImportIndex.getValueInfo(GV.getGUID());
- if (VI) {
- // Need to check all summaries are local in case of hash collisions.
- bool IsLocal = VI.getSummaryList().size() &&
- llvm::all_of(VI.getSummaryList(),
- [](const std::unique_ptr<GlobalValueSummary> &Summary) {
- return Summary->isDSOLocal();
- });
- if (IsLocal)
- GV.setDSOLocal(true);
- }
+ if (VI && VI.isDSOLocal())
+ GV.setDSOLocal(true);
}
bool DoPromote = false;
OpenPOWER on IntegriCloud