|
MLIR 22.0.0git
|
A class for computing basic dominance information. More...
#include "mlir/IR/Dominance.h"
Public Member Functions | |
| bool | properlyDominates (Operation *a, Operation *b, bool enclosingOpOk=true) const |
| Return true if operation A properly dominates operation B, i.e. | |
| bool | dominates (Operation *a, Operation *b) const |
| Return true if operation A dominates operation B, i.e. | |
| bool | properlyDominates (Value a, Operation *b) const |
| Return true if the a value properly dominates operation b, i.e if the operation that defines a properlyDominates b and the operation that defines a does not contain b. | |
| bool | dominates (Value a, Operation *b) const |
| Return true if the a value dominates operation b. | |
| bool | dominates (Block *a, Block *b) const |
| Return true if the specified block A dominates block B, i.e. | |
| bool | properlyDominates (Block *a, Block *b) const |
| Return true if the specified block A properly dominates block B, i.e.: if block A contains block B, or if the region which contains block A also contains block B or some parent of block B and block A dominates that block in that kind of region. | |
| bool | properlyDominates (Block *aBlock, Block::iterator aIt, Block *bBlock, Block::iterator bIt, bool enclosingOk=true) const |
| bool | dominates (Block *aBlock, Block::iterator aIt, Block *bBlock, Block::iterator bIt, bool enclosingOk=true) const |
| Public Member Functions inherited from mlir::detail::DominanceInfoBase< false > | |
| DominanceInfoBase (Operation *op=nullptr) | |
| DominanceInfoBase & | operator= (DominanceInfoBase &&)=default |
| ~DominanceInfoBase () | |
| void | invalidate () |
| Invalidate dominance info. | |
| Block * | findNearestCommonDominator (Block *a, Block *b) const |
| Finds the nearest common dominator block for the two given blocks a and b. | |
| DominanceInfoNode * | getRootNode (Region *region) |
| Get the root dominance node of the given region. | |
| DominanceInfoNode * | getNode (Block *a) |
| Return the dominance node from the Region containing block A. | |
| bool | isReachableFromEntry (Block *a) const |
| Return true if the specified block is reachable from the entry block of its region. | |
| bool | hasSSADominance (Block *block) const |
| Return true if operations in the specified block are known to obey SSA dominance requirements. | |
| DomTree & | getDomTree (Region *region) const |
Additional Inherited Members | |
| Protected Types inherited from mlir::detail::DominanceInfoBase< false > | |
| using | super |
| Protected Member Functions inherited from mlir::detail::DominanceInfoBase< false > | |
| llvm::PointerIntPair< DomTree *, 1, bool > | getDominanceInfo (Region *region, bool needsDomTree) const |
| Return the dom tree and "hasSSADominance" bit for the given region. | |
| bool | properlyDominatesImpl (Block *aBlock, Block::iterator aIt, Block *bBlock, Block::iterator bIt, bool enclosingOk=true) const |
| Return "true" if block iterator A properly (post)dominates block iterator B. | |
| Protected Attributes inherited from mlir::detail::DominanceInfoBase< false > | |
| DenseMap< Region *, llvm::PointerIntPair< DomTree *, 1, bool > > | dominanceInfos |
| A mapping of regions to their base dominator tree and a cached "hasSSADominance" bit. | |
A class for computing basic dominance information.
Note that this class is aware of different types of regions and returns a region-kind specific concept of dominance. See RegionKindInterface.
Definition at line 140 of file Dominance.h.
Return true if the specified block A dominates block B, i.e.
if block A and block B are the same block or block A properly dominates block B.
Definition at line 174 of file Dominance.h.
References b, and properlyDominates().
|
inline |
Definition at line 196 of file Dominance.h.
References mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
Return true if operation A dominates operation B, i.e.
if A and B are the same operation or A properly dominates B.
Definition at line 158 of file Dominance.h.
References b, and properlyDominates().
Referenced by computeBackwardSlice(), computeInsertPoint(), findCapturedOmpOp(), findValidInsertionPoint(), forwardStoreToLoad(), loadCSE(), mlir::memref::multiBuffer(), properlyDominates(), replaceForAllWithNewSignature(), and transformToReduceLoop().
Return true if the a value dominates operation b.
Definition at line 168 of file Dominance.h.
References b, mlir::Value::getDefiningOp(), and properlyDominates().
Return true if the specified block A properly dominates block B, i.e.: if block A contains block B, or if the region which contains block A also contains block B or some parent of block B and block A dominates that block in that kind of region.
In an SSACFG region, block A dominates block B if all control flow paths from the entry block to block B flow through block A.
Graph regions have only a single block. To be consistent with "proper dominance" of ops, the single block is considered to properly dominate itself in a graph region.
Definition at line 330 of file Dominance.cpp.
References b, mlir::Block::begin(), and mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
|
inline |
Definition at line 191 of file Dominance.h.
References mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
| bool DominanceInfo::properlyDominates | ( | Operation * | a, |
| Operation * | b, | ||
| bool | enclosingOpOk = true ) const |
Return true if operation A properly dominates operation B, i.e.
if A and B are in the same block and A properly dominates B within the block, or if the block that contains A properly dominates the block that contains B. In an SSACFG region, Operation A dominates Operation B in the same block if A preceeds B. In a Graph region, all operations in a block properly dominate all operations in the same block.
The enclosingOpOk flag says whether we should return true if the B op is enclosed by a region on A.
Definition at line 323 of file Dominance.cpp.
References b, mlir::Operation::getBlock(), and mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
Referenced by checkAssumptionForLoop(), dominates(), dominates(), dominates(), fuseIfLegal(), happensBefore(), mlir::linalg::hoistRedundantVectorTransfers(), isOpSibling(), mlir::linalg::linalgOpAnchoredEmptyTensorEliminationStep(), FoldAddIntoDest::matchAndRewrite(), mlir::moveOperationDependencies(), mlir::moveValueDefinitions(), neededValuesDominateInsertionPoint(), and properlyDominates().
Return true if the a value properly dominates operation b, i.e if the operation that defines a properlyDominates b and the operation that defines a does not contain b.
Definition at line 338 of file Dominance.cpp.
References b, dominates(), mlir::Value::getDefiningOp(), and properlyDominates().