================
@@ -555,14 +563,37 @@ void llvm::thinLTOInternalizeAndPromoteInIndex(
ModuleSummaryIndex &Index,
function_ref<bool(StringRef, ValueInfo)> isExported,
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
- isPrevailing) {
+ isPrevailing,
+ DenseSet<StringRef> &Globals) {
assert(!Index.withInternalizeAndPromote());
+
for (auto &I : Index)
thinLTOInternalizeAndPromoteGUID(Index.getValueInfo(I), isExported,
- isPrevailing);
+ isPrevailing, Globals);
Index.setWithInternalizeAndPromote();
}
+void llvm::thinLTOGetGlobalsInIndex(ModuleSummaryIndex &Index,
+ DenseSet<StringRef> &Globals) {
+ for (auto &I : Index) {
+ ValueInfo VI = Index.getValueInfo(I);
+ if (Globals.contains(VI.name()))
----------------
yonghong-song wrote:
Make sense. Will remove this check.
https://github.com/llvm/llvm-project/pull/178587
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits