LLVM  4.0.0
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
llvm::DominanceFrontierBase< BlockT > Class Template Reference

DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function. More...

#include <DominanceFrontier.h>

Inheritance diagram for llvm::DominanceFrontierBase< BlockT >:
[legend]
Collaboration diagram for llvm::DominanceFrontierBase< BlockT >:
[legend]

Public Types

typedef std::set< BlockT * > DomSetType
 
typedef std::map< BlockT
*, DomSetType
DomSetMapType
 
typedef DomSetMapType::iterator iterator
 
typedef
DomSetMapType::const_iterator 
const_iterator
 

Public Member Functions

 DominanceFrontierBase (bool isPostDom)
 
const std::vector< BlockT * > & getRoots () const
 getRoots - Return the root blocks of the current CFG. More...
 
BlockT * getRoot () const
 
bool isPostDominator () const
 isPostDominator - Returns true if analysis based of postdoms More...
 
void releaseMemory ()
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator find (BlockT *B)
 
const_iterator find (BlockT *B) const
 
iterator addBasicBlock (BlockT *BB, const DomSetType &frontier)
 
void removeBlock (BlockT *BB)
 removeBlock - Remove basic block BB's frontier. More...
 
void addToFrontier (iterator I, BlockT *Node)
 
void removeFromFrontier (iterator I, BlockT *Node)
 
bool compareDomSet (DomSetType &DS1, const DomSetType &DS2) const
 compareDomSet - Return false if two domsets match. More...
 
bool compare (DominanceFrontierBase< BlockT > &Other) const
 compare - Return true if the other dominance frontier base matches this dominance frontier base. More...
 
void print (raw_ostream &OS) const
 print - Convert to human readable form More...
 
void dump () const
 dump - Dump the dominance frontier to dbgs(). More...
 

Protected Types

typedef GraphTraits< BlockT * > BlockTraits
 

Protected Attributes

DomSetMapType Frontiers
 
std::vector< BlockT * > Roots
 
const bool IsPostDominators
 

Detailed Description

template<class BlockT>
class llvm::DominanceFrontierBase< BlockT >

DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function.

Definition at line 33 of file DominanceFrontier.h.

Member Typedef Documentation

template<class BlockT>
typedef GraphTraits<BlockT *> llvm::DominanceFrontierBase< BlockT >::BlockTraits
protected

Definition at line 39 of file DominanceFrontier.h.

template<class BlockT>
typedef DomSetMapType::const_iterator llvm::DominanceFrontierBase< BlockT >::const_iterator

Definition at line 73 of file DominanceFrontier.h.

template<class BlockT>
typedef std::map<BlockT *, DomSetType> llvm::DominanceFrontierBase< BlockT >::DomSetMapType

Definition at line 36 of file DominanceFrontier.h.

template<class BlockT>
typedef std::set<BlockT *> llvm::DominanceFrontierBase< BlockT >::DomSetType

Definition at line 35 of file DominanceFrontier.h.

template<class BlockT>
typedef DomSetMapType::iterator llvm::DominanceFrontierBase< BlockT >::iterator

Definition at line 72 of file DominanceFrontier.h.

Constructor & Destructor Documentation

template<class BlockT>
llvm::DominanceFrontierBase< BlockT >::DominanceFrontierBase ( bool  isPostDom)
inline

Definition at line 46 of file DominanceFrontier.h.

Member Function Documentation

template<class BlockT>
iterator llvm::DominanceFrontierBase< BlockT >::addBasicBlock ( BlockT *  BB,
const DomSetType frontier 
)
inline

Definition at line 81 of file DominanceFrontier.h.

template<class BlockT>
void llvm::DominanceFrontierBase< BlockT >::addToFrontier ( iterator  I,
BlockT *  Node 
)

Definition at line 51 of file DominanceFrontierImpl.h.

References assert(), and llvm::sys::path::end().

template<class BlockT>
iterator llvm::DominanceFrontierBase< BlockT >::begin ( )
inline

Definition at line 74 of file DominanceFrontier.h.

