diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2018-02-05 17:17:51 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2018-02-05 17:17:51 +0000 |
commit | b4edfb9af93c39f448ac649edff3be4d17263297 (patch) | |
tree | c25cddc1a2e1c106dd8d263626456c9b89dcd6c3 /llvm/lib/Transforms/Utils | |
parent | 2329fcd293e138924d96d4b2643dab7f3d60c3f3 (diff) | |
download | bcm5719-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.cpp | 12 |
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; |