mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
eliminate temporary vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user