LLVM API Documentation
#include <ScalarEvolution.h>
Public Member Functions | |
| SCEV (const FoldingSetNodeID &ID, unsigned SCEVTy) | |
| unsigned | getSCEVType () const |
| virtual bool | isLoopInvariant (const Loop *L) const =0 |
| virtual bool | hasComputableLoopEvolution (const Loop *L) const =0 |
| virtual const Type * | getType () const =0 |
| bool | isZero () const |
| bool | isOne () const |
| bool | isAllOnesValue () const |
| virtual bool | hasOperand (const SCEV *Op) const =0 |
| virtual bool | dominates (BasicBlock *BB, DominatorTree *DT) const =0 |
| virtual void | print (raw_ostream &OS) const =0 |
| void | print (std::ostream &OS) const |
| void | print (std::ostream *OS) const |
| void | dump () const |
Protected Member Functions | |
| virtual | ~SCEV () |
Protected Attributes | |
| unsigned short | SubclassData |
Definition at line 53 of file ScalarEvolution.h.
| SCEV::~SCEV | ( | ) | [protected, virtual] |
Definition at line 117 of file ScalarEvolution.cpp.
| llvm::SCEV::SCEV | ( | const FoldingSetNodeID & | ID, | |
| unsigned | SCEVTy | |||
| ) | [inline, explicit] |
Definition at line 68 of file ScalarEvolution.h.
| unsigned llvm::SCEV::getSCEVType | ( | ) | const [inline] |
Definition at line 71 of file ScalarEvolution.h.
Referenced by llvm::SCEVUnknown::classof(), llvm::SCEVAllocSizeExpr::classof(), llvm::SCEVFieldOffsetExpr::classof(), llvm::SCEVTargetDataConstant::classof(), llvm::SCEVUMaxExpr::classof(), llvm::SCEVSMaxExpr::classof(), llvm::SCEVAddRecExpr::classof(), llvm::SCEVUDivExpr::classof(), llvm::SCEVMulExpr::classof(), llvm::SCEVAddExpr::classof(), llvm::SCEVCommutativeExpr::classof(), llvm::SCEVNAryExpr::classof(), llvm::SCEVSignExtendExpr::classof(), llvm::SCEVZeroExtendExpr::classof(), llvm::SCEVTruncateExpr::classof(), llvm::SCEVCastExpr::classof(), llvm::SCEVConstant::classof(), llvm::SCEVCouldNotCompute::classof(), GroupByComplexity(), and llvm::SCEVVisitor< llvm::SCEVExpander, llvm::Value * >::visit().
isLoopInvariant - Return true if the value of this SCEV is unchanging in the specified loop.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVAddRecExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.
Referenced by llvm::IVUsers::getReplacementExpr(), InsertAffinePhi(), llvm::SCEVCastExpr::isLoopInvariant(), llvm::SCEVAddRecExpr::isLoopInvariant(), MoveImmediateValues(), MoveLoopVariantsToImmediateField(), and llvm::ScalarEvolution::print().
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.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVAddRecExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.
Referenced by llvm::SCEVCastExpr::hasComputableLoopEvolution().
| virtual const Type* llvm::SCEV::getType | ( | ) | const [pure virtual] |
getType - Return the LLVM type of this SCEV expression.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.
Referenced by llvm::IVUsers::AddUsersIfInteresting(), BinomialCoefficient(), FactorOutConstant(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAllocSizeExpr(), llvm::ScalarEvolution::getAnyExtendExpr(), llvm::ScalarEvolution::getNegativeSCEV(), llvm::ScalarEvolution::getNoopOrAnyExtend(), llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), llvm::ScalarEvolution::getNotSCEV(), llvm::IVUsers::getReplacementExpr(), llvm::ScalarEvolution::getSCEVAtScope(), llvm::ScalarEvolution::getSignedRange(), llvm::ScalarEvolution::getSignExtendExpr(), llvm::ScalarEvolution::getTruncateExpr(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), llvm::SCEVNAryExpr::getType(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUMaxFromMismatchedTypes(), llvm::ScalarEvolution::getUMinFromMismatchedTypes(), llvm::ScalarEvolution::getUnsignedRange(), llvm::ScalarEvolution::getZeroExtendExpr(), InsertAffinePhi(), MoveImmediateValues(), MoveLoopVariantsToImmediateField(), llvm::SCEVSignExtendExpr::print(), llvm::SCEVZeroExtendExpr::print(), llvm::SCEVTruncateExpr::print(), and SeparateSubExprs().
| bool SCEV::isZero | ( | ) | const |
isZero - Return true if the expression is a constant zero.
Definition at line 129 of file ScalarEvolution.cpp.
Referenced by FactorOutConstant(), SeparateSubExprs(), and SplitAddRecs().
| bool SCEV::isOne | ( | ) | const |
isOne - Return true if the expression is a constant one.
Definition at line 135 of file ScalarEvolution.cpp.
Referenced by FactorOutConstant(), llvm::ScalarEvolution::getSignedRange(), and llvm::ScalarEvolution::getUnsignedRange().
| bool SCEV::isAllOnesValue | ( | ) | const |
isAllOnesValue - Return true if the expression is a constant all-ones value.
Definition at line 141 of file ScalarEvolution.cpp.
Referenced by llvm::ScalarEvolution::getSignedRange(), and llvm::ScalarEvolution::getUnsignedRange().
hasOperand - Test whether this SCEV has Op as a direct or indirect operand.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.
Referenced by llvm::SCEVCastExpr::hasOperand().
| virtual bool llvm::SCEV::dominates | ( | BasicBlock * | BB, | |
| DominatorTree * | DT | |||
| ) | const [pure virtual] |
dominates - Return true if elements that makes up this SCEV dominates the specified basic block.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.
Referenced by llvm::SCEVCastExpr::dominates(), and getSCEVStartAndStride().
| virtual void llvm::SCEV::print | ( | raw_ostream & | OS | ) | const [pure virtual] |
print - Print out the internal representation of this scalar to the specified stream. This should really only be used for debugging purposes.
Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVTruncateExpr, llvm::SCEVZeroExtendExpr, llvm::SCEVSignExtendExpr, llvm::SCEVCommutativeExpr, llvm::SCEVUDivExpr, llvm::SCEVAddRecExpr, llvm::SCEVFieldOffsetExpr, llvm::SCEVAllocSizeExpr, and llvm::SCEVUnknown.
Referenced by dump(), llvm::operator<<(), llvm::ScalarEvolution::print(), and print().
| void SCEV::print | ( | std::ostream & | OS | ) | const |
| void llvm::SCEV::print | ( | std::ostream * | OS | ) | const [inline] |
| void SCEV::dump | ( | ) | const |
dump - This method is used for debugging.
Definition at line 119 of file ScalarEvolution.cpp.
References llvm::errs(), and print().
unsigned short llvm::SCEV::SubclassData [protected] |
SubclassData - This field is initialized to zero and may be used in subclasses to store miscelaneous information.
Definition at line 60 of file ScalarEvolution.h.
Referenced by llvm::SCEVAddRecExpr::hasNoSignedWrap(), llvm::SCEVAddRecExpr::hasNoUnsignedWrap(), llvm::SCEVAddRecExpr::setHasNoSignedWrap(), and llvm::SCEVAddRecExpr::setHasNoUnsignedWrap().