SmallVectorize.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 23 Oct 2010 17:10:24 +0000 (17:10 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 23 Oct 2010 17:10:24 +0000 (17:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117213 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DominatorInternals.h
lib/Transforms/InstCombine/InstructionCombining.cpp

index 0419688a53bdd44f363d45ff92c3e2a9826dba4f..654289e6305c1b44d219cb1ecad7822138d46f3c 100644 (file)
@@ -116,7 +116,7 @@ unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
 template<class GraphT>
 void Compress(DominatorTreeBase<typename GraphT::NodeType>& DT,
               typename GraphT::NodeType *VIn) {
-  std::vector<typename GraphT::NodeType*> Work;
+  SmallVector<typename GraphT::NodeType*, 32> Work;
   SmallPtrSet<typename GraphT::NodeType*, 32> Visited;
   typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInVAInfo =
                                       DT.Info[DT.Vertex[DT.Info[VIn].Ancestor]];
index 47519fbaef93c81246faa7797aeef3750a7424e4..de409d1ccee9cdd1f32647bb4e63edd5e19016e3 100644 (file)
@@ -1032,10 +1032,8 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB,
   bool MadeIRChange = false;
   SmallVector<BasicBlock*, 256> Worklist;
   Worklist.push_back(BB);
-  
-  std::vector<Instruction*> InstrsForInstCombineWorklist;
-  InstrsForInstCombineWorklist.reserve(128);
 
+  SmallVector<Instruction*, 128> InstrsForInstCombineWorklist;
   SmallPtrSet<ConstantExpr*, 64> FoldedConstants;
   
   do {