diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-21 19:47:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-21 19:47:52 +0000 |
commit | dd41bba517d990f16ad0ce9fb585f51c77dcc9c0 (patch) | |
tree | 43e069c453a0050fa64e5112a8511581afa78a6a /llvm/lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | d34da45a83a6d0428abe3d7824be563e56e65731 (diff) | |
download | bcm5719-llvm-dd41bba517d990f16ad0ce9fb585f51c77dcc9c0.tar.gz bcm5719-llvm-dd41bba517d990f16ad0ce9fb585f51c77dcc9c0.zip |
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.
llvm-svn: 106452
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index df562fa1344..2f7f73ed501 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -288,11 +288,11 @@ static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, // the sum into a single value, so just use that. Ops.clear(); if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum)) - Ops.insert(Ops.end(), Add->op_begin(), Add->op_end()); + Ops.append(Add->op_begin(), Add->op_end()); else if (!Sum->isZero()) Ops.push_back(Sum); // Then append the addrecs. - Ops.insert(Ops.end(), AddRecs.begin(), AddRecs.end()); + Ops.append(AddRecs.begin(), AddRecs.end()); } /// SplitAddRecs - Flatten a list of add operands, moving addrec start values @@ -315,7 +315,7 @@ static void SplitAddRecs(SmallVectorImpl<const SCEV *> &Ops, A->getLoop())); if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Start)) { Ops[i] = Zero; - Ops.insert(Ops.end(), Add->op_begin(), Add->op_end()); + Ops.append(Add->op_begin(), Add->op_end()); e += Add->getNumOperands(); } else { Ops[i] = Start; @@ -323,7 +323,7 @@ static void SplitAddRecs(SmallVectorImpl<const SCEV *> &Ops, } if (!AddRecs.empty()) { // Add the addrecs onto the end of the list. - Ops.insert(Ops.end(), AddRecs.begin(), AddRecs.end()); + Ops.append(AddRecs.begin(), AddRecs.end()); // Resort the operand list, moving any constants to the front. SimplifyAddOperands(Ops, Ty, SE); } |