MLIR 22.0.0git
mlir::WalkResult Class Reference

A utility result that is used to signal how to proceed with an ongoing walk: More...

#include "mlir/Support/WalkResult.h"

Public Member Functions

 WalkResult (ResultEnum result=Advance)
 WalkResult (LogicalResult result)
 Allow LogicalResult to interrupt the walk on failure.
 WalkResult (Diagnostic &&)
 Allow diagnostics to interrupt the walk.
 WalkResult (InFlightDiagnostic &&)
bool operator== (const WalkResult &rhs) const
bool operator!= (const WalkResult &rhs) const
bool wasInterrupted () const
 Returns true if the walk was interrupted.
bool wasSkipped () const
 Returns true if the walk was skipped.

Static Public Member Functions

static WalkResult interrupt ()
static WalkResult advance ()
static WalkResult skip ()

Detailed Description

A utility result that is used to signal how to proceed with an ongoing walk:

  • Interrupt: the walk will be interrupted and no more operations, regions or blocks will be visited.
  • Advance: the walk will continue.
  • Skip: the walk of the current operation, region or block and their nested elements that haven't been visited already will be skipped and will continue with the next operation, region or block.

Definition at line 29 of file WalkResult.h.

Constructor & Destructor Documentation

◆ WalkResult() [1/4]

mlir::WalkResult::WalkResult ( ResultEnum result = Advance)
inline

Definition at line 33 of file WalkResult.h.

Referenced by advance(), interrupt(), operator!=(), operator==(), and skip().

◆ WalkResult() [2/4]

mlir::WalkResult::WalkResult ( LogicalResult result)
inline

Allow LogicalResult to interrupt the walk on failure.

Definition at line 36 of file WalkResult.h.

◆ WalkResult() [3/4]

mlir::WalkResult::WalkResult ( Diagnostic && )
inline

Allow diagnostics to interrupt the walk.

Definition at line 40 of file WalkResult.h.

◆ WalkResult() [4/4]

mlir::WalkResult::WalkResult ( InFlightDiagnostic && )
inline

Definition at line 41 of file WalkResult.h.

Member Function Documentation

◆ advance()

WalkResult mlir::WalkResult::advance ( )
inlinestatic

Definition at line 47 of file WalkResult.h.

References WalkResult().

Referenced by mlir::detail::AttrTypeReplacerBase< Concrete >::addReplacement(), mlir::AttrTypeWalker::addWalk(), areInnerBoundsInvariant(), areInnerBoundsInvariant(), mlir::bufferization::bufferizeOp(), canBeHoisted(), checkPreBufferizationAssumptions(), checkTransformationPreconditions(), collectLocationsFromLoc(), constructIsCancellable(), mlir::OperationConverter::convertOperations(), convertTargetOpsInNest(), mlir::transform::createCheckUsesPass(), mlir::createGpuEliminateBarriers(), mlir::xegpu::doSCFStructuralTypeConversionWithTensorType(), mlir::bufferization::eliminateEmptyTensors(), emit(), findCapturedOmpOp(), mlir::LocationAttr::findInstanceOf(), findPayloadRoot(), mlir::transform::gpu::findTopLevelForallOp(), findTransformEntryPointRecursive(), mlir::bufferization::OneShotAnalysisState::gatherUndefinedTensorUses(), getBackwardSliceImpl(), getFuncOpsOrderedByCalls(), getLastDependentOpInRange(), getLocationFromLoc(), mlir::affine::getLoopNestStats(), getMemoryFootprintBytes(), getSingleOpOfType(), getSymbolUsesImpl(), handleLoopAnnotations(), haveNoReadsAfterWriteExceptSameIndex(), hoistAffineIfOp(), mlir::linalg::hoistRedundantVectorBroadcasts(), mlir::linalg::hoistRedundantVectorTransfers(), mlir::bufferization::insertTensorCopies(), interruptIfValidLocation(), isNormalizedMemRefDynamicDim(), isOpReady(), mlir::linalg::linalgOpAnchoredEmptyTensorEliminationStep(), mlir::irdl::loadDialects(), loadOperation(), mlir::transform::gpu::mapNestedForallToThreadsImpl(), AllocaScopeHoister::matchAndRewrite(), AllocaScopeInliner::matchAndRewrite(), mlir::bufferization::OneShotAnalysisState::OneShotAnalysisState(), printFunctionBody(), replaceAllSymbolUsesImpl(), replaceElementImpl(), rewriteAffineOpAfterPeeling(), mlir::StateStack::stackWalk(), symbolKnownUseEmptyImpl(), unwrap(), updateReturnOps(), vectorizeLoopNest(), verifyBlockTags(), mlir::wasmssa::detail::verifyConstantExpressionInterface(), verifyQuantifierRegions(), mlir::detail::verifySymbolTable(), mlir::Block::walk(), mlir::Block::walk(), mlir::detail::walk(), mlir::detail::walk(), mlir::detail::walk(), mlir::detail::walk(), mlir::Region::walk(), walkReferenceCountedValues(), walkSymbolTable(), walkSymbolTable(), and walkSymbolUses().

