LLVM 20.0.0git
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 >:
Inheritance graph
[legend]

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
 
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
 

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 40 of file DominanceFrontier.h.

Member Typedef Documentation

◆ BlockTraits

template<class BlockT , bool IsPostDom>
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::BlockTraits = GraphTraits<BlockT *>
protected

Definition at line 48 of file DominanceFrontier.h.

◆ const_iterator

template<class BlockT , bool IsPostDom>
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::const_iterator = typename DomSetMapType::const_iterator

Definition at line 79 of file DominanceFrontier.h.

◆ DomSetMapType

template<class BlockT , bool IsPostDom>
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::DomSetMapType = DenseMap<BlockT *, DomSetType>

Definition at line 45 of file DominanceFrontier.h.

◆ DomSetType

template<class BlockT , bool IsPostDom>
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::DomSetType = SetVector<BlockT *>

Definition at line 44 of file DominanceFrontier.h.

◆ iterator

template<class BlockT , bool IsPostDom>
using llvm::DominanceFrontierBase< BlockT, IsPostDom >::iterator = typename DomSetMapType::iterator

Definition at line 78 of file DominanceFrontier.h.

Constructor & Destructor Documentation

◆ DominanceFrontierBase()

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

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

◆ dump()

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

dump - Dump the dominance frontier to dbgs().

Definition at line 73 of file DominanceFrontierImpl.h.

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

◆ end() [1/2]

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

◆ end() [2/2]

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

◆ find() [1/2]

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

◆ find() [2/2]

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

◆ getRoot()

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

◆ getRoots()

template<class BlockT , bool IsPostDom>
const SmallVectorImpl< 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 61 of file DominanceFrontier.h.

References llvm::DominanceFrontierBase< BlockT, IsPostDom >::Roots.

◆ isPostDominator()

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

isPostDominator - Returns true if analysis based of postdoms

Definition at line 69 of file DominanceFrontier.h.

References llvm::DominanceFrontierBase< BlockT, IsPostDom >::IsPostDominators.

◆ print()

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

print - Convert to human readable form

Definition at line 49 of file DominanceFrontierImpl.h.

References E, I, and OS.

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

◆ releaseMemory()

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

Member Data Documentation

◆ Frontiers

template<class BlockT , bool IsPostDom>
DomSetMapType llvm::DominanceFrontierBase< BlockT, IsPostDom >::Frontiers
protected

◆ IsPostDominators

template<class BlockT , bool IsPostDom>
constexpr bool llvm::DominanceFrontierBase< BlockT, IsPostDom >::IsPostDominators = IsPostDom
staticconstexprprotected

◆ Roots

template<class BlockT , bool IsPostDom>
SmallVector<BlockT *, IsPostDom ? 4 : 1> llvm::DominanceFrontierBase< BlockT, IsPostDom >::Roots
protected

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