LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::ScalarEvolution Class Reference

#include <ScalarEvolution.h>

Inheritance diagram for llvm::ScalarEvolution:

Inheritance graph
[legend]
Collaboration diagram for llvm::ScalarEvolution:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ScalarEvolution ()
SCEVHandle getSCEV (Value *V) const
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

Detailed Description

ScalarEvolution - This class is the main scalar evolution driver. Because client code (intentionally) can't do much with the SCEV objects directly, they must ask this class for services.

Definition at line 168 of file ScalarEvolution.h.


Constructor & Destructor Documentation

llvm::ScalarEvolution::ScalarEvolution  )  [inline]
 

Definition at line 171 of file ScalarEvolution.h.


Member Function Documentation

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 2303 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 2281 of file ScalarEvolution.cpp.

References llvm::AnalysisUsage::addRequiredID(), llvm::AnalysisUsage::addRequiredTransitive(), llvm::LoopSimplifyID, 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 2291 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 2287 of file ScalarEvolution.cpp.

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 2299 of file ScalarEvolution.cpp.

References getSCEV().

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 2295 of file ScalarEvolution.cpp.

References getIterationCount().

Referenced by PrintLoopInfo().

void ScalarEvolution::print std::ostream &  OS  )  const [virtual]
 

Reimplemented from llvm::Pass.

Definition at line 2329 of file ScalarEvolution.cpp.

References llvm::LoopInfo::begin(), E, llvm::LoopInfo::end(), F, llvm::LoopInfo::getLoopFor(), llvm::Value::getName(), llvm::Loop::getParentLoop(), getSCEV(), getSCEVAtScope(), llvm::inst_begin(), llvm::inst_end(), llvm::ConstantRange::isFullSet(), 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 2276 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 2271 of file ScalarEvolution.cpp.


The documentation for this class was generated from the following files: