LLVM 20.0.0git
|
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function. More...
#include "llvm/Analysis/DominanceFrontier.h"
Public Types | |
using | DomSetType = SetVector< BlockT * > |
using | DomSetMapType = DenseMap< 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. | |
BlockT * | getRoot () const |
bool | isPostDominator () const |
isPostDominator - Returns true if analysis based of postdoms | |
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. | |
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. | |
bool | compare (DominanceFrontierBase &Other) const |
compare - Return false if the other dominance frontier base matches this dominance frontier base. | |
void | print (raw_ostream &OS) const |
print - Convert to human readable form | |
void | dump () const |
dump - Dump the dominance frontier to dbgs(). | |
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 40 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 = DenseMap<BlockT *, DomSetType> |
Definition at line 45 of file DominanceFrontier.h.
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::DomSetType = SetVector<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.
References assert(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::end(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::find(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers, and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert().
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::addToFrontier | ( | iterator | I, |
BlockT * | Node | ||
) |
Definition at line 57 of file DominanceFrontierImpl.h.
|
inline |
Definition at line 81 of file DominanceFrontier.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
|
inline |
Definition at line 82 of file DominanceFrontier.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::compare | ( | DominanceFrontierBase< BlockT, IsPostDom > & | Other | ) | const |
compare - Return false if the other dominance frontier base matches this dominance frontier base.
Otherwise return true.
Definition at line 97 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 72 of file DominanceFrontierImpl.h.
References llvm::SetVector< T, Vector, Set, N >::begin(), E, llvm::SetVector< T, Vector, Set, N >::end(), and I.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::dump |
dump - Dump the dominance frontier to dbgs().
Definition at line 151 of file DominanceFrontierImpl.h.
References llvm::dbgs(), and llvm::print().
|
inline |
Definition at line 83 of file DominanceFrontier.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::addBasicBlock().
|
inline |
Definition at line 84 of file DominanceFrontier.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
|
inline |
Definition at line 85 of file DominanceFrontier.h.
References B, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::addBasicBlock().
|
inline |
Definition at line 86 of file DominanceFrontier.h.
References B, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
|
inline |
Definition at line 63 of file DominanceFrontier.h.
References assert(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::Roots, and llvm::SmallVectorBase< Size_T >::size().
|
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.
References llvm::DominanceFrontierBase< BlockT, IsPostDom >::Roots.
|
inline |
isPostDominator - Returns true if analysis based of postdoms
Definition at line 69 of file DominanceFrontier.h.
References llvm::DominanceFrontierBase< BlockT, IsPostDom >::IsPostDominators.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::print | ( | raw_ostream & | OS | ) | const |
print - Convert to human readable form
Definition at line 127 of file DominanceFrontierImpl.h.
Referenced by llvm::DominanceFrontierWrapperPass::print().
|
inline |
Definition at line 73 of file DominanceFrontier.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers.
Referenced by llvm::DominanceFrontierWrapperPass::releaseMemory().
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeBlock | ( | BlockT * | BB | ) |
removeBlock - Remove basic block BB's frontier.
Definition at line 49 of file DominanceFrontierImpl.h.
References assert(), E, llvm::find(), and I.
void llvm::DominanceFrontierBase< BlockT, IsPostDom >::removeFromFrontier | ( | iterator | I, |
BlockT * | Node | ||
) |
Definition at line 64 of file DominanceFrontierImpl.h.
|
protected |
Definition at line 50 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::addBasicBlock(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::begin(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::end(), llvm::DominanceFrontierBase< BlockT, IsPostDom >::find(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::releaseMemory().
|
staticconstexprprotected |
Definition at line 53 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::isPostDominator().
|
protected |
Definition at line 52 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontierBase< BlockT, IsPostDom >::getRoot(), and llvm::DominanceFrontierBase< BlockT, IsPostDom >::getRoots().