diff options
author | Dan Gohman <gohman@apple.com> | 2007-10-22 18:31:58 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-10-22 18:31:58 +0000 |
commit | 246b2564d3bbbafe06ebf6a67745cd24141b5cb4 (patch) | |
tree | 44ca6627cdb239fbc1e2bdbe853716f4ccb29696 /lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 245741d2a1ccec53a87bb5d02b711244c179f07a (diff) |
Move the SCEV object factors from being static members of the individual
SCEV subclasses to being non-static member functions of the ScalarEvolution
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index fc52fb70ff..3bac3024c4 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -128,8 +128,8 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) { !cast<SCEVConstant>(S->getStart())->getValue()->isZero()) { Value *Start = expand(S->getStart()); std::vector<SCEVHandle> NewOps(S->op_begin(), S->op_end()); - NewOps[0] = SCEVUnknown::getIntegerSCEV(0, Ty); - Value *Rest = expand(SCEVAddRecExpr::get(NewOps, L)); + NewOps[0] = SE.getIntegerSCEV(0, Ty); + Value *Rest = expand(SE.getAddRecExpr(NewOps, L)); // FIXME: look for an existing add to use. return InsertBinop(Instruction::Add, Rest, Start, InsertPt); @@ -137,7 +137,7 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) { // {0,+,1} --> Insert a canonical induction variable into the loop! if (S->getNumOperands() == 2 && - S->getOperand(1) == SCEVUnknown::getIntegerSCEV(1, Ty)) { + S->getOperand(1) == SE.getIntegerSCEV(1, Ty)) { // Create and insert the PHI node for the induction variable in the // specified loop. BasicBlock *Header = L->getHeader(); @@ -200,9 +200,9 @@ Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) { // folders, then expandCodeFor the closed form. This allows the folders to // simplify the expression without having to build a bunch of special code // into this folder. - SCEVHandle IH = SCEVUnknown::get(I); // Get I as a "symbolic" SCEV. + SCEVHandle IH = SE.getUnknown(I); // Get I as a "symbolic" SCEV. - SCEVHandle V = S->evaluateAtIteration(IH); + SCEVHandle V = S->evaluateAtIteration(IH, SE); //cerr << "Evaluated: " << *this << "\n to: " << *V << "\n"; return expand(V); |