OSDN Git Service

Increase the initial vector size to be equivalent to the size of the Deps
authorBill Wendling <isanbard@gmail.com>
Tue, 31 Jan 2012 07:04:52 +0000 (07:04 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 31 Jan 2012 07:04:52 +0000 (07:04 +0000)
vector. This potentially saves a resizing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149369 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index 6e928b7..d39ef3d 100644 (file)
@@ -1298,8 +1298,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI) {
   // where we have a value available in repl, also keep track of whether we see
   // dependencies that produce an unknown value for the load (such as a call
   // that could potentially clobber the load).
-  SmallVector<AvailableValueInBlock, 16> ValuesPerBlock;
-  SmallVector<BasicBlock*, 16> UnavailableBlocks;
+  SmallVector<AvailableValueInBlock, 64> ValuesPerBlock;
+  SmallVector<BasicBlock*, 64> UnavailableBlocks;
 
   for (unsigned i = 0, e = NumDeps; i != e; ++i) {
     BasicBlock *DepBB = Deps[i].getBB();