MLIR
20.0.0git
|
#include "mlir/IR/Dominance.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/RegionKindInterface.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/GenericDomTreeConstruction.h"
Go to the source code of this file.
Functions | |
static Block * | getAncestorBlock (Block *block) |
Return the ancestor block enclosing the specified block. More... | |
template<typename FuncT > | |
static Block * | traverseAncestors (Block *block, const FuncT &func) |
Walks up the list of containers of the given block and calls the user-defined traversal function for every pair of a region and block that could be found during traversal. More... | |
static bool | tryGetBlocksInSameRegion (Block *&a, Block *&b) |
Tries to update the given block references to live in the same region by exploring the relationship of both blocks with respect to their regions. More... | |
Return the ancestor block enclosing the specified block.
This returns null if we reach the top of the hierarchy.
Definition at line 104 of file Dominance.cpp.
References mlir::Block::getParentOp().
Referenced by tryGetBlocksInSameRegion().
|
static |
Walks up the list of containers of the given block and calls the user-defined traversal function for every pair of a region and block that could be found during traversal.
If the user-defined function returns true for a given pair, traverseAncestors will return the current block. Nullptr otherwise.
Definition at line 116 of file Dominance.cpp.
Referenced by tryGetBlocksInSameRegion().
Tries to update the given block references to live in the same region by exploring the relationship of both blocks with respect to their regions.
Definition at line 127 of file Dominance.cpp.
References getAncestorBlock(), mlir::Block::getParent(), and traverseAncestors().
Referenced by mlir::detail::DominanceInfoBase< IsPostDom >::findNearestCommonDominator().