LLVM API Documentation
#include <ScalarEvolutionExpressions.h>


Public Types | |
| typedef std::vector < SCEVHandle >::const_iterator | op_iterator |
Public Member Functions | |
| op_iterator | op_begin () const |
| op_iterator | op_end () const |
| unsigned | getNumOperands () const |
| const SCEVHandle & | getOperand (unsigned i) const |
| const SCEVHandle & | getStart () const |
| const Loop * | getLoop () const |
| SCEVHandle | getStepRecurrence (ScalarEvolution &SE) const |
| virtual bool | hasComputableLoopEvolution (const Loop *QL) const |
| virtual bool | isLoopInvariant (const Loop *QueryLoop) const |
| virtual const Type * | getType () const |
| bool | isAffine () const |
| bool | isQuadratic () const |
| SCEVHandle | evaluateAtIteration (SCEVHandle It, ScalarEvolution &SE) const |
| SCEVHandle | getNumIterationsInRange (ConstantRange Range, ScalarEvolution &SE) const |
| SCEVHandle | replaceSymbolicValuesWithConcrete (const SCEVHandle &Sym, const SCEVHandle &Conc, ScalarEvolution &SE) const |
| virtual void | print (std::ostream &OS) const |
| void | print (std::ostream *OS) const |
Static Public Member Functions | |
| static bool | classof (const SCEVAddRecExpr *S) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
| static bool | classof (const SCEV *S) |
Friends | |
| class | ScalarEvolution |
All operands of an AddRec are required to be loop invariant.
Definition at line 415 of file ScalarEvolutionExpressions.h.
| typedef std::vector<SCEVHandle>::const_iterator llvm::SCEVAddRecExpr::op_iterator |
Definition at line 429 of file ScalarEvolutionExpressions.h.
| op_iterator llvm::SCEVAddRecExpr::op_begin | ( | ) | const [inline] |
Definition at line 430 of file ScalarEvolutionExpressions.h.
Referenced by llvm::ScalarEvolution::getAddExpr(), getNumIterationsInRange(), getStepRecurrence(), and llvm::SCEVExpander::visitAddRecExpr().
| op_iterator llvm::SCEVAddRecExpr::op_end | ( | ) | const [inline] |
Definition at line 431 of file ScalarEvolutionExpressions.h.
Referenced by llvm::ScalarEvolution::getAddExpr(), getNumIterationsInRange(), getStepRecurrence(), and llvm::SCEVExpander::visitAddRecExpr().
| unsigned llvm::SCEVAddRecExpr::getNumOperands | ( | ) | const [inline] |
Definition at line 433 of file ScalarEvolutionExpressions.h.
Referenced by evaluateAtIteration(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), getNumIterationsInRange(), isAffine(), isQuadratic(), replaceSymbolicValuesWithConcrete(), and SolveQuadraticEquation().
| const SCEVHandle& llvm::SCEVAddRecExpr::getOperand | ( | unsigned | i | ) | const [inline] |
Definition at line 434 of file ScalarEvolutionExpressions.h.
Referenced by evaluateAtIteration(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), getNumIterationsInRange(), getSCEVStartAndStride(), getStepRecurrence(), isLoopInvariant(), replaceSymbolicValuesWithConcrete(), SolveQuadraticEquation(), and llvm::SCEVExpander::visitAddRecExpr().
| const SCEVHandle& llvm::SCEVAddRecExpr::getStart | ( | ) | const [inline] |
Definition at line 435 of file ScalarEvolutionExpressions.h.
Referenced by evaluateAtIteration(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), getNumIterationsInRange(), and llvm::SCEVExpander::visitAddRecExpr().
| const Loop* llvm::SCEVAddRecExpr::getLoop | ( | ) | const [inline] |
Definition at line 436 of file ScalarEvolutionExpressions.h.
References L.
Referenced by llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), getNumIterationsInRange(), getSCEVStartAndStride(), getStepRecurrence(), and llvm::SCEVExpander::visitAddRecExpr().
| SCEVHandle llvm::SCEVAddRecExpr::getStepRecurrence | ( | ScalarEvolution & | SE | ) | const [inline] |
getStepRecurrence - This method constructs and returns the recurrence indicating how much this expression steps by. If this is a polynomial of degree N, it returns a chrec of degree N-1.
Definition at line 442 of file ScalarEvolutionExpressions.h.
References llvm::ScalarEvolution::getAddRecExpr(), getLoop(), getOperand(), isAffine(), op_begin(), and op_end().
Referenced by llvm::ScalarEvolution::getMulExpr().
| virtual bool llvm::SCEVAddRecExpr::hasComputableLoopEvolution | ( | const Loop * | L | ) | const [inline, virtual] |
hasComputableLoopEvolution - Return true if this SCEV changes value in a known way in the specified loop. This property being true implies that the value is variant in the loop AND that we can emit an expression to compute the value of the expression at any particular loop iteration.
Implements llvm::SCEV.
Definition at line 448 of file ScalarEvolutionExpressions.h.
References L.
| bool SCEVAddRecExpr::isLoopInvariant | ( | const Loop * | L | ) | const [virtual] |
isLoopInvariant - Return true if the value of this SCEV is unchanging in the specified loop.
Implements llvm::SCEV.
Definition at line 384 of file ScalarEvolution.cpp.
References llvm::LoopBase< BlockT >::contains(), llvm::LoopBase< BlockT >::getHeader(), getOperand(), and L.
| virtual const Type* llvm::SCEVAddRecExpr::getType | ( | ) | const [inline, virtual] |
getType - Return the LLVM type of this SCEV expression.
Implements llvm::SCEV.
Definition at line 455 of file ScalarEvolutionExpressions.h.
Referenced by evaluateAtIteration(), getNumIterationsInRange(), and llvm::SCEVExpander::visitAddRecExpr().
| bool llvm::SCEVAddRecExpr::isAffine | ( | ) | const [inline] |
isAffine - Return true if this is an affine AddRec (i.e., it represents an expressions A+B*x where A and B are loop invariant values.
Definition at line 459 of file ScalarEvolutionExpressions.h.
References getNumOperands().
Referenced by getNumIterationsInRange(), getSCEVStartAndStride(), getStepRecurrence(), and llvm::SCEVExpander::visitAddRecExpr().
| bool llvm::SCEVAddRecExpr::isQuadratic | ( | ) | const [inline] |
isQuadratic - Return true if this is an quadratic AddRec (i.e., it represents an expressions A+B*x+C*x^2 where A, B and C are loop invariant values. This corresponds to an addrec of the form {L,+,M,+,N}
Definition at line 468 of file ScalarEvolutionExpressions.h.
References getNumOperands().
Referenced by getNumIterationsInRange().
| SCEVHandle SCEVAddRecExpr::evaluateAtIteration | ( | SCEVHandle | It, | |
| ScalarEvolution & | SE | |||
| ) | const |
evaluateAtIteration - Return the value of this chain of recurrences at the specified iteration number.
evaluateAtIteration - Return the value of this chain of recurrences at the specified iteration number. We can evaluate this recurrence by multiplying each element in the chain by the binomial coefficient corresponding to it. In other words, we can evaluate {A,+,B,+,C,+,D} as:
A*BC(It, 0) + B*BC(It, 1) + C*BC(It, 2) + D*BC(It, 3)
where BC(It, k) stands for binomial coefficient.
Definition at line 658 of file ScalarEvolution.cpp.
References BinomialCoefficient(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), getNumOperands(), getOperand(), getStart(), and getType().
Referenced by EvaluateConstantChrecAtConstant(), and llvm::SCEVExpander::visitAddRecExpr().
| SCEVHandle SCEVAddRecExpr::getNumIterationsInRange | ( | ConstantRange | Range, | |
| ScalarEvolution & | SE | |||
| ) | const |
getNumIterationsInRange - Return the number of iterations of this loop that produce values in the specified constant range. Another way of looking at this is that it returns the first iteration number where the value is not in the condition, thus computing the exit count. If the iteration count can't be computed, an instance of SCEVCouldNotCompute is returned.
getNumIterationsInRange - Return the number of iterations of this loop that produce values in the specified constant range. Another way of looking at this is that it returns the first iteration number where the value is not in the condition, thus computing the exit count. If the iteration count can't be computed, an instance of SCEVCouldNotCompute is returned.
Definition at line 3017 of file ScalarEvolution.cpp.
References A, llvm::ConstantRange::contains(), llvm::dyn_cast(), EvaluateConstantChrecAtConstant(), llvm::ConstantInt::get(), llvm::ScalarEvolution::getAddRecExpr(), llvm::SCEV::getBitWidth(), llvm::ScalarEvolution::getConstant(), llvm::ConstantExpr::getICmp(), llvm::ScalarEvolution::getIntegerSCEV(), getLoop(), llvm::ConstantRange::getLower(), llvm::ScalarEvolution::getNegativeSCEV(), getNumOperands(), getOperand(), getStart(), getType(), llvm::SCEVConstant::getType(), llvm::ConstantRange::getUpper(), llvm::ConstantInt::getValue(), llvm::SCEVConstant::getValue(), llvm::CmpInst::ICMP_ULT, isAffine(), llvm::ConstantRange::isFullSet(), isQuadratic(), llvm::ConstantInt::isZero(), op_begin(), op_end(), llvm::APInt::sge(), SolveQuadraticEquation(), llvm::ConstantRange::subtract(), std::swap(), and llvm::APIntOps::udiv().
| SCEVHandle SCEVAddRecExpr::replaceSymbolicValuesWithConcrete | ( | const SCEVHandle & | Sym, | |
| const SCEVHandle & | Conc, | |||
| ScalarEvolution & | SE | |||
| ) | const [virtual] |
replaceSymbolicValuesWithConcrete - If this SCEV internally references the symbolic value "Sym", construct and return a new SCEV that produces the same value, but which uses the concrete value Conc instead of the symbolic value. If this SCEV does not use the symbolic value, it returns itself.
Implements llvm::SCEV.
Definition at line 361 of file ScalarEvolution.cpp.
References llvm::ScalarEvolution::getAddRecExpr(), getNumOperands(), getOperand(), H, and L.
| void SCEVAddRecExpr::print | ( | std::ostream & | OS | ) | const [virtual] |
print - Print out the internal representation of this scalar to the specified stream. This should really only be used for debugging purposes.
Implements llvm::SCEV.
Definition at line 392 of file ScalarEvolution.cpp.
References llvm::LoopBase< BlockT >::getHeader(), and L.
Referenced by print().
| void llvm::SCEVAddRecExpr::print | ( | std::ostream * | OS | ) | const [inline] |
Reimplemented from llvm::SCEV.
Definition at line 490 of file ScalarEvolutionExpressions.h.
References print().
| static bool llvm::SCEVAddRecExpr::classof | ( | const SCEVAddRecExpr * | S | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Definition at line 493 of file ScalarEvolutionExpressions.h.
| static bool llvm::SCEVAddRecExpr::classof | ( | const SCEV * | S | ) | [inline, static] |
Definition at line 494 of file ScalarEvolutionExpressions.h.
References llvm::SCEV::getSCEVType(), and llvm::scAddRecExpr.
friend class ScalarEvolution [friend] |
Definition at line 416 of file ScalarEvolutionExpressions.h.
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.