Convert several parts of the ScalarEvolution framework to use

SmallVector instead of std::vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-06-14 22:47:23 +00:00
parent ea73f3c2e1
commit a82752c9eb
5 changed files with 80 additions and 74 deletions

View File

@@ -394,24 +394,24 @@ namespace llvm {
SCEVHandle getZeroExtendExpr(const SCEVHandle &Op, const Type *Ty);
SCEVHandle getSignExtendExpr(const SCEVHandle &Op, const Type *Ty);
SCEVHandle getAnyExtendExpr(const SCEVHandle &Op, const Type *Ty);
SCEVHandle getAddExpr(std::vector<SCEVHandle> &Ops);
SCEVHandle getAddExpr(SmallVectorImpl<SCEVHandle> &Ops);
SCEVHandle getAddExpr(const SCEVHandle &LHS, const SCEVHandle &RHS) {
std::vector<SCEVHandle> Ops;
SmallVector<SCEVHandle, 2> Ops;
Ops.push_back(LHS);
Ops.push_back(RHS);
return getAddExpr(Ops);
}
SCEVHandle getAddExpr(const SCEVHandle &Op0, const SCEVHandle &Op1,
const SCEVHandle &Op2) {
std::vector<SCEVHandle> Ops;
SmallVector<SCEVHandle, 3> Ops;
Ops.push_back(Op0);
Ops.push_back(Op1);
Ops.push_back(Op2);
return getAddExpr(Ops);
}
SCEVHandle getMulExpr(std::vector<SCEVHandle> &Ops);
SCEVHandle getMulExpr(SmallVectorImpl<SCEVHandle> &Ops);
SCEVHandle getMulExpr(const SCEVHandle &LHS, const SCEVHandle &RHS) {
std::vector<SCEVHandle> Ops;
SmallVector<SCEVHandle, 2> Ops;
Ops.push_back(LHS);
Ops.push_back(RHS);
return getMulExpr(Ops);
@@ -419,17 +419,17 @@ namespace llvm {
SCEVHandle getUDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
SCEVHandle getAddRecExpr(const SCEVHandle &Start, const SCEVHandle &Step,
const Loop *L);
SCEVHandle getAddRecExpr(std::vector<SCEVHandle> &Operands,
SCEVHandle getAddRecExpr(SmallVectorImpl<SCEVHandle> &Operands,
const Loop *L);
SCEVHandle getAddRecExpr(const std::vector<SCEVHandle> &Operands,
SCEVHandle getAddRecExpr(const SmallVectorImpl<SCEVHandle> &Operands,
const Loop *L) {
std::vector<SCEVHandle> NewOp(Operands);
SmallVector<SCEVHandle, 4> NewOp(Operands.begin(), Operands.end());
return getAddRecExpr(NewOp, L);
}
SCEVHandle getSMaxExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
SCEVHandle getSMaxExpr(std::vector<SCEVHandle> Operands);
SCEVHandle getSMaxExpr(SmallVectorImpl<SCEVHandle> &Operands);
SCEVHandle getUMaxExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
SCEVHandle getUMaxExpr(std::vector<SCEVHandle> Operands);
SCEVHandle getUMaxExpr(SmallVectorImpl<SCEVHandle> &Operands);
SCEVHandle getUnknown(Value *V);
SCEVHandle getCouldNotCompute();