LLVM API Documentation
#include <ScalarEvolution.h>
Definition at line 190 of file ScalarEvolution.h.
| llvm::ScalarEvolution::ScalarEvolution | ( | ) | [inline] |
Definition at line 194 of file ScalarEvolution.h.
| SCEVHandle ScalarEvolution::getSCEV | ( | Value * | V | ) | const |
getSCEV - Return a SCEV expression handle for the full generality of the specified expression.
Definition at line 2992 of file ScalarEvolution.cpp.
Referenced by getSCEVAtScope(), and print().
| SCEVHandle ScalarEvolution::getConstant | ( | ConstantInt * | V | ) |
Definition at line 174 of file ScalarEvolution.cpp.
References R.
Referenced by BinomialCoefficient(), EvaluateConstantChrecAtConstant(), getAddExpr(), getConstant(), getMulExpr(), getNegativeSCEV(), getNotSCEV(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), getSMaxExpr(), getUMaxExpr(), getUnknown(), SolveLinEquationWithOverflow(), and SolveQuadraticEquation().
| SCEVHandle ScalarEvolution::getConstant | ( | const APInt & | Val | ) |
Definition at line 180 of file ScalarEvolution.cpp.
References llvm::ConstantInt::get(), and getConstant().
| SCEVHandle ScalarEvolution::getTruncateExpr | ( | const SCEVHandle & | Op, | |
| const Type * | Ty | |||
| ) |
Definition at line 659 of file ScalarEvolution.cpp.
References getAddRecExpr(), llvm::ConstantExpr::getTrunc(), and getUnknown().
Referenced by getTruncateOrZeroExtend(), and llvm::SCEVTruncateExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getZeroExtendExpr | ( | const SCEVHandle & | Op, | |
| const Type * | Ty | |||
| ) |
Definition at line 683 of file ScalarEvolution.cpp.
References getUnknown(), and llvm::ConstantExpr::getZExt().
Referenced by getTruncateOrZeroExtend(), and llvm::SCEVZeroExtendExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getSignExtendExpr | ( | const SCEVHandle & | Op, | |
| const Type * | Ty | |||
| ) |
Definition at line 698 of file ScalarEvolution.cpp.
References llvm::ConstantExpr::getSExt(), and getUnknown().
Referenced by llvm::SCEVSignExtendExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getAddExpr | ( | std::vector< SCEVHandle > & | Ops | ) |
Definition at line 729 of file ScalarEvolution.cpp.
References Add(), AddOne(), llvm::ConstantInt::get(), getAddRecExpr(), getConstant(), getIntegerSCEV(), llvm::SCEVAddRecExpr::getLoop(), getMulExpr(), llvm::SCEVAddRecExpr::getNumOperands(), llvm::SCEVCommutativeExpr::getNumOperands(), llvm::SCEVAddRecExpr::getOperand(), llvm::SCEVCommutativeExpr::getOperand(), llvm::SCEVAddRecExpr::getStart(), GroupByComplexity(), Idx, llvm::SCEVAddRecExpr::op_begin(), llvm::SCEVCommutativeExpr::op_begin(), llvm::User::op_begin(), llvm::SCEVAddRecExpr::op_end(), llvm::SCEVCommutativeExpr::op_end(), llvm::User::op_end(), llvm::scAddExpr, llvm::scAddRecExpr, llvm::scMulExpr, and Ty.
Referenced by llvm::SCEVAddRecExpr::evaluateAtIteration(), getAddExpr(), getMinusSCEV(), getMulExpr(), getSCEVStartAndStride(), MoveImmediateValues(), MoveLoopVariantsToImmediateField(), RemoveCommonExpressionsFromUseBases(), and llvm::SCEVCommutativeExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle llvm::ScalarEvolution::getAddExpr | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) | [inline] |
| SCEVHandle llvm::ScalarEvolution::getAddExpr | ( | const SCEVHandle & | Op0, | |
| const SCEVHandle & | Op1, | |||
| const SCEVHandle & | Op2 | |||
| ) | [inline] |
| SCEVHandle ScalarEvolution::getMulExpr | ( | std::vector< SCEVHandle > & | Ops | ) |
Definition at line 955 of file ScalarEvolution.cpp.
References Add(), F, G, llvm::ConstantInt::get(), getAddExpr(), getAddRecExpr(), getConstant(), llvm::SCEVAddRecExpr::getLoop(), llvm::SCEVAddRecExpr::getNumOperands(), llvm::User::getNumOperands(), llvm::SCEVAddRecExpr::getOperand(), llvm::Constant::getOperand(), llvm::SCEVAddRecExpr::getStart(), llvm::SCEVAddRecExpr::getStepRecurrence(), GroupByComplexity(), Idx, llvm::scAddRecExpr, Scale, and llvm::scMulExpr.
Referenced by BinomialCoefficient(), llvm::SCEVAddRecExpr::evaluateAtIteration(), getAddExpr(), getMulExpr(), getNegativeSCEV(), MoveImmediateValues(), and llvm::SCEVCommutativeExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle llvm::ScalarEvolution::getMulExpr | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) | [inline] |
| SCEVHandle ScalarEvolution::getUDivExpr | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) |
Definition at line 1112 of file ScalarEvolution.cpp.
References llvm::ConstantExpr::getUDiv(), and getUnknown().
Referenced by BinomialCoefficient(), and llvm::SCEVUDivExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getAddRecExpr | ( | const SCEVHandle & | Start, | |
| const SCEVHandle & | Step, | |||
| const Loop * | L | |||
| ) |
SCEVAddRecExpr::get - Get a add recurrence expression for the specified loop. Simplify the expression as much as possible.
Definition at line 1134 of file ScalarEvolution.cpp.
Referenced by getAddExpr(), getAddRecExpr(), getMulExpr(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), llvm::SCEVAddRecExpr::getStepRecurrence(), getTruncateExpr(), MoveImmediateValues(), MoveLoopVariantsToImmediateField(), llvm::SCEVAddRecExpr::replaceSymbolicValuesWithConcrete(), SeparateSubExprs(), and llvm::SCEVExpander::visitAddRecExpr().
| SCEVHandle ScalarEvolution::getAddRecExpr | ( | std::vector< SCEVHandle > & | Operands, | |
| const Loop * | L | |||
| ) |
SCEVAddRecExpr::get - Get a add recurrence expression for the specified loop. Simplify the expression as much as possible.
Definition at line 1151 of file ScalarEvolution.cpp.
References getAddRecExpr(), and llvm::LoopBase< BlockT >::getLoopDepth().
| SCEVHandle llvm::ScalarEvolution::getAddRecExpr | ( | const std::vector< SCEVHandle > & | Operands, | |
| const Loop * | L | |||
| ) | [inline] |
| SCEVHandle ScalarEvolution::getSMaxExpr | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) |
Definition at line 1180 of file ScalarEvolution.cpp.
Referenced by getSMaxExpr(), and llvm::SCEVCommutativeExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getSMaxExpr | ( | std::vector< SCEVHandle > | Operands | ) |
Definition at line 1188 of file ScalarEvolution.cpp.
References llvm::ConstantInt::get(), getConstant(), getSMaxExpr(), GroupByComplexity(), Idx, llvm::scSMaxExpr, and llvm::APIntOps::smax().
| SCEVHandle ScalarEvolution::getUMaxExpr | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) |
Definition at line 1260 of file ScalarEvolution.cpp.
Referenced by getUMaxExpr(), and llvm::SCEVCommutativeExpr::replaceSymbolicValuesWithConcrete().
| SCEVHandle ScalarEvolution::getUMaxExpr | ( | std::vector< SCEVHandle > | Operands | ) |
Definition at line 1268 of file ScalarEvolution.cpp.
References llvm::ConstantInt::get(), getConstant(), getUMaxExpr(), GroupByComplexity(), Idx, llvm::scUMaxExpr, and llvm::APIntOps::umax().
| SCEVHandle ScalarEvolution::getUnknown | ( | Value * | V | ) |
Definition at line 1340 of file ScalarEvolution.cpp.
References getConstant().
Referenced by getIntegerSCEV(), getNegativeSCEV(), getNotSCEV(), getSignExtendExpr(), getTruncateExpr(), getUDivExpr(), getZeroExtendExpr(), and llvm::SCEVExpander::visitAddRecExpr().
| SCEVHandle ScalarEvolution::getNegativeSCEV | ( | const SCEVHandle & | V | ) |
getNegativeSCEV - Return the SCEV object corresponding to -V.
getNegativeSCEV - Return a SCEV corresponding to -V = -1*V
Definition at line 483 of file ScalarEvolution.cpp.
References llvm::ConstantInt::getAllOnesValue(), getConstant(), getMulExpr(), llvm::ConstantExpr::getNeg(), getUnknown(), and llvm::ARMCC::VC.
Referenced by getMinusSCEV(), and llvm::SCEVAddRecExpr::getNumIterationsInRange().
| SCEVHandle ScalarEvolution::getNotSCEV | ( | const SCEVHandle & | V | ) |
getNotSCEV - Return a SCEV corresponding to ~V = -1-V
getNotSCEV - Return the SCEV object corresponding to ~V.
Definition at line 491 of file ScalarEvolution.cpp.
References llvm::ConstantInt::getAllOnesValue(), getConstant(), getMinusSCEV(), llvm::ConstantExpr::getNot(), getUnknown(), and llvm::ARMCC::VC.
| SCEVHandle ScalarEvolution::getMinusSCEV | ( | const SCEVHandle & | LHS, | |
| const SCEVHandle & | RHS | |||
| ) |
getMinusSCEV - Return LHS-RHS.
getMinusSCEV - Return a SCEV corresponding to LHS - RHS.
Definition at line 501 of file ScalarEvolution.cpp.
References getAddExpr(), and getNegativeSCEV().
Referenced by BinomialCoefficient(), getNotSCEV(), and RemoveCommonExpressionsFromUseBases().
| SCEVHandle ScalarEvolution::getTruncateOrZeroExtend | ( | const SCEVHandle & | V, | |
| const Type * | Ty | |||
| ) |
getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion of the input value to the specified type. If the type must be extended, it is zero extended.
getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion of the input value to the specified type. If the type must be extended, it is zero extended.
Definition at line 716 of file ScalarEvolution.cpp.
References llvm::Type::getPrimitiveSizeInBits(), getTruncateExpr(), getZeroExtendExpr(), and llvm::Type::isInteger().
Referenced by BinomialCoefficient().
| SCEVHandle ScalarEvolution::getIntegerSCEV | ( | int | Val, | |
| const Type * | Ty | |||
| ) |
getIntegerSCEV - Given an integer or FP type, create a constant for the specified signed integer value and return a SCEV for the constant.
getIntegerSCEV - Given an integer or FP type, create a constant for the specified signed integer value and return a SCEV for the constant.
Definition at line 469 of file ScalarEvolution.cpp.
References llvm::lltok::APFloat, llvm::CallingConv::C, llvm::Type::FloatTy, llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::Constant::getNullValue(), getUnknown(), llvm::APFloat::IEEEdouble, llvm::APFloat::IEEEsingle, and llvm::Type::isFloatingPoint().
Referenced by BinomialCoefficient(), getAddExpr(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), MoveImmediateValues(), MoveLoopVariantsToImmediateField(), RemoveCommonExpressionsFromUseBases(), SeparateSubExprs(), and llvm::SCEVExpander::visitAddRecExpr().
| bool ScalarEvolution::hasSCEV | ( | Value * | V | ) | const |
hasSCEV - Return true if the SCEV for this value has already been computed.
hasSCEV - Return true if the SCEV for this value has already been computed.
Definition at line 2998 of file ScalarEvolution.cpp.
| void ScalarEvolution::setSCEV | ( | Value * | V, | |
| const SCEVHandle & | H | |||
| ) |
setSCEV - Insert the specified SCEV into the map of current SCEVs for the specified value.
setSCEV - Insert the specified SCEV into the map of current SCEVs for the specified value.
Definition at line 3005 of file ScalarEvolution.cpp.
| SCEVHandle ScalarEvolution::getSCEVAtScope | ( | Value * | V, | |
| const Loop * | L | |||
| ) | const |
getSCEVAtScope - Return a SCEV expression handle for the specified value at the specified scope in the program. The L value specifies a loop nest to evaluate the expression at, where null is the top-level or a specified loop is immediately inside of the loop.
This method can be used to compute the exit value for a variable defined in a loop by querying what the value will hold in the parent loop.
If this value is not computable at this scope, a SCEVCouldNotCompute object is returned.
Definition at line 3018 of file ScalarEvolution.cpp.
References getSCEV().
Referenced by print().
| SCEVHandle ScalarEvolution::getIterationCount | ( | const Loop * | L | ) | const |
getIterationCount - If the specified loop has a predictable iteration count, return it, otherwise return a SCEVCouldNotCompute object.
Definition at line 3010 of file ScalarEvolution.cpp.
Referenced by hasLoopInvariantIterationCount(), and PrintLoopInfo().
| bool ScalarEvolution::hasLoopInvariantIterationCount | ( | const Loop * | L | ) | const |
hasLoopInvariantIterationCount - Return true if the specified loop has an analyzable loop-invariant iteration count.
Definition at line 3014 of file ScalarEvolution.cpp.
References getIterationCount().
Referenced by PrintLoopInfo().
| void ScalarEvolution::deleteValueFromRecords | ( | Value * | V | ) | const |
deleteValueFromRecords - This method should be called by the client before it removes a Value from the program, to make sure that no dangling references are left around.
Definition at line 3022 of file ScalarEvolution.cpp.
| bool ScalarEvolution::runOnFunction | ( | Function & | F | ) | [virtual] |
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
Implements llvm::FunctionPass.
Definition at line 2977 of file ScalarEvolution.cpp.
| void ScalarEvolution::releaseMemory | ( | ) | [virtual] |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.
Optionally implement this function to release pass memory when it is no longer used.
Reimplemented from llvm::Pass.
Definition at line 2982 of file ScalarEvolution.cpp.
| void ScalarEvolution::getAnalysisUsage | ( | AnalysisUsage & | ) | const [virtual] |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 2987 of file ScalarEvolution.cpp.
References llvm::AnalysisUsage::addRequiredTransitive(), and llvm::AnalysisUsage::setPreservesAll().
| void ScalarEvolution::print | ( | std::ostream & | O, | |
| const Module * | M = 0 | |||
| ) | const [virtual] |
print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.
Reimplemented from llvm::Pass.
Definition at line 3048 of file ScalarEvolution.cpp.
References llvm::LoopInfo::begin(), E, llvm::LoopInfo::end(), F, llvm::LoopInfo::getLoopFor(), llvm::Value::getName(), llvm::LoopBase< BlockT >::getParentLoop(), getSCEV(), getSCEVAtScope(), llvm::inst_begin(), llvm::inst_end(), and PrintLoopInfo().
Referenced by print().
| void llvm::ScalarEvolution::print | ( | std::ostream * | OS, | |
| const Module * | M = 0 | |||
| ) | const [inline] |
char ScalarEvolution::ID = 0 [static] |
Definition at line 193 of file ScalarEvolution.h.