|
MLIR 22.0.0git
|
#include <utility>#include "mlir/IR/BuiltinTypes.h"#include "mlir/IR/Operation.h"#include "mlir/Interfaces/ControlFlowInterfaces.h"#include "llvm/Support/DebugLog.h"#include "mlir/Interfaces/ControlFlowInterfaces.cpp.inc"Go to the source code of this file.
Typedefs | |
| using | StopConditionFn = function_ref<bool(Region *, ArrayRef<bool> visited)> |
| Stop condition for traverseRegionGraph. | |
Functions | |
| static LogicalResult | verifyWeights (Operation *op, llvm::ArrayRef< int32_t > weights, std::size_t expectedWeightsNum, llvm::StringRef weightAnchorName, llvm::StringRef weightRefName) |
| static InFlightDiagnostic & | printRegionEdgeName (InFlightDiagnostic &diag, RegionBranchPoint sourceNo, RegionSuccessor succRegionNo) |
| static LogicalResult | verifyTypesAlongAllEdges (RegionBranchOpInterface branchOp, RegionBranchPoint sourcePoint, function_ref< FailureOr< TypeRange >(RegionSuccessor)> getInputsTypesForRegion) |
| Verify that types match along all region control flow edges originating from sourcePoint. | |
| static bool | traverseRegionGraph (Region *begin, StopConditionFn stopConditionFn) |
| Traverse the region graph starting at begin. | |
| static bool | isRegionReachable (Region *begin, Region *r) |
| Return true if region r is reachable from region begin according to the RegionBranchOpInterface (by taking a branch). | |
| using StopConditionFn = function_ref<bool(Region *, ArrayRef<bool> visited)> |
Stop condition for traverseRegionGraph.
The traversal is interrupted if this function returns "true" for a successor region. The first parameter is the successor region. The second parameter indicates all already visited regions.
Definition at line 271 of file ControlFlowInterfaces.cpp.
Return true if region r is reachable from region begin according to the RegionBranchOpInterface (by taking a branch).
Definition at line 352 of file ControlFlowInterfaces.cpp.
References mlir::Region::getParentOp(), and traverseRegionGraph().
|
static |
Definition at line 155 of file ControlFlowInterfaces.cpp.
References diag(), mlir::RegionSuccessor::getSuccessor(), and mlir::RegionBranchPoint::getTerminatorPredecessorOrNull().
Referenced by verifyTypesAlongAllEdges().
|
static |
Traverse the region graph starting at begin.
The traversal is interrupted if stopCondition evaluates to "true" for a successor region. In that case, this function returns "true". Otherwise, if the traversal was not interrupted, this function returns "false".
Definition at line 277 of file ControlFlowInterfaces.cpp.
References mlir::Region::getParentOp(), and mlir::Region::getRegionNumber().
Referenced by isRegionReachable().
|
static |
Verify that types match along all region control flow edges originating from sourcePoint.
getInputsTypesForRegion is a function that returns the types of the inputs that flow to a successor region.
Definition at line 176 of file ControlFlowInterfaces.cpp.
References diag(), printRegionEdgeName(), and success().
Referenced by mlir::detail::verifyTypesAlongControlFlowEdges().
|
static |
Definition at line 114 of file ControlFlowInterfaces.cpp.
References mlir::Operation::emitError(), and success().
Referenced by mlir::detail::verifyBranchWeights(), and mlir::detail::verifyRegionBranchWeights().