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 ()
bool runOnFunction (Function &F) override
void getAnalysisUsage (AnalysisUsage &AU) const override
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)
void getDescendants (BasicBlock *R, SmallVectorImpl< BasicBlock * > &Result) const
 Get all nodes post-dominated by R, including R itself.
void releaseMemory () override
void print (raw_ostream &OS, const Module *) const override

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 post-dominator tree.

Definition at line 24 of file PostDominators.h.


Constructor & Destructor Documentation

Definition at line 38 of file PostDominators.cpp.

References DT.


Member Function Documentation

Definition at line 57 of file PostDominators.h.

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

Definition at line 61 of file PostDominators.h.

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

void llvm::PostDominatorTree::getAnalysisUsage ( AnalysisUsage ) const [inline, override, 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().

void llvm::PostDominatorTree::getDescendants ( BasicBlock R,
SmallVectorImpl< BasicBlock * > &  Result 
) const [inline]

Get all nodes post-dominated by R, including R itself.

Definition at line 83 of file PostDominators.h.

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

Definition at line 53 of file PostDominators.h.

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

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 [override, 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 42 of file PostDominators.cpp.

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

Definition at line 65 of file PostDominators.h.

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

Definition at line 69 of file PostDominators.h.

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

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

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

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: