LLVM API Documentation

llvm::LoopVR Class Reference

#include <LoopVR.h>

Inheritance diagram for llvm::LoopVR:
[legend]
Collaboration diagram for llvm::LoopVR:
[legend]

List of all members.

Public Types

typedef std::map< Value
*, ConstantRange * >::iterator 
iterator

Public Member Functions

 LoopVR ()
bool runOnFunction (Function &F)
virtual void print (std::ostream &os, const Module *) const
void releaseMemory ()
void getAnalysisUsage (AnalysisUsage &AU) const
ConstantRange get (Value *V)
 get - return the ConstantRange for a given Value of IntegerType.
void remove (Value *V)
 remove - remove a value from this analysis.
void narrow (Value *V, const ConstantRange &CR)
unsigned size () const
 size - returns the number of Values with information
iterator begin ()
 begin - return an iterator to the first Value, ConstantRange pair
iterator end ()
 end - return an iterator one past the last Value, ConstantRange pair
Value * getValue (iterator I)
 getValue - return the Value referenced by an iterator
ConstantRange getConstantRange (iterator I)
 getConstantRange - return the ConstantRange referenced by an iterator

Static Public Attributes

static char ID = 0


Detailed Description

LoopVR - This class maintains a mapping of Values to ConstantRanges. There are interfaces to look up and update ranges by value, and for accessing all values with range information.

Definition at line 29 of file LoopVR.h.


Member Typedef Documentation

Definition at line 64 of file LoopVR.h.


Constructor & Destructor Documentation

llvm::LoopVR::LoopVR (  )  [inline]

Definition at line 33 of file LoopVR.h.


Member Function Documentation

bool LoopVR::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 222 of file LoopVR.cpp.

void LoopVR::print ( std::ostream &  O,
const Module *  M 
) 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 224 of file LoopVR.cpp.

References E, and OS.

void LoopVR::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 232 of file LoopVR.cpp.

References E.

void llvm::LoopVR::getAnalysisUsage ( AnalysisUsage &   )  const [inline, 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 39 of file LoopVR.h.

References llvm::AnalysisUsage::addRequiredTransitive(), and llvm::AnalysisUsage::setPreservesAll().

ConstantRange LoopVR::get ( Value *  V  ) 

get - return the ConstantRange for a given Value of IntegerType.

Definition at line 264 of file LoopVR.cpp.

void LoopVR::remove ( Value *  V  ) 

remove - remove a value from this analysis.

Definition at line 275 of file LoopVR.cpp.

void LoopVR::narrow ( Value *  V,
const ConstantRange &  CR 
)

narrow - improve our unterstanding of a Value by pointing out that it must fall within ConstantRange. To replace a range, remove it first.

Definition at line 283 of file LoopVR.cpp.

References llvm::ConstantRange::isFullSet().

unsigned llvm::LoopVR::size (  )  const [inline]

size - returns the number of Values with information

Definition at line 62 of file LoopVR.h.

iterator llvm::LoopVR::begin (  )  [inline]

begin - return an iterator to the first Value, ConstantRange pair

Definition at line 67 of file LoopVR.h.

iterator llvm::LoopVR::end (  )  [inline]

end - return an iterator one past the last Value, ConstantRange pair

Definition at line 70 of file LoopVR.h.

Value* llvm::LoopVR::getValue ( iterator  I  )  [inline]

getValue - return the Value referenced by an iterator

Definition at line 73 of file LoopVR.h.

ConstantRange llvm::LoopVR::getConstantRange ( iterator  I  )  [inline]

getConstantRange - return the ConstantRange referenced by an iterator

Definition at line 76 of file LoopVR.h.


Member Data Documentation

char LoopVR::ID = 0 [static]

Definition at line 31 of file LoopVR.h.


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