LLVM API Documentation

llvm::LoopDependenceAnalysis Class Reference

#include <LoopDependenceAnalysis.h>

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

List of all members.

Public Member Functions

 LoopDependenceAnalysis ()
bool isDependencePair (const Value *, const Value *) const
bool depends (Value *, Value *)
bool runOnLoop (Loop *, LPPassManager &)
virtual void releaseMemory ()
virtual void getAnalysisUsage (AnalysisUsage &) const
void print (raw_ostream &, const Module *=0) const
virtual void print (std::ostream &, const Module *=0) const

Static Public Attributes

static char ID = 0

Classes

struct  DependencePair
struct  Subscript
 TODO: doc.


Detailed Description

Definition at line 39 of file LoopDependenceAnalysis.h.


Constructor & Destructor Documentation

llvm::LoopDependenceAnalysis::LoopDependenceAnalysis (  )  [inline]

Definition at line 95 of file LoopDependenceAnalysis.h.


Member Function Documentation

bool LoopDependenceAnalysis::isDependencePair ( const Value *  A,
const Value *  B 
) const

isDependencePair - Check wether two values can possibly give rise to a data dependence: that is the case if both are instructions accessing memory and at least one of those accesses is a write.

Definition at line 103 of file LoopDependenceAnalysis.cpp.

References IsMemRefInstr().

Referenced by depends(), and PrintLoopInfo().

bool LoopDependenceAnalysis::depends ( Value *  A,
Value *  B 
)

depends - Return a boolean indicating if there is a data dependence between two instructions.

Definition at line 283 of file LoopDependenceAnalysis.cpp.

References isDependencePair().

Referenced by PrintLoopInfo().

bool LoopDependenceAnalysis::runOnLoop ( Loop *  L,
LPPassManager &   
) [virtual]

Implements llvm::LoopPass.

Definition at line 304 of file LoopDependenceAnalysis.cpp.

void LoopDependenceAnalysis::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 311 of file LoopDependenceAnalysis.cpp.

References llvm::BumpPtrAllocator::Reset().

void LoopDependenceAnalysis::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 316 of file LoopDependenceAnalysis.cpp.

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

void LoopDependenceAnalysis::print ( raw_ostream &  OS,
const Module *  = 0 
) const

Definition at line 349 of file LoopDependenceAnalysis.cpp.

References PrintLoopInfo().

Referenced by print().

void LoopDependenceAnalysis::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 354 of file LoopDependenceAnalysis.cpp.

References print().


Member Data Documentation

char LoopDependenceAnalysis::ID = 0 [static]

Definition at line 94 of file LoopDependenceAnalysis.h.


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