[llvm-commits] [llvm] r52763 - /llvm/trunk/lib/Analysis/ValueTracking.cpp

Owen Anderson resistor at mac.com
Wed Jun 25 21:47:41 PDT 2008


Author: resistor
Date: Wed Jun 25 23:47:41 2008
New Revision: 52763

URL: http://llvm.org/viewvc/llvm-project?rev=52763&view=rev
Log:
Reserve the size we'll need in advance.

Modified:
    llvm/trunk/lib/Analysis/ValueTracking.cpp

Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=52763&r1=52762&r2=52763&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Wed Jun 25 23:47:41 2008
@@ -1004,6 +1004,7 @@
   
   // Traverse the constant array from StartIdx (derived above) which is
   // the place the GEP refers to in the array.
+  Str.reserve(NumElts);
   for (unsigned i = StartIdx; i < NumElts; ++i) {
     Constant *Elt = Array->getOperand(i);
     ConstantInt *CI = dyn_cast<ConstantInt>(Elt);





More information about the llvm-commits mailing list