LLVM API Documentation

Public Member Functions | Public Attributes | Static Public Attributes
llvm::PostDominatorTree Struct Reference

#include <PostDominators.h>

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

List of all members.

Public Member Functions

 PostDominatorTree ()
 ~PostDominatorTree ()
virtual bool runOnFunction (Function &F)
virtual void getAnalysisUsage (AnalysisUsage &AU) const
const std::vector< BasicBlock * > & getRoots () const
DomTreeNodegetRootNode () const
DomTreeNodeoperator[] (BasicBlock *BB) const
DomTreeNodegetNode (BasicBlock *BB) const
bool dominates (DomTreeNode *A, DomTreeNode *B) const
bool dominates (const BasicBlock *A, const BasicBlock *B) const
bool properlyDominates (const DomTreeNode *A, DomTreeNode *B) const
bool properlyDominates (BasicBlock *A, BasicBlock *B) const
BasicBlockfindNearestCommonDominator (BasicBlock *A, BasicBlock *B)
const BasicBlockfindNearestCommonDominator (const BasicBlock *A, const BasicBlock *B)
virtual void releaseMemory ()
virtual void print (raw_ostream &OS, const Module *) const

Public Attributes

DominatorTreeBase< BasicBlock > * DT

Static Public Attributes

static char ID = 0

Detailed Description

PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the a post-dominator tree.

Definition at line 24 of file PostDominators.h.


Constructor & Destructor Documentation

llvm::PostDominatorTree::PostDominatorTree ( ) [inline]
PostDominatorTree::~PostDominatorTree ( )

Definition at line 39 of file PostDominators.cpp.

References DT.


Member Function Documentation

bool llvm::PostDominatorTree::dominates ( DomTreeNode A,
DomTreeNode B 
) const [inline]

Definition at line 57 of file PostDominators.h.

References llvm::DominatorTreeBase< NodeT >::dominates(), and DT.

bool llvm::PostDominatorTree::dominates ( const BasicBlock A,
const BasicBlock B 
) const [inline]

Definition at line 61 of file PostDominators.h.

References llvm::DominatorTreeBase< NodeT >::dominates(), and DT.

BasicBlock* llvm::PostDominatorTree::findNearestCommonDominator ( BasicBlock A,
BasicBlock B 
) [inline]
const BasicBlock* llvm::PostDominatorTree::findNearestCommonDominator ( const BasicBlock A,
const BasicBlock B 
) [inline]
virtual void llvm::PostDominatorTree::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 37 of file PostDominators.h.

References llvm::AnalysisUsage::setPreservesAll().

DomTreeNode* llvm::PostDominatorTree::getNode ( BasicBlock BB) const [inline]

Definition at line 53 of file PostDominators.h.

References DT, and llvm::DominatorTreeBase< NodeT >::getNode().

DomTreeNode* llvm::PostDominatorTree::getRootNode ( ) const [inline]
const std::vector<BasicBlock*>& llvm::PostDominatorTree::getRoots ( ) const [inline]

Definition at line 41 of file PostDominators.h.

References DT, and llvm::DominatorBase< NodeT >::getRoots().

DomTreeNode* llvm::PostDominatorTree::operator[] ( BasicBlock BB) const [inline]

Definition at line 49 of file PostDominators.h.

References DT, and llvm::DominatorTreeBase< NodeT >::getNode().

void PostDominatorTree::print ( raw_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 43 of file PostDominators.cpp.

References DT, and llvm::DominatorTreeBase< NodeT >::print().

bool llvm::PostDominatorTree::properlyDominates ( const DomTreeNode A,
DomTreeNode B 
) const [inline]

Definition at line 65 of file PostDominators.h.

References DT, and llvm::DominatorTreeBase< NodeT >::properlyDominates().

bool llvm::PostDominatorTree::properlyDominates ( BasicBlock A,
BasicBlock B 
) const [inline]

Definition at line 69 of file PostDominators.h.

References DT, and llvm::DominatorTreeBase< NodeT >::properlyDominates().

virtual void llvm::PostDominatorTree::releaseMemory ( ) [inline, 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 82 of file PostDominators.h.

References DT, and llvm::DominatorTreeBase< NodeT >::releaseMemory().

virtual bool llvm::PostDominatorTree::runOnFunction ( Function F) [virtual]

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

Implements llvm::FunctionPass.


Member Data Documentation

char PostDominatorTree::ID = 0 [static]

Definition at line 25 of file PostDominators.h.


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