diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 2a1a976226047..25cb242049df9 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -352,7 +352,7 @@ class CallAnalyzer : public InstVisitor { DenseMap> ConstantOffsetPtrs; /// Keep track of dead blocks due to the constant arguments. - SetVector DeadBlocks; + SmallPtrSet DeadBlocks; /// The mapping of the blocks to their known unique successors due to the /// constant arguments. @@ -2552,7 +2552,7 @@ void CallAnalyzer::findDeadBlocks(BasicBlock *CurrBB, BasicBlock *NextBB) { NewDead.push_back(Succ); while (!NewDead.empty()) { BasicBlock *Dead = NewDead.pop_back_val(); - if (DeadBlocks.insert(Dead)) + if (DeadBlocks.insert(Dead).second) // Continue growing the dead block lists. for (BasicBlock *S : successors(Dead)) if (IsNewlyDead(S))