[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

Chris Lattner sabre at nondot.org
Sat Feb 10 00:33:27 PST 2007



Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.193 -> 1.194
---
Log message:

convert some vectors to smallvector.  


---
Diffs of the changes:  (+3 -2)

 Verifier.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.193 llvm/lib/VMCore/Verifier.cpp:1.194
--- llvm/lib/VMCore/Verifier.cpp:1.193	Sat Feb 10 02:30:29 2007
+++ llvm/lib/VMCore/Verifier.cpp	Sat Feb 10 02:33:11 2007
@@ -396,7 +396,8 @@
   // Check constraints that this basic block imposes on all of the PHI nodes in
   // it.
   if (isa<PHINode>(BB.front())) {
-    std::vector<BasicBlock*> Preds(pred_begin(&BB), pred_end(&BB));
+    SmallVector<BasicBlock*, 8> Preds(pred_begin(&BB), pred_end(&BB));
+    SmallVector<std::pair<BasicBlock*, Value*>, 8> Values;
     std::sort(Preds.begin(), Preds.end());
     PHINode *PN;
     for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast<PHINode>(I));++I) {
@@ -410,7 +411,7 @@
               "parent basic block!", PN);
 
       // Get and sort all incoming values in the PHI node...
-      std::vector<std::pair<BasicBlock*, Value*> > Values;
+      Values.clear();
       Values.reserve(PN->getNumIncomingValues());
       for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
         Values.push_back(std::make_pair(PN->getIncomingBlock(i),






More information about the llvm-commits mailing list