MLIR
18.0.0git
|
#include "mlir/IR/Dominance.h"
Public Member Functions | |
DominanceInfoBase (Operation *op=nullptr) | |
DominanceInfoBase (DominanceInfoBase &&)=default | |
DominanceInfoBase & | operator= (DominanceInfoBase &&)=default |
~DominanceInfoBase () | |
DominanceInfoBase (const DominanceInfoBase &)=delete | |
DominanceInfoBase & | operator= (const DominanceInfoBase &)=delete |
void | invalidate () |
Invalidate dominance info. More... | |
void | invalidate (Region *region) |
Block * | findNearestCommonDominator (Block *a, Block *b) const |
Finds the nearest common dominator block for the two given blocks a and b. More... | |
DominanceInfoNode * | getRootNode (Region *region) |
Get the root dominance node of the given region. More... | |
DominanceInfoNode * | getNode (Block *a) |
Return the dominance node from the Region containing block A. More... | |
bool | isReachableFromEntry (Block *a) const |
Return true if the specified block is reachable from the entry block of its region. More... | |
bool | hasSSADominance (Block *block) const |
Return true if operations in the specified block are known to obey SSA dominance requirements. More... | |
bool | hasSSADominance (Region *region) const |
Return true if operations in the specified block are known to obey SSA dominance requirements. More... | |
DomTree & | getDomTree (Region *region) const |
Protected Types | |
using | super = DominanceInfoBase< IsPostDom > |
Protected Member Functions | |
llvm::PointerIntPair< DomTree *, 1, bool > | getDominanceInfo (Region *region, bool needsDomTree) const |
Return the dom tree and "hasSSADominance" bit for the given region. More... | |
bool | properlyDominates (Block *a, Block *b) const |
Return true if the specified block A properly dominates block B. More... | |
Protected Attributes | |
DenseMap< Region *, llvm::PointerIntPair< DomTree *, 1, bool > > | dominanceInfos |
A mapping of regions to their base dominator tree and a cached "hasSSADominance" bit. More... | |
Definition at line 35 of file Dominance.h.
|
protected |
Definition at line 93 of file Dominance.h.
|
inline |
Definition at line 39 of file Dominance.h.
|
default |
DominanceInfoBase::~DominanceInfoBase |
Definition at line 32 of file Dominance.cpp.
|
delete |
Block * DominanceInfoBase::findNearestCommonDominator | ( | Block * | a, |
Block * | b | ||
) | const |
Finds the nearest common dominator block for the two given blocks a and b.
If no common dominator can be found, this function will return nullptr.
Definition at line 191 of file Dominance.cpp.
References mlir::Block::getParent(), and tryGetBlocksInSameRegion().
|
protected |
Return the dom tree and "hasSSADominance" bit for the given region.
The DomTree will be null for single-block regions. This lazily constructs the DomTree on demand when needsDomTree=true.
Definition at line 56 of file Dominance.cpp.
|
inline |
Definition at line 86 of file Dominance.h.
References mlir::Region::hasOneBlock().
|
inline |
Return the dominance node from the Region containing block A.
This only works for multi-block regions.
Definition at line 67 of file Dominance.h.
References mlir::Block::getParent().
Referenced by transformToStructuredCFBranches().
|
inline |
Get the root dominance node of the given region.
Note that this operation is only defined for multi-block regions!
Definition at line 59 of file Dominance.h.
|
inline |
Return true if operations in the specified block are known to obey SSA dominance requirements.
False if the block is a graph region or unknown.
Definition at line 77 of file Dominance.h.
References mlir::Block::getParent().
|
inline |
Return true if operations in the specified block are known to obey SSA dominance requirements.
False if the block is a graph region or unknown.
Definition at line 82 of file Dominance.h.
void DominanceInfoBase::invalidate |
Invalidate dominance info.
This can be used by clients that make major changes to the CFG and don't have a good way to update it.
Definition at line 37 of file Dominance.cpp.
Referenced by mlir::transformCFGToSCF(), and transformToStructuredCFBranches().
void DominanceInfoBase::invalidate | ( | Region * | region | ) |
Definition at line 44 of file Dominance.cpp.
bool DominanceInfoBase::isReachableFromEntry | ( | Block * | a | ) | const |
Return true if the specified block is reachable from the entry block of its region.
Definition at line 247 of file Dominance.cpp.
References mlir::Region::front(), and mlir::Block::getParent().
|
delete |
|
default |
|
protected |
Return true if the specified block A properly dominates block B.
Definition at line 217 of file Dominance.cpp.
References mlir::Region::findAncestorBlockInRegion(), and mlir::Block::getParent().
|
mutableprotected |
A mapping of regions to their base dominator tree and a cached "hasSSADominance" bit.
This map does not contain dominator trees for single block CFG regions, but we do want to cache the "hasSSADominance" bit for them. We may also not have computed the DomTree yet. In either case, the DomTree is just null.
Definition at line 111 of file Dominance.h.