[llvm] [ThinLTO] Simplify checking for single external copy (NFCI) (PR #164861)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 23 19:46:29 PDT 2025
================
@@ -471,16 +471,14 @@ static void thinLTOInternalizeAndPromoteGUID(
ValueInfo VI, function_ref<bool(StringRef, ValueInfo)> isExported,
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
isPrevailing) {
- auto ExternallyVisibleCopies =
- llvm::count_if(VI.getSummaryList(),
- [](const std::unique_ptr<GlobalValueSummary> &Summary) {
- return !GlobalValue::isLocalLinkage(Summary->linkage());
- });
-
// Before performing index-based internalization and promotion for this GUID,
// the local flag should be consistent with the summary list linkage types.
VI.verifyLocal();
+ bool SingleExternallyVisibleCopy =
----------------
teresajohnson wrote:
done
https://github.com/llvm/llvm-project/pull/164861
More information about the llvm-commits
mailing list