stop using methods that take vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-02-12 22:56:41 +00:00
parent 48d3c108b6
commit 1ccd185cb4
6 changed files with 27 additions and 17 deletions

View File

@@ -370,7 +370,9 @@ Function *ArgPromotion::DoPromotion(Function *F,
// Add a parameter to the function for each element passed in.
for (ScalarizeTable::iterator SI = ArgIndices.begin(),
E = ArgIndices.end(); SI != E; ++SI)
Params.push_back(GetElementPtrInst::getIndexedType(I->getType(), *SI));
Params.push_back(GetElementPtrInst::getIndexedType(I->getType(),
&(*SI)[0],
SI->size()));
if (ArgIndices.size() == 1 && ArgIndices.begin()->empty())
++NumArgumentsPromoted;
@@ -421,7 +423,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
Value *V = *AI;
LoadInst *OrigLoad = OriginalLoads[*SI];
if (!SI->empty()) {
V = new GetElementPtrInst(V, *SI, V->getName()+".idx", Call);
V = new GetElementPtrInst(V, &(*SI)[0], SI->size(),
V->getName()+".idx", Call);
AA.copyValue(OrigLoad->getOperand(0), V);
}
Args.push_back(new LoadInst(V, V->getName()+".val", Call));