MLIR  19.0.0git
Macros | Functions
IRDL.cpp File Reference
#include "mlir/Dialect/IRDL/IR/IRDL.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/Operation.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/Casting.h"
#include "mlir/Dialect/IRDL/IR/IRDL.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLDialect.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLOps.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLTypesGen.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLAttributes.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLInterfaces.cpp.inc"
#include "mlir/Dialect/IRDL/IR/IRDLEnums.cpp.inc"

Go to the source code of this file.

Macros

#define GET_OP_LIST
 
#define GET_TYPEDEF_LIST
 
#define GET_ATTRDEF_LIST
 
#define GET_TYPEDEF_CLASSES
 
#define GET_ATTRDEF_CLASSES
 
#define GET_OP_CLASSES
 

Functions

static ParseResult parseSingleBlockRegion (OpAsmParser &p, Region &region)
 Parse a region, and add a single block if the region is empty. More...
 
static void printSingleBlockRegion (OpAsmPrinter &p, Operation *op, Region &region)
 
static ParseResult parseValueWithVariadicity (OpAsmParser &p, OpAsmParser::UnresolvedOperand &operand, VariadicityAttr &variadicityAttr)
 Parse a value with its variadicity first. More...
 
static ParseResult parseValuesWithVariadicity (OpAsmParser &p, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &operands, VariadicityArrayAttr &variadicityAttr)
 Parse a list of values with their variadicities first. More...
 
static void printValuesWithVariadicity (OpAsmPrinter &p, Operation *op, OperandRange operands, VariadicityArrayAttr variadicityAttr)
 Print a list of values with their variadicities first. More...
 
static ParseResult parseAttributesOp (OpAsmParser &p, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &attrOperands, ArrayAttr &attrNamesAttr)
 
static void printAttributesOp (OpAsmPrinter &p, AttributesOp op, OperandRange attrArgs, ArrayAttr attrNames)
 

Macro Definition Documentation

◆ GET_ATTRDEF_CLASSES

#define GET_ATTRDEF_CLASSES

Definition at line 276 of file IRDL.cpp.

◆ GET_ATTRDEF_LIST

#define GET_ATTRDEF_LIST

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 279 of file IRDL.cpp.

◆ GET_OP_LIST

#define GET_OP_LIST

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 271 of file IRDL.cpp.

◆ GET_TYPEDEF_LIST

#define GET_TYPEDEF_LIST

Function Documentation

◆ parseAttributesOp()

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

◆ parseSingleBlockRegion()

static ParseResult parseSingleBlockRegion ( OpAsmParser p,
Region region 
)
static

Parse a region, and add a single block if the region is empty.

If no region is parsed, create a new region with a single empty block.

Definition at line 57 of file IRDL.cpp.

References mlir::Region::empty(), mlir::failed(), mlir::failure(), mlir::OpAsmParser::parseOptionalRegion(), mlir::Region::push_back(), and mlir::success().

◆ parseValuesWithVariadicity()

static ParseResult parseValuesWithVariadicity ( OpAsmParser p,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  operands,
VariadicityArrayAttr &  variadicityAttr 
)
static

Parse a list of values with their variadicities first.

By default, the variadicity is single.

values-with-variadicity ::= ( (value-with-variadicity (, value-with-variadicity)*)? ) value-with-variadicity ::= ("single" | "optional" | "variadic")? ssa-value

Definition at line 186 of file IRDL.cpp.

References mlir::failure(), mlir::get(), mlir::AsmParser::getBuilder(), mlir::Builder::getContext(), mlir::AsmParser::Paren, mlir::AsmParser::parseCommaSeparatedList(), parseValueWithVariadicity(), and mlir::success().

◆ parseValueWithVariadicity()

static ParseResult parseValueWithVariadicity ( OpAsmParser p,
OpAsmParser::UnresolvedOperand operand,
VariadicityAttr &  variadicityAttr 
)
static

Parse a value with its variadicity first.

By default, the variadicity is single.

value-with-variadicity ::= ("single" | "optional" | "variadic")? ssa-value

Definition at line 158 of file IRDL.cpp.

References mlir::failure(), mlir::get(), mlir::AsmParser::getBuilder(), mlir::Builder::getContext(), mlir::OpAsmParser::parseOperand(), mlir::AsmParser::parseOptionalKeyword(), mlir::LogicalResult::succeeded(), and mlir::success().

Referenced by parseValuesWithVariadicity().

◆ printAttributesOp()

static void printAttributesOp ( OpAsmPrinter p,
AttributesOp  op,
OperandRange  attrArgs,
ArrayAttr  attrNames 
)
static

Definition at line 250 of file IRDL.cpp.

◆ printSingleBlockRegion()

static void printSingleBlockRegion ( OpAsmPrinter p,
Operation op,
Region region 
)
static

Definition at line 69 of file IRDL.cpp.

◆ printValuesWithVariadicity()

static void printValuesWithVariadicity ( OpAsmPrinter p,
Operation op,
OperandRange  operands,
VariadicityArrayAttr  variadicityAttr 
)
static

Print a list of values with their variadicities first.

By default, the variadicity is single.

values-with-variadicity ::= ( (value-with-variadicity (, value-with-variadicity)*)? ) value-with-variadicity ::= ("single" | "optional" | "variadic")? ssa-value

Definition at line 216 of file IRDL.cpp.