LLVM API Documentation
#include <ScalarEvolution.h>
Inheritance diagram for llvm::ScalarEvolution:
Public Member Functions | |
ScalarEvolution () | |
SCEVHandle | getSCEV (Value *V) const |
bool | hasSCEV (Value *V) const |
void | setSCEV (Value *V, const SCEVHandle &H) |
SCEVHandle | getSCEVAtScope (Value *V, const Loop *L) const |
SCEVHandle | getIterationCount (const Loop *L) const |
bool | hasLoopInvariantIterationCount (const Loop *L) const |
void | deleteInstructionFromRecords (Instruction *I) const |
virtual bool | runOnFunction (Function &F) |
virtual void | releaseMemory () |
virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
virtual void | print (std::ostream &OS, const Module *=0) const |
Definition at line 189 of file ScalarEvolution.h.
llvm::ScalarEvolution::ScalarEvolution | ( | ) | [inline] |
Definition at line 192 of file ScalarEvolution.h.
void ScalarEvolution::deleteInstructionFromRecords | ( | Instruction * | I | ) | const |
deleteInstructionFromRecords - This method should be called by the client before it removes an instruction from the program, to make sure that no dangling references are left around.
Definition at line 2472 of file ScalarEvolution.cpp.
void ScalarEvolution::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | 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 2437 of file ScalarEvolution.cpp.
References llvm::AnalysisUsage::addRequiredTransitive(), and llvm::AnalysisUsage::setPreservesAll().
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 2460 of file ScalarEvolution.cpp.
Referenced by hasLoopInvariantIterationCount(), and PrintLoopInfo().
SCEVHandle ScalarEvolution::getSCEV | ( | Value * | V | ) | const |
getSCEV - Return a SCEV expression handle for the full generality of the specified expression.
Definition at line 2442 of file ScalarEvolution.cpp.
References V.
Referenced by getSCEVAtScope(), and print().
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 2468 of file ScalarEvolution.cpp.
Referenced by print().
bool ScalarEvolution::hasLoopInvariantIterationCount | ( | const Loop * | L | ) | const |
hasLoopInvariantIterationCount - Return true if the specified loop has an analyzable loop-invariant iteration count.
Definition at line 2464 of file ScalarEvolution.cpp.
References getIterationCount().
Referenced by PrintLoopInfo().
bool ScalarEvolution::hasSCEV | ( | Value * | V | ) | const |
hasSCEV - Return true if the SCEV for this value has already been computed.
Definition at line 2448 of file ScalarEvolution.cpp.
References V.
void ScalarEvolution::print | ( | std::ostream & | OS, | |
const Module * | = 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 2498 of file ScalarEvolution.cpp.
References llvm::LoopInfo::begin(), Bounds, E, llvm::LoopInfo::end(), F, llvm::LoopInfo::getLoopFor(), llvm::Loop::getParentLoop(), getSCEV(), getSCEVAtScope(), llvm::inst_begin(), llvm::inst_end(), llvm::ConstantRange::isFullSet(), LI, and PrintLoopInfo().
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 2432 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 2427 of file ScalarEvolution.cpp.
References F.
void ScalarEvolution::setSCEV | ( | Value * | V, | |
const SCEVHandle & | H | |||
) |
setSCEV - Insert the specified SCEV into the map of current SCEVs for the specified value.
Definition at line 2455 of file ScalarEvolution.cpp.