◆ interrupt()

WalkResult mlir::WalkResult::interrupt ( )
inlinestatic

Definition at line 46 of file WalkResult.h.

References WalkResult().

Referenced by areInnerBoundsInvariant(), areInnerBoundsInvariant(), canBeHoisted(), checkPreBufferizationAssumptions(), checkTransformationPreconditions(), mlir::ml_program::impl::MLProgramPipelineGlobalsPassBase< DerivedT >::classof(), constructIsCancellable(), convertOmpLoopNest(), convertTargetOpsInNest(), mlir::createGpuEliminateBarriers(), emit(), findAllocaInsertPoint(), findCapturedOmpOp(), findCurrentLoopInfo(), mlir::LocationAttr::findInstanceOf(), findPayloadRoot(), mlir::transform::gpu::findTopLevelForallOp(), findTransformEntryPointRecursive(), getBackwardSliceImpl(), mlir::impl::GpuEliminateBarriersBase< DerivedT >::getDescription(), getLastDependentOpInRange(), getLocationFromLoc(), mlir::affine::getLoopNestStats(), getSingleOpOfType(), mlir::StateStack::getStackTop(), hasNestedParallelOp(), haveNoReadsAfterWriteExceptSameIndex(), hoistAffineIfOp(), mlir::linalg::hoistRedundantVectorBroadcasts(), mlir::linalg::hoistRedundantVectorTransfers(), mlir::bufferization::insertTensorCopies(), interruptIfValidLocation(), isInnermostAffineForOp(), isNormalizedMemRefDynamicDim(), isOpReady(), mlir::irdl::loadDialects(), loadOperation(), mlir::transform::gpu::mapNestedForallToThreadsImpl(), AllocaScopeInliner::matchAndRewrite(), unwrap(), updateReturnOps(), vectorizeLoopNest(), verifyBlockTags(), mlir::wasmssa::detail::verifyConstantExpressionInterface(), verifyQuantifierRegions(), mlir::Block::walk(), mlir::Block::walk(), mlir::detail::walk(), mlir::detail::walk(), mlir::detail::walk(), mlir::Region::walk(), mlir::AffineExprVisitor< SubClass, RetTy >::walkPostOrder(), walkReferenceCountedValues(), walkSymbolRefs(), and walkSymbolUses().

◆ operator!=()

bool mlir::WalkResult::operator!= ( const WalkResult & rhs) const
inline

Definition at line 44 of file WalkResult.h.

References rhs, and WalkResult().

◆ operator==()

bool mlir::WalkResult::operator== ( const WalkResult & rhs) const
inline

Definition at line 43 of file WalkResult.h.

References rhs, and WalkResult().

◆ skip()

◆ wasInterrupted()

◆ wasSkipped()

bool mlir::WalkResult::wasSkipped ( ) const
inline

Returns true if the walk was skipped.

Definition at line 54 of file WalkResult.h.

Referenced by replaceElementImpl().


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