[llvm] ef5e3b8 - [ThinLTO] Simplify code. NFC
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 05:10:24 PST 2019
Author: evgeny
Date: 2019-11-19T15:51:25+03:00
New Revision: ef5e3b85eecc26e672fe559089a89062cbeda4b5
URL: https://github.com/llvm/llvm-project/commit/ef5e3b85eecc26e672fe559089a89062cbeda4b5
DIFF: https://github.com/llvm/llvm-project/commit/ef5e3b85eecc26e672fe559089a89062cbeda4b5.diff
LOG: [ThinLTO] Simplify code. NFC
Added:
Modified:
llvm/lib/LTO/LTO.cpp
Removed:
################################################################################
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 85a14b779a78..ebe22c37c707 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -386,11 +386,10 @@ static bool isWeakObjectWithRWAccess(GlobalValueSummary *GVS) {
}
static void thinLTOInternalizeAndPromoteGUID(
- GlobalValueSummaryList &GVSummaryList, ValueInfo VI,
- function_ref<bool(StringRef, ValueInfo)> isExported,
+ ValueInfo VI, function_ref<bool(StringRef, ValueInfo)> isExported,
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
isPrevailing) {
- for (auto &S : GVSummaryList) {
+ for (auto &S : VI.getSummaryList()) {
if (isExported(S->modulePath(), VI)) {
if (GlobalValue::isLocalLinkage(S->linkage()))
S->setLinkage(GlobalValue::ExternalLinkage);
@@ -422,8 +421,8 @@ void llvm::thinLTOInternalizeAndPromoteInIndex(
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
isPrevailing) {
for (auto &I : Index)
- thinLTOInternalizeAndPromoteGUID(
- I.second.SummaryList, Index.getValueInfo(I), isExported, isPrevailing);
+ thinLTOInternalizeAndPromoteGUID(Index.getValueInfo(I), isExported,
+ isPrevailing);
}
// Requires a destructor for std::vector<InputModule>.
More information about the llvm-commits
mailing list