[llvm-commits] [llvm] r117213 - in /llvm/trunk: include/llvm/Analysis/DominatorInternals.h lib/Transforms/InstCombine/InstructionCombining.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Oct 23 10:10:24 PDT 2010


Author: d0k
Date: Sat Oct 23 12:10:24 2010
New Revision: 117213

URL: http://llvm.org/viewvc/llvm-project?rev=117213&view=rev
Log:
SmallVectorize.

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

Modified: llvm/trunk/include/llvm/Analysis/DominatorInternals.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DominatorInternals.h?rev=117213&r1=117212&r2=117213&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DominatorInternals.h (original)
+++ llvm/trunk/include/llvm/Analysis/DominatorInternals.h Sat Oct 23 12:10:24 2010
@@ -116,7 +116,7 @@
 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]];

Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=117213&r1=117212&r2=117213&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Sat Oct 23 12:10:24 2010
@@ -1032,10 +1032,8 @@
   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 {





More information about the llvm-commits mailing list