[llvm] r291115 - [ThinLTO] Use DenseSet instead of SmallPtrSet for holding GUIDs

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 06:59:56 PST 2017


Author: tejohnson
Date: Thu Jan  5 08:59:56 2017
New Revision: 291115

URL: http://llvm.org/viewvc/llvm-project?rev=291115&view=rev
Log:
[ThinLTO] Use DenseSet instead of SmallPtrSet for holding GUIDs

Should fix some more bot failures from r291108.
This should have been a DenseSet, since GUID is not a pointer type.
It caused some bots to fail, but for some reason I wasnt't getting a
build failure.

Modified:
    llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp?rev=291115&r1=291114&r2=291115&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp Thu Jan  5 08:59:56 2017
@@ -88,7 +88,7 @@ static void
 computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
                        const Function &F, BlockFrequencyInfo *BFI,
                        ProfileSummaryInfo *PSI, bool HasLocalsInUsed,
-                       SmallPtrSet<GlobalValue::GUID, 8> &CantBePromoted) {
+                       DenseSet<GlobalValue::GUID> &CantBePromoted) {
   // Summary not currently supported for anonymous functions, they should
   // have been named.
   assert(F.hasName());
@@ -200,7 +200,7 @@ computeFunctionSummary(ModuleSummaryInde
 
 static void
 computeVariableSummary(ModuleSummaryIndex &Index, const GlobalVariable &V,
-                       SmallPtrSet<GlobalValue::GUID, 8> &CantBePromoted) {
+                       DenseSet<GlobalValue::GUID> &CantBePromoted) {
   SetVector<ValueInfo> RefEdges;
   SmallPtrSet<const User *, 8> Visited;
   findRefEdges(&V, RefEdges, Visited);
@@ -215,7 +215,7 @@ computeVariableSummary(ModuleSummaryInde
 
 static void
 computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A,
-                    SmallPtrSet<GlobalValue::GUID, 8> &CantBePromoted) {
+                    DenseSet<GlobalValue::GUID> &CantBePromoted) {
   bool NonRenamableLocal = isNonRenamableLocal(A);
   GlobalValueSummary::GVFlags Flags(A.getLinkage(), NonRenamableLocal);
   auto AS = llvm::make_unique<AliasSummary>(Flags, ArrayRef<ValueInfo>{});
@@ -245,7 +245,7 @@ ModuleSummaryIndex llvm::buildModuleSumm
   collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ false);
   // Next collect those in the llvm.compiler.used set.
   collectUsedGlobalVariables(M, Used, /*CompilerUsed*/ true);
-  SmallPtrSet<GlobalValue::GUID, 8> CantBePromoted;
+  DenseSet<GlobalValue::GUID> CantBePromoted;
   for (auto *V : Used) {
     if (V->hasLocalLinkage()) {
       LocalsUsed.insert(V);




More information about the llvm-commits mailing list