aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2017-01-05 14:59:56 +0000
committerTeresa Johnson <tejohnson@google.com>2017-01-05 14:59:56 +0000
commite27b058de355e7af398c999db022ef11cf444b20 (patch)
tree8570fd0b642dbf5938ad3da18bc7ea1bc5a9d365 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parentfd93a54fc8045c27242ad4b17ea1dff0a92420eb (diff)
downloadllvm-e27b058de355e7af398c999db022ef11cf444b20.zip
llvm-e27b058de355e7af398c999db022ef11cf444b20.tar.gz
llvm-e27b058de355e7af398c999db022ef11cf444b20.tar.bz2
[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. llvm-svn: 291115
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index 2854691..058a601 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<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(ModuleSummaryIndex &Index, const Module &M,
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(ModuleSummaryIndex &Index, const GlobalVariable &V,
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::buildModuleSummaryIndex(
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);