MLIR
20.0.0git
|
This class contains a list of basic blocks and a link to the parent operation it is attached to. More...
#include "mlir/IR/Region.h"
Classes | |
class | OpIterator |
This class provides iteration over the held operations of blocks directly within a region. More... | |
Public Types | |
using | BlockListType = llvm::iplist< Block > |
using | iterator = BlockListType::iterator |
using | reverse_iterator = BlockListType::reverse_iterator |
using | BlockArgListType = MutableArrayRef< BlockArgument > |
using | args_iterator = BlockArgListType::iterator |
using | reverse_args_iterator = BlockArgListType::reverse_iterator |
template<typename OpT > | |
using | op_iterator = detail::op_iterator< OpT, OpIterator > |
This class provides iteration over the held operations of a region for a specific operation type. More... | |
Public Member Functions | |
Region ()=default | |
Region (Operation *container) | |
~Region () | |
MLIRContext * | getContext () |
Return the context this region is inserted in. More... | |
Location | getLoc () |
Return a location for this region. More... | |
BlockListType & | getBlocks () |
Block & | emplaceBlock () |
iterator | begin () |
iterator | end () |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
bool | empty () |
void | push_back (Block *block) |
void | push_front (Block *block) |
Block & | back () |
Block & | front () |
bool | hasOneBlock () |
Return true if this region has exactly one block. More... | |
BlockArgListType | getArguments () |
ValueTypeRange< BlockArgListType > | getArgumentTypes () |
Returns the argument types of the first block within the region. More... | |
args_iterator | args_begin () |
args_iterator | args_end () |
reverse_args_iterator | args_rbegin () |
reverse_args_iterator | args_rend () |
bool | args_empty () |
BlockArgument | addArgument (Type type, Location loc) |
Add one value to the argument list. More... | |
BlockArgument | insertArgument (args_iterator it, Type type, Location loc) |
Insert one value to the position in the argument list indicated by the given iterator. More... | |
iterator_range< args_iterator > | addArguments (TypeRange types, ArrayRef< Location > locs) |
Add one argument to the argument list for each type specified in the list. More... | |
BlockArgument | insertArgument (unsigned index, Type type, Location loc) |
Add one value to the argument list at the specified position. More... | |
void | eraseArgument (unsigned index) |
Erase the argument at 'index' and remove it from the argument list. More... | |
unsigned | getNumArguments () |
BlockArgument | getArgument (unsigned i) |
OpIterator | op_begin () |
Return iterators that walk the operations nested directly within this region. More... | |
OpIterator | op_end () |
iterator_range< OpIterator > | getOps () |
template<typename OpT > | |
op_iterator< OpT > | op_begin () |
Return iterators that walk operations of type 'T' nested directly within this region. More... | |
template<typename OpT > | |
op_iterator< OpT > | op_end () |
template<typename OpT > | |
iterator_range< op_iterator< OpT > > | getOps () |
Region * | getParentRegion () |
Return the region containing this region or nullptr if the region is attached to a top-level operation. More... | |
Operation * | getParentOp () |
Return the parent operation this region is attached to. More... | |
template<typename ParentT > | |
ParentT | getParentOfType () |
Find the first parent operation of the given type, or nullptr if there is no ancestor operation. More... | |
unsigned | getRegionNumber () |
Return the number of this region in the parent operation. More... | |
bool | isProperAncestor (Region *other) |
Return true if this region is a proper ancestor of the other region. More... | |
bool | isAncestor (Region *other) |
Return true if this region is ancestor of the other region. More... | |
void | cloneInto (Region *dest, IRMapping &mapper) |
Clone the internal blocks from this region into dest. More... | |
void | cloneInto (Region *dest, Region::iterator destPos, IRMapping &mapper) |
Clone this region into 'dest' before the given position in 'dest'. More... | |
void | takeBody (Region &other) |
Takes body of another region (that region will have no body after this operation completes). More... | |
Block * | findAncestorBlockInRegion (Block &block) |
Returns 'block' if 'block' lies in this region, or otherwise finds the ancestor of 'block' that lies in this region. More... | |
Operation * | findAncestorOpInRegion (Operation &op) |
Returns 'op' if 'op' lies in this region, or otherwise finds the ancestor of 'op' that lies in this region. More... | |
void | dropAllReferences () |
Drop all operand uses from operations within this region, which is an essential step in breaking cyclic dependences between references when they are to be deleted. More... | |
template<WalkOrder Order = WalkOrder::PostOrder, typename Iterator = ForwardIterator, typename FnT , typename ArgT = detail::first_argument<FnT>, typename RetT = detail::walkResultType<FnT>> | |
RetT | walk (FnT &&callback) |
Walk all nested operations, blocks or regions (including this region), depending on the type of callback. More... | |
void | viewGraph (const Twine ®ionName) |
Displays the CFG in a window. More... | |
void | viewGraph () |
Static Public Member Functions | |
static BlockListType Region::* | getSublistAccess (Block *) |
getSublistAccess() - Returns pointer to member of region. More... | |
This class contains a list of basic blocks and a link to the parent operation it is attached to.
using mlir::Region::args_iterator = BlockArgListType::iterator |
using mlir::Region::BlockListType = llvm::iplist<Block> |
using mlir::Region::iterator = BlockListType::iterator |
using mlir::Region::op_iterator = detail::op_iterator<OpT, OpIterator> |
using mlir::Region::reverse_args_iterator = BlockArgListType::reverse_iterator |
using mlir::Region::reverse_iterator = BlockListType::reverse_iterator |
|
default |
|
explicit |
Definition at line 14 of file Region.cpp.
Region::~Region | ( | ) |
Definition at line 16 of file Region.cpp.
References dropAllReferences().
|
inline |
Add one value to the argument list.
Definition at line 98 of file Region.h.
References mlir::Block::addArgument(), and front().
iterator_range< Region::args_iterator > Region::addArguments | ( | TypeRange | types, |
ArrayRef< Location > | locs | ||
) |
Add one argument to the argument list for each type specified in the list.
locs
contains the locations for each of the new arguments, and must be of equal size to types
.
Definition at line 41 of file Region.cpp.
References mlir::Block::addArguments(), and front().
|
inline |
Definition at line 90 of file Region.h.
References getArguments().
|
inline |
Definition at line 95 of file Region.h.
References getArguments().
|
inline |
Definition at line 91 of file Region.h.
References getArguments().
|
inline |
Definition at line 92 of file Region.h.
References getArguments().
|
inline |
Definition at line 93 of file Region.h.
References getArguments().
|
inline |
Definition at line 64 of file Region.h.
Referenced by emplaceBlock(), mlir::impl::ensureRegionTerminator(), inlineIfCase(), and inlineWhileCase().
|
inline |
Definition at line 55 of file Region.h.
Referenced by convertOmpSections(), diagnoseInvalidOperandDominance(), mlir::eraseUnreachableBlocks(), genCoIterateBranchNest(), getBlockNumber(), handleByValArgumentInit(), hasOneBlock(), mlir::ReductionNode::initialize(), mlir::sparse_tensor::insertYieldOp(), mlir::makeRegionIsolatedFromAbove(), mlirRegionInsertOwnedBlockAfter(), mlir::gpu::WarpDistributionPattern::moveRegionToNewWarpOpAndReplaceReturns(), llvm::GraphTraits< mlir::Region * >::nodes_begin(), and mlir::outlineSingleBlockRegion().
Clone the internal blocks from this region into dest.
Clone the internal blocks from this region into dest
.
Any cloned blocks are appended to the back of dest. If the mapper contains entries for block arguments, these arguments are not included in the respective cloned block.
Calling this method from multiple threads is generally safe if through the process of cloning, no new uses of 'Value's from outside the region are created. Using the mapper, it is possible to avoid adding uses to outside operands by remapping them to 'Value's owned by the caller thread.
Any cloned blocks are appended to the back of dest.
Definition at line 70 of file Region.cpp.
References end().
Referenced by mlir::Operation::clone(), mlir::OpBuilder::cloneRegionBefore(), mlir::sparse_tensor::insertYieldOp(), and outlineKernelFuncImpl().
void Region::cloneInto | ( | Region * | dest, |
Region::iterator | destPos, | ||
IRMapping & | mapper | ||
) |
Clone this region into 'dest' before the given position in 'dest'.
Definition at line 76 of file Region.cpp.
References mlir::Block::addArgument(), mlir::Operation::CloneOptions::all(), mlir::clone(), mlir::Operation::CloneOptions::cloneOperands(), mlir::Operation::CloneOptions::cloneRegions(), mlir::IRMapping::contains(), empty(), front(), mlir::Block::getArguments(), getBlocks(), mlir::Operation::getNumOperands(), mlir::Operation::getOperands(), mlir::Operation::getRegions(), mlir::IRMapping::lookup(), mlir::IRMapping::map(), mlir::Block::push_back(), and mlir::Operation::setOperands().
void Region::dropAllReferences | ( | ) |
Drop all operand uses from operations within this region, which is an essential step in breaking cyclic dependences between references when they are to be deleted.
Definition at line 181 of file Region.cpp.
References mlir::Block::dropAllReferences().
Referenced by takeBody(), and ~Region().
|
inline |
Definition at line 46 of file Region.h.
References back(), and push_back().
Referenced by addBodyWithPayloadOp(), mlir::emitc::createExpression(), and mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase().
|
inline |
Definition at line 60 of file Region.h.
Referenced by allocReductionVars(), mlir::sparse_tensor::buildBinaryOverlap(), mlir::sparse_tensor::Merger::buildLattices(), mlir::sparse_tensor::buildUnaryPresent(), canMakeGroupOpUniform(), cloneInto(), mlir::detail::ConversionPatternRewriterImpl::convertRegionTypes(), deleteDeadness(), mlir::impl::ensureRegionTerminator(), mlir::eraseUnreachableBlocks(), getArguments(), mlir::OpTrait::SingleBlock< ConcreteType >::getBody(), hasOneBlock(), mlir::inlineCall(), inlineConvertOmpRegions(), mlir::RewriterBase::inlineRegionBefore(), mlir::sparse_tensor::isAdmissibleBranch(), mlir::SymbolTable::lookupSymbolIn(), mlir::ForwardDominanceIterator< NoGraphRegions >::makeIterable(), mlir::ReverseDominanceIterator< NoGraphRegions >::makeIterable(), mergeIdenticalBlocks(), mlirRegionGetFirstBlock(), mlir::OpBuilder::OpBuilder(), mlir::Region::OpIterator::OpIterator(), parseSingleBlockRegion(), mlir::function_interface_impl::printFunctionSignature(), printOperation(), propagateLiveness(), mlir::transformCFGToSCF(), verifyAndGetTerminator(), verifyInitLikeSingleArgRegion(), mlir::OpTrait::SingleBlockImplicitTerminator< TerminatorOpType >::Impl< ConcreteType >::verifyRegionTrait(), mlir::transform::detail::verifyStructuredOpPredicateOpTrait(), mlir::OpTrait::SingleBlock< ConcreteType >::verifyTrait(), and wrapInExecuteRegion().
|
inline |
Definition at line 56 of file Region.h.
Referenced by buildGenericRegion(), cloneInto(), mlir::OpBuilder::createBlock(), createElementFPowIFunc(), createElementIPowIFunc(), mlir::eraseUnreachableBlocks(), hasOneBlock(), ConvertTypesInSCFForOp::matchAndRewrite(), ConvertTypesInSCFWhileOp::matchAndRewrite(), llvm::GraphTraits< mlir::Region * >::nodes_end(), mlir::detail::ConversionPatternRewriterImpl::notifyBlockInserted(), mlir::LLVM::ModuleImport::processFunction(), and wrapInExecuteRegion().
|
inline |
Erase the argument at 'index' and remove it from the argument list.
Definition at line 121 of file Region.h.
References mlir::Block::eraseArgument(), and front().
Returns 'block' if 'block' lies in this region, or otherwise finds the ancestor of 'block' that lies in this region.
Returns nullptr if the latter fails.
Definition at line 154 of file Region.cpp.
References mlir::Operation::getBlock(), mlir::Block::getParent(), and mlir::Block::getParentOp().
Referenced by mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
Returns 'op' if 'op' lies in this region, or otherwise finds the ancestor of 'op' that lies in this region.
Returns nullptr if the latter fails.
Definition at line 168 of file Region.cpp.
References mlir::Operation::getParentOp(), and mlir::Operation::getParentRegion().
Referenced by findCommonAncestor(), and mlir::detail::DominanceInfoBase< IsPostDom >::properlyDominatesImpl().
|
inline |
Definition at line 65 of file Region.h.
Referenced by addArgument(), addArguments(), mlir::sparse_tensor::Merger::buildLattices(), mlir::sparse_tensor::Merger::buildTensorExpFromLinalg(), canMakeGroupOpUniform(), mlir::async::cloneConstantsIntoTheRegion(), cloneInto(), mlir::OpBuilder::cloneRegionBefore(), convertOmpAtomicCapture(), convertOmpAtomicUpdate(), mlir::detail::ConversionPatternRewriterImpl::convertRegionTypes(), deleteDeadness(), mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase(), eraseArgument(), mlir::eraseUnreachableBlocks(), genCoIterateBranchNest(), getArguments(), mlir::OpTrait::SingleBlock< ConcreteType >::getBody(), mlir::transform::PossibleTopLevelTransformOpTrait< OpTy >::getBodyBlock(), llvm::GraphTraits< mlir::Region * >::getEntryNode(), getModuleBody(), mlir::spirv::getPushConstantValue(), handleInlinedAllocas(), injectGpuIndexOperations(), mlir::inlineCall(), inlineConvertOmpRegions(), inlineIfCase(), mlir::RewriterBase::inlineRegionBefore(), inlineWhileCase(), mlir::SymbolTable::insert(), insertArgument(), insertCopies(), mlir::OperationFolder::insertKnownConstant(), mlir::sparse_tensor::insertYieldOp(), mlir::sparse_tensor::isAdmissibleBranch(), mlir::Block::isEntryBlock(), mlir::detail::DominanceInfoBase< IsPostDom >::isReachableFromEntry(), mlir::SymbolTable::lookupSymbolIn(), mlir::ForwardDominanceIterator< NoGraphRegions >::makeIterable(), mlir::ReverseDominanceIterator< NoGraphRegions >::makeIterable(), mlir::makeRegionIsolatedFromAbove(), mapInitializationArgs(), ConvertTypesInSCFForOp::matchAndRewrite(), ConvertTypesInSCFWhileOp::matchAndRewrite(), mlir::transform::detail::mergeSymbolsInto(), mlirRegionGetFirstBlock(), mlir::gpu::WarpDistributionPattern::moveRegionToNewWarpOpAndReplaceReturns(), mlir::OpBuilder::OpBuilder(), outlineKernelFuncImpl(), mlir::outlineSingleBlockRegion(), printBlock(), printLoopControl(), propagateLiveness(), replaceOpWithRegion(), ShardingPropagation::runOnOperation(), mlir::vector::splitFullAndPartialTransfer(), mlir::SymbolTable::SymbolTable(), mlir::transformCFGToSCF(), updateExpandedGenericOpRegion(), vectorizeLinalgOpPrecondition(), verifyAndGetTerminator(), verifyInitLikeSingleArgRegion(), verifyNumBlockArgs(), mlir::transform::detail::verifyPossibleTopLevelTransformOpTrait(), verifyRegion(), mlir::OpTrait::SingleBlockImplicitTerminator< TerminatorOpType >::Impl< ConcreteType >::verifyRegionTrait(), mlir::transform::detail::verifyStructuredOpPredicateOpTrait(), and mlir::OpTrait::SingleBlock< ConcreteType >::verifyTrait().
|
inline |
Definition at line 124 of file Region.h.
References getArguments().
Referenced by mlir::function_interface_impl::printFunctionSignature(), and verifyNumBlockArgs().
|
inline |
Definition at line 81 of file Region.h.
References empty(), front(), and mlir::Block::getArguments().
Referenced by args_begin(), args_empty(), args_end(), args_rbegin(), args_rend(), convertOmpSections(), getArgument(), getNumArguments(), mlir::outlineSingleBlockRegion(), mlir::irdl::RegionConstraint::verify(), and mlir::dataflow::IntegerRangeAnalysis::visitNonControlFlowArguments().
auto Region::getArgumentTypes | ( | ) |
Returns the argument types of the first block within the region.
Definition at line 36 of file Region.cpp.
|
inline |
Definition at line 45 of file Region.h.
Referenced by checkTransformationPreconditions(), cloneInto(), convertOmpOpRegions(), mlir::OpBuilder::createBlock(), createSingleExitBlocksForReturnLike(), deleteDeadness(), mlir::sparse_tensor::LoopEmitter::enterCurrentCoIterationCase(), mlir::Block::erase(), mlir::ConversionPatternRewriter::eraseBlock(), getBackwardSliceImpl(), mlir::getBlocksSortedByDominance(), getEffectsAfter(), getEffectsBefore(), mlir::RewriterBase::inlineRegionBefore(), mlir::Block::insertAfter(), mlir::Block::insertBefore(), lastNonTerminatorInRegion(), mlirBlockDetach(), mlirLinalgFillBuiltinNamedOpRegion(), mlirRegionInsertOwnedBlockAfter(), mlir::Block::moveBefore(), mlir::gpu::WarpDistributionPattern::moveRegionToNewWarpOpAndReplaceReturns(), printSingleBlockRegion(), mlir::Block::splitBlock(), takeBody(), transformCyclesToSCFLoops(), and mlir::irdl::RegionConstraint::verify().
MLIRContext * Region::getContext | ( | ) |
Return the context this region is inserted in.
The region must have a valid parent container.
Definition at line 24 of file Region.cpp.
References mlir::Operation::getContext().
Referenced by mlir::applyPatternsGreedily().
Location Region::getLoc | ( | ) |
Return a location for this region.
This is the location attached to the parent container. The region must have a valid parent container.
Definition at line 31 of file Region.cpp.
References mlir::Operation::getLoc().
Referenced by mlir::LatticeAnchor::getLoc(), mlir::dataflow::CFGEdge::getLoc(), mlir::transformCFGToSCF(), and mlir::irdl::RegionConstraint::verify().
|
inline |
Definition at line 123 of file Region.h.
References getArguments().
Referenced by convertOmpSections(), and verifyNumBlockArgs().
|
inline |
Definition at line 172 of file Region.h.
References op_begin(), and op_end().
Referenced by applyPatterns(), mlir::irdl::createVerifier(), getAttrOrTypeVerifier(), mlir::bufferization::getGlobalFor(), mlir::OpTrait::OneRegion< ConcreteType >::getOps(), mlir::bytecode::detail::IRNumberingState::IRNumberingState(), printOperation(), mlir::SymbolUserMap::SymbolUserMap(), and verifyInitLikeSingleArgRegion().
|
inline |
Definition at line 185 of file Region.h.
References op_begin(), and op_end().
|
inline |
Find the first parent operation of the given type, or nullptr if there is no ancestor operation.
Definition at line 205 of file Region.h.
Referenced by mlir::FunctionCallBuilder::create(), generateCopy(), and mlir::outlineSingleBlockRegion().
|
inline |
Return the parent operation this region is attached to.
Definition at line 200 of file Region.h.
Referenced by mlir::LocalAliasAnalysis::aliasImpl(), mlir::applyPatternsGreedily(), collectSymbolScopes(), collectUnderlyingAddressValues(), mlir::ConversionPatternRewriter::convertRegionTypes(), mlir::ControlFlowToSCFTransformation::createUnreachableTerminator(), mlir::bufferization::AnalysisState::getEnclosingRepetitiveRegion(), mlir::getEnclosingRepetitiveRegion(), mlir::transform::TransformState::getHandlesForPayloadOp(), mlir::transform::TransformState::getHandlesForPayloadValue(), getInsertionRegion(), mlir::CallGraph::getOrAddNode(), mlir::bufferization::getParallelRegion(), mlir::Block::getParentOp(), getRegionNumber(), hasAllocationScope(), inlineConvertOmpRegions(), insertCopyLoops(), mlir::InlinerInterface::isLegalToInline(), isRepetitiveRegion(), mlir::affine::isValidSymbol(), mlir::mayBeGraphRegion(), maybeReplaceWithConstant(), mlir::mayHaveSSADominance(), mlirRegionGetNextInOperation(), mlir::bufferization::ValueComparator::operator()(), mlir::CallGraph::print(), printRegion(), traverseRegionGraph(), and mlir::irdl::RegionConstraint::verify().
Region * Region::getParentRegion | ( | ) |
Return the region containing this region or nullptr if the region is attached to a top-level operation.
Definition at line 45 of file Region.cpp.
References mlir::Operation::getParentRegion().
Referenced by findCommonAncestor(), mlir::bufferization::AnalysisState::getEnclosingRepetitiveRegion(), mlir::bufferization::getNextEnclosingRepetitiveRegion(), mlir::bufferization::getParallelRegion(), mlir::Value::getParentRegion(), hasAllocationScope(), mlir::affine::hasNoInterveningEffect(), isProperAncestor(), mlir::bufferization::ValueComparator::operator()(), and mlir::visitUsedValuesDefinedAbove().
unsigned Region::getRegionNumber | ( | ) |
Return the number of this region in the parent operation.
Definition at line 62 of file Region.cpp.
References getParentOp(), and mlir::Operation::getRegions().
Referenced by genCoIterateBranchNest(), mlir::getEnclosingRepetitiveRegion(), mlir::bufferization::getParallelRegion(), mlir::detail::DominanceInfoBase< false >::isReachableFromEntry(), isRepetitiveRegion(), mlir::mayBeGraphRegion(), mlir::mayHaveSSADominance(), mlirRegionGetNextInOperation(), mlir::bufferization::ValueComparator::operator()(), printRegion(), traverseRegionGraph(), mlir::irdl::RegionConstraint::verify(), and mlir::dataflow::AbstractDenseForwardDataFlowAnalysis::visitRegionBranchOperation().
|
inlinestatic |
getSublistAccess() - Returns pointer to member of region.
|
inline |
Return true if this region has exactly one block.
Definition at line 68 of file Region.h.
References begin(), empty(), and end().
Referenced by mlir::detail::DominanceInfoBase< IsPostDom >::getDominanceInfo(), mlir::detail::DominanceInfoBase< IsPostDom >::getDomTree(), mlir::outlineSingleBlockRegion(), ShardingPropagation::runOnOperation(), mlir::transformCFGToSCF(), and mlir::detail::verifyParallelCombiningOpInterface().
|
inline |
Insert one value to the position in the argument list indicated by the given iterator.
The existing arguments are shifted. The block is expected not to have predecessors.
Definition at line 105 of file Region.h.
References front(), and mlir::Block::insertArgument().
|
inline |
Add one value to the argument list at the specified position.
Definition at line 116 of file Region.h.
References front(), and mlir::Block::insertArgument().
|
inline |
Return true if this region is ancestor of the other
region.
A region is considered as its own ancestor, use isProperAncestor
to avoid this.
Definition at line 222 of file Region.h.
References isProperAncestor().
Referenced by mlir::affine::hasNoInterveningEffect(), mlir::replaceAllUsesInRegionWith(), and mlir::visitUsedValuesDefinedAbove().
bool Region::isProperAncestor | ( | Region * | other | ) |
Return true if this region is a proper ancestor of the other
region.
Definition at line 50 of file Region.cpp.
References getParentRegion().
Referenced by diagnoseInvalidOperandDominance(), and isAncestor().
|
inline |
Return iterators that walk the operations nested directly within this region.
Definition at line 170 of file Region.h.
Referenced by emitSwitchCase(), findOptimal(), getOps(), op_begin(), and mlir::ReductionNode::update().
|
inline |
Return iterators that walk operations of type 'T' nested directly within this region.
Definition at line 177 of file Region.h.
References op_begin(), and op_end().
|
inline |
Definition at line 171 of file Region.h.
Referenced by emitSwitchCase(), findOptimal(), getOps(), op_begin(), op_end(), and mlir::ReductionNode::update().
|
inline |
|
inline |
Definition at line 61 of file Region.h.
Referenced by createSingleExitBranchRegion(), emplaceBlock(), parseSingleBlockRegion(), and transformCyclesToSCFLoops().
|
inline |
|
inline |
|
inline |
Takes body of another region (that region will have no body after this operation completes).
The current body of this region is cleared.
Definition at line 241 of file Region.h.
References dropAllReferences(), and getBlocks().
Referenced by mlir::affine::affineParallelize(), mlir::Operation::create(), mlir::linalg::pack(), and transposeOneLinalgOperandAndReplace().
void mlir::Region::viewGraph | ( | ) |
Definition at line 388 of file ViewOpGraph.cpp.
void mlir::Region::viewGraph | ( | const Twine & | regionName | ) |
Displays the CFG in a window.
This is for use from the debugger and depends on Graphviz to generate the graph. This function is defined in ViewOpGraph.cpp and only works with that target linked.
Definition at line 384 of file ViewOpGraph.cpp.
References llvmViewGraph().
|
inline |
Walk all nested operations, blocks or regions (including this region), depending on the type of callback.
The order in which operations, blocks or regions at the same nesting level are visited (e.g., lexicographical or reverse lexicographical order) is determined by Iterator
. The walk order for enclosing operations, blocks or regions with respect to their nested ones is specified by Order
(post-order by default).
A callback on a operation or block is allowed to erase that operation or block if either:
See Operation::walk for more details.
Definition at line 285 of file Region.h.
References mlir::WalkResult::advance(), mlir::WalkResult::interrupt(), mlir::PostOrder, and mlir::PreOrder.
Referenced by checkTransformationPreconditions(), getBackwardSliceImpl(), and mlir::visitUsedValuesDefinedAbove().