From b4edfb9af93c39f448ac649edff3be4d17263297 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Mon, 5 Feb 2018 17:17:51 +0000 Subject: LTO: Include dso-local bit in ThinLTO cache key. Differential Revision: https://reviews.llvm.org/D42713 llvm-svn: 324253 --- llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'llvm/lib/Transforms') 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 &Summary) { - return Summary->isDSOLocal(); - }); - if (IsLocal) - GV.setDSOLocal(true); - } + if (VI && VI.isDSOLocal()) + GV.setDSOLocal(true); } bool DoPromote = false; -- cgit v1.2.3