diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-31 04:40:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-31 04:40:53 +0000 |
commit | 55eb1c47de30a6b4e8707b6392e878e32a6583e9 (patch) | |
tree | f1ef8bfa122beaa0299d361d7af135215b2c7a23 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 2b9a5daf7c4dc39b46662a69e95e610e7b2cd4ba (diff) |
eliminate temporary vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index adbc29613d..c11d249f1f 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -173,9 +173,10 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, /*empty*/; if (isa<SequentialType>(*GTI)) { // Pull the last index out of the constant expr GEP. - std::vector<Value*> CEIdxs(CE->op_begin()+1, CE->op_end()-1); + SmallVector<Value*, 8> CEIdxs(CE->op_begin()+1, CE->op_end()-1); Constant *NCE = ConstantExpr::getGetElementPtr(CE->getOperand(0), - CEIdxs); + &CEIdxs[0], + CEIdxs.size()); GetElementPtrInst *NGEPI = new GetElementPtrInst(NCE, Constant::getNullValue(Type::Int32Ty), NewAdd, GEPI->getName(), GEPI); |