Referenced by llvm::DominanceFrontierBase< BlockT >::compare().

template<class BlockT>
const_iterator llvm::DominanceFrontierBase< BlockT >::begin ( ) const
inline

Definition at line 75 of file DominanceFrontier.h.

template<class BlockT>
bool llvm::DominanceFrontierBase< BlockT >::compare ( DominanceFrontierBase< BlockT > &  Other) const

compare - Return true if the other dominance frontier base matches this dominance frontier base.

Otherwise return false.

Definition at line 92 of file DominanceFrontierImpl.h.

References llvm::DominanceFrontierBase< BlockT >::begin(), E, llvm::DominanceFrontierBase< BlockT >::end(), llvm::sys::path::end(), llvm::find(), and I.

template<class BlockT >
bool llvm::DominanceFrontierBase< BlockT >::compareDomSet ( DomSetType DS1,
const DomSetType DS2 
) const

compareDomSet - Return false if two domsets match.

Otherwise return true;

Definition at line 67 of file DominanceFrontierImpl.h.

References E, and I.

template<class BlockT >
void llvm::DominanceFrontierBase< BlockT >::dump ( ) const

dump - Dump the dominance frontier to dbgs().

Definition at line 146 of file DominanceFrontierImpl.h.

References llvm::dbgs().

template<class BlockT>
iterator llvm::DominanceFrontierBase< BlockT >::end ( )
inline
template<class BlockT>
const_iterator llvm::DominanceFrontierBase< BlockT >::end ( ) const
inline

Definition at line 77 of file DominanceFrontier.h.

template<class BlockT>
iterator llvm::DominanceFrontierBase< BlockT >::find ( BlockT *  B)
inline
template<class BlockT>
const_iterator llvm::DominanceFrontierBase< BlockT >::find ( BlockT *  B) const
inline

Definition at line 79 of file DominanceFrontier.h.

template<class BlockT>
BlockT* llvm::DominanceFrontierBase< BlockT >::getRoot ( ) const
inline

Definition at line 56 of file DominanceFrontier.h.

template<class BlockT>
const std::vector<BlockT *>& llvm::DominanceFrontierBase< BlockT >::getRoots ( ) const
inline

getRoots - Return the root blocks of the current CFG.

This may include multiple blocks if we are computing post dominators. For forward dominators, this will always be a single block (the entry node).

Definition at line 52 of file DominanceFrontier.h.

template<class BlockT>
bool llvm::DominanceFrontierBase< BlockT >::isPostDominator ( ) const
inline

isPostDominator - Returns true if analysis based of postdoms

Definition at line 63 of file DominanceFrontier.h.

template<class BlockT >
void llvm::DominanceFrontierBase< BlockT >::print ( raw_ostream OS) const

print - Convert to human readable form

Definition at line 122 of file DominanceFrontierImpl.h.

References llvm::sys::path::begin(), E, llvm::sys::path::end(), and I.

Referenced by llvm::DominanceFrontierWrapperPass::print().

template<class BlockT>
void llvm::DominanceFrontierBase< BlockT >::releaseMemory ( )
inline
template<class BlockT>
void llvm::DominanceFrontierBase< BlockT >::removeBlock ( BlockT *  BB)

removeBlock - Remove basic block BB's frontier.

Definition at line 43 of file DominanceFrontierImpl.h.

References assert(), llvm::sys::path::begin(), E, llvm::sys::path::end(), llvm::find(), and I.

template<class BlockT>
void llvm::DominanceFrontierBase< BlockT >::removeFromFrontier ( iterator  I,
BlockT *  Node 
)

Definition at line 59 of file DominanceFrontierImpl.h.

References assert(), and llvm::sys::path::end().

Member Data Documentation

template<class BlockT>
DomSetMapType llvm::DominanceFrontierBase< BlockT >::Frontiers
protected
template<class BlockT>
const bool llvm::DominanceFrontierBase< BlockT >::IsPostDominators
protected
template<class BlockT>
std::vector<BlockT *> llvm::DominanceFrontierBase< BlockT >::Roots
protected

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