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

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

#include "llvm/Analysis/DominanceFrontier.h"

Inheritance diagram for llvm::DominanceFrontierBase< BlockT, IsPostDom >:
[legend]
Collaboration diagram for llvm::DominanceFrontierBase< BlockT, IsPostDom >:
[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 ()
 
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 &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
 

Static Protected Attributes

static constexpr bool IsPostDominators = IsPostDom
 

Detailed Description

template<class BlockT, bool IsPostDom>
class llvm::DominanceFrontierBase< BlockT, IsPostDom >

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, bool IsPostDom>
typedef GraphTraits<BlockT *> llvm::DominanceFrontierBase< BlockT, IsPostDom >::BlockTraits
protected

Definition at line 39 of file DominanceFrontier.h.

template<class BlockT, bool IsPostDom>
typedef DomSetMapType::const_iterator llvm::DominanceFrontierBase< BlockT, IsPostDom >::const_iterator

Definition at line 73 of file DominanceFrontier.h.

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

Definition at line 36 of file DominanceFrontier.h.

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

Definition at line 35 of file DominanceFrontier.h.

template<class BlockT, bool IsPostDom>
typedef DomSetMapType::iterator llvm::DominanceFrontierBase< BlockT, IsPostDom >::iterator

Definition at line 72 of file DominanceFrontier.h.

Constructor & Destructor Documentation

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

Definition at line 46 of file DominanceFrontier.h.

Member Function Documentation

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

Definition at line 81 of file DominanceFrontier.h.

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

Definition at line 51 of file DominanceFrontierImpl.h.

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

template<class BlockT, bool IsPostDom>
iterator llvm::DominanceFrontierBase< BlockT, IsPostDom >::begin ( )
inline
template<class BlockT, bool IsPostDom>
const_iterator llvm::DominanceFrontierBase< BlockT, IsPostDom >::begin ( ) const
inline

Definition at line 75 of file DominanceFrontier.h.

template<class BlockT , bool IsPostDom>
bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::compare ( DominanceFrontierBase< BlockT, IsPostDom > &  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, IsPostDom >::begin(), E, llvm::DominanceFrontierBase< BlockT, IsPostDom >::end(), llvm::sys::path::end(), llvm::find(), and I.

template<class BlockT , bool IsPostDom>
bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::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 , bool IsPostDom>
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::dump ( ) const

dump - Dump the dominance frontier to dbgs().

Definition at line 146 of file DominanceFrontierImpl.h.

References llvm::dbgs().

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

Definition at line 77 of file DominanceFrontier.h.

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

Definition at line 79 of file DominanceFrontier.h.

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

Definition at line 56 of file DominanceFrontier.h.

template<class BlockT, bool IsPostDom>
const std::vector<BlockT *>& llvm::DominanceFrontierBase< BlockT, IsPostDom >::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 IsPostDom>
bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::isPostDominator ( ) const
inline

isPostDominator - Returns true if analysis based of postdoms

Definition at line 63 of file DominanceFrontier.h.

template<class BlockT , bool IsPostDom>
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::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, bool IsPostDom>
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::releaseMemory ( )
inline
template<class BlockT, bool IsPostDom>
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::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, bool IsPostDom>
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::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, bool IsPostDom>
DomSetMapType llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers
protected
template<class BlockT, bool IsPostDom>
constexpr bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::IsPostDominators = IsPostDom
staticprotected
template<class BlockT, bool IsPostDom>
std::vector<BlockT *> llvm::DominanceFrontierBase< BlockT, IsPostDom >::Roots
protected

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