MLIR  15.0.0git
Macros | Functions
PDL.cpp File Reference
#include "mlir/Dialect/PDL/IR/PDL.h"
#include "mlir/Dialect/PDL/IR/PDLOps.h"
#include "mlir/Dialect/PDL/IR/PDLTypes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Interfaces/InferTypeOpInterface.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "mlir/Dialect/PDL/IR/"
#include "mlir/Dialect/PDL/IR/"
+ Include dependency graph for PDL.cpp:

Go to the source code of this file.


#define GET_OP_LIST


static bool hasBindingUse (Operation *op)
 Returns true if the given operation is used by a "binding" pdl operation. More...
static LogicalResult verifyHasBindingUse (Operation *op)
 Returns success if the given operation is not in the main matcher body or is used by a "binding" operation. More...
static void visit (Operation *op, DenseSet< Operation *> &visited)
 Visits all the pdl.operand(s), pdl.result(s), and pdl.operation(s) connected to the given operation. More...
static ParseResult parseOperationOpAttributes (OpAsmParser &p, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &attrOperands, ArrayAttr &attrNamesAttr)
static void printOperationOpAttributes (OpAsmPrinter &p, OperationOp op, OperandRange attrArgs, ArrayAttr attrNames)
static LogicalResult verifyResultTypesAreInferrable (OperationOp op, OperandRange resultTypes)
 Verifies that the result types of this operation, defined within a pdl.rewrite, can be inferred. More...
static ParseResult parseResultsValueType (OpAsmParser &p, IntegerAttr index, Type &resultType)
static void printResultsValueType (OpAsmPrinter &p, ResultsOp op, IntegerAttr index, Type resultType)

Macro Definition Documentation



Definition at line 499 of file PDL.cpp.


#define GET_OP_LIST

Function Documentation

◆ hasBindingUse()

static bool hasBindingUse ( Operation op)

Returns true if the given operation is used by a "binding" pdl operation.

Definition at line 39 of file PDL.cpp.

References mlir::Operation::getUsers().

Referenced by verifyHasBindingUse().

◆ parseOperationOpAttributes()

static ParseResult parseOperationOpAttributes ( OpAsmParser p,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  attrOperands,
ArrayAttr &  attrNamesAttr 

◆ parseResultsValueType()

static ParseResult parseResultsValueType ( OpAsmParser p,
IntegerAttr  index,
Type resultType 

◆ printOperationOpAttributes()

static void printOperationOpAttributes ( OpAsmPrinter p,
OperationOp  op,
OperandRange  attrArgs,
ArrayAttr  attrNames 

Definition at line 168 of file PDL.cpp.

◆ printResultsValueType()

static void printResultsValueType ( OpAsmPrinter p,
ResultsOp  op,
IntegerAttr  index,
Type  resultType 

Definition at line 424 of file PDL.cpp.

References mlir::Region::empty(), mlir::success(), mlir::verify(), and verifyHasBindingUse().

◆ verifyHasBindingUse()

static LogicalResult verifyHasBindingUse ( Operation op)

Returns success if the given operation is not in the main matcher body or is used by a "binding" operation.

On failure, emits an error.

Definition at line 49 of file PDL.cpp.

References mlir::Operation::emitOpError(), mlir::Operation::getParentOp(), hasBindingUse(), and mlir::success().

Referenced by printResultsValueType(), verifyResultTypesAreInferrable(), and visit().

◆ verifyResultTypesAreInferrable()

static LogicalResult verifyResultTypesAreInferrable ( OperationOp  op,
OperandRange  resultTypes 

◆ visit()

static void visit ( Operation op,
DenseSet< Operation *> &  visited