diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp index 28546912b6bf..058a601c7f3b 100644 --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -88,7 +88,7 @@ static void computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M, const Function &F, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, bool HasLocalsInUsed, - SmallPtrSet &CantBePromoted) { + DenseSet &CantBePromoted) { // Summary not currently supported for anonymous functions, they should // have been named. assert(F.hasName()); @@ -200,7 +200,7 @@ computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M, static void computeVariableSummary(ModuleSummaryIndex &Index, const GlobalVariable &V, - SmallPtrSet &CantBePromoted) { + DenseSet &CantBePromoted) { SetVector RefEdges; SmallPtrSet Visited; findRefEdges(&V, RefEdges, Visited); @@ -215,7 +215,7 @@ computeVariableSummary(ModuleSummaryIndex &Index, const GlobalVariable &V, static void computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A, - SmallPtrSet &CantBePromoted) { + DenseSet &CantBePromoted) { bool NonRenamableLocal = isNonRenamableLocal(A); GlobalValueSummary::GVFlags Flags(A.getLinkage(), NonRenamableLocal); auto AS = llvm::make_unique(Flags, ArrayRef{}); @@ -245,7 +245,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex( collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ false); // Next collect those in the llvm.compiler.used set. collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ true); - SmallPtrSet CantBePromoted; + DenseSet CantBePromoted; for (auto *V : Used) { if (V->hasLocalLinkage()) { LocalsUsed.insert(V);