LLVM API Documentation

Public Types | Public Member Functions | Static Public Attributes
llvm::DominanceFrontier Class Reference

#include <DominanceFrontier.h>

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

List of all members.

Public Types

typedef DominatorTreeBase
< BasicBlock
DomTreeT
typedef DomTreeNodeBase
< BasicBlock
DomTreeNodeT
typedef DominanceFrontierBase
< BasicBlock >::DomSetType 
DomSetType
typedef DominanceFrontierBase
< BasicBlock >::iterator 
iterator
typedef DominanceFrontierBase
< BasicBlock >::const_iterator 
const_iterator

Public Member Functions

 DominanceFrontier ()
ForwardDominanceFrontierBase
< BasicBlock > & 
getBase ()
const std::vector< BasicBlock * > & getRoots () const
BasicBlockgetRoot () const
bool isPostDominator () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
iterator find (BasicBlock *B)
const_iterator find (BasicBlock *B) const
iterator addBasicBlock (BasicBlock *BB, const DomSetType &frontier)
void removeBlock (BasicBlock *BB)
void addToFrontier (iterator I, BasicBlock *Node)
void removeFromFrontier (iterator I, BasicBlock *Node)
bool compareDomSet (DomSetType &DS1, const DomSetType &DS2) const
bool compare (DominanceFrontierBase< BasicBlock > &Other) const
void releaseMemory () override
bool runOnFunction (Function &) override
void getAnalysisUsage (AnalysisUsage &AU) const override
void print (raw_ostream &OS, const Module *=nullptr) const override
void dump () const

Static Public Attributes

static char ID = 0

Detailed Description

Definition at line 134 of file DominanceFrontier.h.


Member Typedef Documentation

Definition at line 142 of file DominanceFrontier.h.

Definition at line 140 of file DominanceFrontier.h.

Definition at line 139 of file DominanceFrontier.h.

Definition at line 138 of file DominanceFrontier.h.

Definition at line 141 of file DominanceFrontier.h.


Constructor & Destructor Documentation


Member Function Documentation

void llvm::DominanceFrontier::addToFrontier ( iterator  I,
BasicBlock Node 
) [inline]
void DominanceFrontier::dump ( ) const

Reimplemented from llvm::Pass.

Definition at line 54 of file DominanceFrontier.cpp.

References llvm::dbgs(), and print().

Definition at line 162 of file DominanceFrontier.h.

References llvm::DominanceFrontierBase< BlockT >::end().

Definition at line 164 of file DominanceFrontier.h.

References llvm::DominanceFrontierBase< BlockT >::end().

void DominanceFrontier::getAnalysisUsage ( AnalysisUsage ) const [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 44 of file DominanceFrontier.cpp.

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

Definition at line 148 of file DominanceFrontier.h.

const std::vector<BasicBlock *>& llvm::DominanceFrontier::getRoots ( ) const [inline]
void DominanceFrontier::print ( raw_ostream O,
const Module M = nullptr 
) 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 49 of file DominanceFrontier.cpp.

References llvm::DominanceFrontierBase< BlockT >::print().

Referenced by dump().

void DominanceFrontier::releaseMemory ( ) [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 34 of file DominanceFrontier.cpp.

References llvm::DominanceFrontierBase< BlockT >::releaseMemory().

Referenced by runOnFunction().

bool DominanceFrontier::runOnFunction ( Function F) [override, virtual]

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

Implements llvm::FunctionPass.

Definition at line 38 of file DominanceFrontier.cpp.

References llvm::ForwardDominanceFrontierBase< BlockT >::analyze(), and releaseMemory().


Member Data Documentation

char DominanceFrontier::ID = 0 [static]

Definition at line 144 of file DominanceFrontier.h.


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