MLIR 23.0.0git
ControlFlowInterfaces.h File Reference
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "mlir/Interfaces/ControlFlowInterfaces.h.inc"

Go to the source code of this file.

Classes

class  mlir::SuccessorOperands
 This class models how operands are forwarded to block arguments in control flow. More...
class  mlir::RegionSuccessor
 This class represents a successor of a region. More...
class  mlir::RegionBranchPoint
 This class represents a point being branched from in the methods of the RegionBranchOpInterface. More...
class  mlir::InvocationBounds
 This class represents upper and lower bounds on the number of times a region of a RegionBranchOpInterface can be invoked. More...
struct  mlir::OpTrait::ReturnLike< ConcreteType >
 This trait indicates that a terminator operation is "return-like". More...

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::detail
 AttrTypeReplacer.
namespace  mlir::OpTrait

Typedefs

using mlir::RegionBranchSuccessorMapping = DenseMap<OpOperand *, SmallVector<Value>>
 A mapping from successor operands to successor inputs.
using mlir::RegionBranchInverseSuccessorMapping
using mlir::NonSuccessorInputReplacementBuilderFn
 Helper function for the region branch op inlining pattern that builds replacement values for non-successor-input values.
using mlir::PatternMatcherFn = std::function<LogicalResult(Operation *)>
 Helper function for the region branch op inlining pattern that checks if the pattern is applicable to the given operation.

Functions

std::optional< BlockArgumentmlir::detail::getBranchSuccessorArgument (const SuccessorOperands &operands, unsigned operandIndex, Block *successor)
 Return the BlockArgument corresponding to operand operandIndex in some successor if operandIndex is within the range of operands, or std::nullopt if operandIndex isn't a successor operand index.
LogicalResult mlir::detail::verifyBranchSuccessorOperands (Operation *op, unsigned succNo, const SuccessorOperands &operands)
 Verify that the given operands match those of the given successor block.
LogicalResult mlir::detail::verifyBranchWeights (Operation *op)
 Verify that the branch weights attached to an operation implementing WeightedBranchOpInterface are correct.
LogicalResult mlir::detail::verifyRegionBranchWeights (Operation *op)
 Verify that the region weights attached to an operation implementing WeightedRegiobBranchOpInterface are correct.
LogicalResult mlir::detail::verifyRegionBranchOpInterface (Operation *op)
 Verify that types match along control flow edges described the given op.
bool mlir::insideMutuallyExclusiveRegions (Operation *a, Operation *b)
 Return true if a and b are in mutually exclusive regions as per RegionBranchOpInterface.
Regionmlir::getEnclosingRepetitiveRegion (Operation *op)
 Return the first enclosing region of the given op that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.
Regionmlir::getEnclosingRepetitiveRegion (Value value)
 Return the first enclosing region of the given Value that may be executed repetitively as per RegionBranchOpInterface or nullptr if no such region exists.
void mlir::populateRegionBranchOpInterfaceCanonicalizationPatterns (RewritePatternSet &patterns, StringRef opName, PatternBenefit benefit=1)
 Populate canonicalization patterns that simplify successor operands/inputs of region branch operations.
static Value mlir::detail::defaultReplBuilderFn (OpBuilder &builder, Location loc, Value value)
 Default implementation of the non-successor-input replacement builder function.
static LogicalResult mlir::detail::defaultMatcherFn (Operation *op)
 Default implementation of the pattern matcher function.
void mlir::populateRegionBranchOpInterfaceInliningPattern (RewritePatternSet &patterns, StringRef opName, NonSuccessorInputReplacementBuilderFn replBuilderFn=detail::defaultReplBuilderFn, PatternMatcherFn matcherFn=detail::defaultMatcherFn, PatternBenefit benefit=1)
 Populate a pattern that inlines the body of region branch ops when there is a single acyclic path through the region branch op, starting from "parent" and ending at "parent".
bool mlir::operator!= (RegionBranchPoint lhs, RegionBranchPoint rhs)
llvm::raw_ostream & mlir::operator<< (llvm::raw_ostream &os, RegionBranchPoint point)
llvm::raw_ostream & mlir::operator<< (llvm::raw_ostream &os, RegionSuccessor successor)