MLIR
20.0.0git
|
#include <utility>
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h"
#include "llvm/ADT/SmallPtrSet.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 . More... | |
Functions | |
static InFlightDiagnostic & | printRegionEdgeName (InFlightDiagnostic &diag, RegionBranchPoint sourceNo, RegionBranchPoint succRegionNo) |
static LogicalResult | verifyTypesAlongAllEdges (Operation *op, RegionBranchPoint sourcePoint, function_ref< FailureOr< TypeRange >(RegionBranchPoint)> getInputsTypesForRegion) |
Verify that types match along all region control flow edges originating from sourcePoint . More... | |
static bool | traverseRegionGraph (Region *begin, StopConditionFn stopConditionFn) |
Traverse the region graph starting at begin . More... | |
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). More... | |
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 226 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 265 of file ControlFlowInterfaces.cpp.
|
static |
Definition at line 87 of file ControlFlowInterfaces.cpp.
References diag(), and mlir::RegionBranchPoint::getRegionOrNull().
Referenced by verifyTypesAlongAllEdges(), and mlir::detail::verifyTypesAlongControlFlowEdges().
|
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 232 of file ControlFlowInterfaces.cpp.
References mlir::Operation::getNumRegions(), mlir::Region::getParentOp(), and mlir::Region::getRegionNumber().
|
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 108 of file ControlFlowInterfaces.cpp.
References diag(), mlir::Operation::emitOpError(), mlir::detail::enumerate(), and printRegionEdgeName().
Referenced by mlir::detail::verifyTypesAlongControlFlowEdges().