LLVM
8.0.1
|
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function. More...
#include "llvm/Analysis/DominanceFrontier.h"
Public Types | |
using | DomSetType = std::set< BlockT * > |
using | DomSetMapType = std::map< BlockT *, DomSetType > |
using | iterator = typename DomSetMapType::iterator |
using | const_iterator = typename DomSetMapType::const_iterator |
Public Member Functions | |
DominanceFrontierBase ()=default | |
const SmallVectorImpl< 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 | |
using | BlockTraits = GraphTraits< BlockT * > |
Protected Attributes | |
DomSetMapType | Frontiers |
SmallVector< BlockT *, IsPostDom ? 4 :1 > | Roots |
Static Protected Attributes | |
static constexpr bool | IsPostDominators = IsPostDom |
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function.
Definition at line 42 of file DominanceFrontier.h.
|
protected |
Definition at line 48 of file DominanceFrontier.h.
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::const_iterator = typename DomSetMapType::const_iterator |
Definition at line 79 of file DominanceFrontier.h.
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::DomSetMapType = std::map<BlockT *, DomSetType> |
Definition at line 45 of file DominanceFrontier.h.
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::DomSetType = std::set<BlockT *> |
Definition at line 44 of file DominanceFrontier.h.
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::iterator = typename DomSetMapType::iterator |
Definition at line 78 of file DominanceFrontier.h.
|
default |
|
inline |
Definition at line 88 of file DominanceFrontier.h.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::addToFrontier | ( | iterator | I, |
BlockT * | Node | ||
) |
Definition at line 59 of file DominanceFrontierImpl.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::addBasicBlock().
|
inline |
Definition at line 81 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::compare().
|
inline |
Definition at line 82 of file DominanceFrontier.h.
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 100 of file DominanceFrontierImpl.h.
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 75 of file DominanceFrontierImpl.h.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::dump | ( | ) | const |
dump - Dump the dominance frontier to dbgs().
Definition at line 154 of file DominanceFrontierImpl.h.
Referenced by llvm::DominanceFrontierWrapperPass::getDominanceFrontier().
|
inline |
Definition at line 83 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::addBasicBlock(), and llvm::DominanceFrontierBase< BasicBlock, false >::compare().
|
inline |
Definition at line 84 of file DominanceFrontier.h.
|
inline |
Definition at line 85 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::addBasicBlock().
|
inline |
Definition at line 86 of file DominanceFrontier.h.
|
inline |
Definition at line 63 of file DominanceFrontier.h.
|
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 61 of file DominanceFrontier.h.
|
inline |
isPostDominator - Returns true if analysis based of postdoms
Definition at line 69 of file DominanceFrontier.h.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::print | ( | raw_ostream & | OS | ) | const |
print - Convert to human readable form
Definition at line 130 of file DominanceFrontierImpl.h.
Referenced by llvm::DominanceFrontierWrapperPass::getDominanceFrontier(), and llvm::DominanceFrontierWrapperPass::print().
|
inline |
Definition at line 73 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierWrapperPass::getDominanceFrontier(), and llvm::DominanceFrontierWrapperPass::releaseMemory().
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeBlock | ( | BlockT * | BB | ) |
removeBlock - Remove basic block BB's frontier.
Definition at line 51 of file DominanceFrontierImpl.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::addBasicBlock().
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeFromFrontier | ( | iterator | I, |
BlockT * | Node | ||
) |
Definition at line 67 of file DominanceFrontierImpl.h.
|
protected |
Definition at line 50 of file DominanceFrontier.h.
|
staticprotected |
Definition at line 53 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BasicBlock, false >::isPostDominator().
|
protected |
Definition at line 52 of file DominanceFrontier.h.
Referenced by llvm::ForwardDominanceFrontierBase< BasicBlock >::analyze(), and llvm::DominanceFrontierBase< BasicBlock, false >::getRoots().