Convert a std::vector to a SmallVector for another 5.4% speedup on domtree.
authorCameron Zwarich <zwarich@apple.com>
Sun, 23 Jan 2011 06:54:22 +0000 (06:54 +0000)
committerCameron Zwarich <zwarich@apple.com>
Sun, 23 Jan 2011 06:54:22 +0000 (06:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124065 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DominatorInternals.h

index 125836a6a38d2b5f7e3ad3fcaa77cd7005f6395e..ae552b05abff3e50c5a204a47406d9815f623949 100644 (file)
@@ -53,8 +53,8 @@ unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
 #else
   bool IsChildOfArtificialExit = (N != 0);
 
-  std::vector<std::pair<typename GraphT::NodeType*,
-                        typename GraphT::ChildIteratorType> > Worklist;
+  SmallVector<std::pair<typename GraphT::NodeType*,
+                        typename GraphT::ChildIteratorType>, 32> Worklist;
   Worklist.push_back(std::make_pair(V, GraphT::child_begin(V)));
   while (!Worklist.empty()) {
     typename GraphT::NodeType* BB = Worklist.back().first;