diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-16 16:30:01 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-16 16:30:01 +0000 |
commit | 8d9c7a67015d6e9413f96eca26633ad7ec74d013 (patch) | |
tree | 91d4ab0ea57a2c84d74ffbb29929a2fd44d8e75d /lib/Analysis/ScalarEvolution.cpp | |
parent | 2d16fc5ff03ae1e6ac219efe1776366cf211689f (diff) |
Use const_iterator in a few places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index e4c96438fe..20b886e4aa 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1494,7 +1494,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, // re-generate the operands list. Group the operands by constant scale, // to avoid multiplying by the same constant scale multiple times. std::map<APInt, SmallVector<const SCEV *, 4>, APIntCompare> MulOpLists; - for (SmallVector<const SCEV *, 8>::iterator I = NewOps.begin(), + for (SmallVector<const SCEV *, 8>::const_iterator I = NewOps.begin(), E = NewOps.end(); I != E; ++I) MulOpLists[M.find(*I)->second].push_back(*I); // Re-generate the operands list. @@ -2465,7 +2465,7 @@ const SCEV *ScalarEvolution::getCouldNotCompute() { const SCEV *ScalarEvolution::getSCEV(Value *V) { assert(isSCEVable(V->getType()) && "Value is not SCEVable!"); - std::map<SCEVCallbackVH, const SCEV *>::iterator I = Scalars.find(V); + std::map<SCEVCallbackVH, const SCEV *>::const_iterator I = Scalars.find(V); if (I != Scalars.end()) return I->second; const SCEV *S = createSCEV(V); Scalars.insert(std::make_pair(SCEVCallbackVH(V, this), S)); @@ -4284,7 +4284,7 @@ Constant * ScalarEvolution::getConstantEvolutionLoopExitValue(PHINode *PN, const APInt &BEs, const Loop *L) { - std::map<PHINode*, Constant*>::iterator I = + std::map<PHINode*, Constant*>::const_iterator I = ConstantEvolutionLoopExitValue.find(PN); if (I != ConstantEvolutionLoopExitValue.end()) return I->second; |