#ifndef TOY_OPS
#define TOY_OPS
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef TOY_OPS
#define TOY_OPS
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef TOY_COMBINE
#define TOY_COMBINE
-#ifndef OP_BASE
include "toy/Ops.td"
-#endif // OP_BASE
/// Note: The DRR definition used for defining patterns is shown below:
///
#ifndef TOY_OPS
#define TOY_OPS
-#ifndef MLIR_CALLINTERFACES
include "mlir/Analysis/CallInterfaces.td"
-#endif // MLIR_CALLINTERFACES
-
-#ifndef SHAPE_INFERENCE_INTERFACE
include "toy/ShapeInferenceInterface.td"
-#endif // SHAPE_INFERENCE_INTERFACE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef SHAPE_INFERENCE_INTERFACE
#define SHAPE_INFERENCE_INTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> {
let description = [{
#ifndef TOY_COMBINE
#define TOY_COMBINE
-#ifndef OP_BASE
include "toy/Ops.td"
-#endif // OP_BASE
/// Note: The DRR definition used for defining patterns is shown below:
///
#ifndef TOY_OPS
#define TOY_OPS
-#ifndef MLIR_CALLINTERFACES
include "mlir/Analysis/CallInterfaces.td"
-#endif // MLIR_CALLINTERFACES
-
-#ifndef SHAPE_INFERENCE_INTERFACE
include "toy/ShapeInferenceInterface.td"
-#endif // SHAPE_INFERENCE_INTERFACE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef SHAPE_INFERENCE_INTERFACE
#define SHAPE_INFERENCE_INTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> {
let description = [{
#ifndef TOY_COMBINE
#define TOY_COMBINE
-#ifndef OP_BASE
include "toy/Ops.td"
-#endif // OP_BASE
/// Note: The DRR definition used for defining patterns is shown below:
///
#ifndef TOY_OPS
#define TOY_OPS
-#ifndef MLIR_CALLINTERFACES
include "mlir/Analysis/CallInterfaces.td"
-#endif // MLIR_CALLINTERFACES
-
-#ifndef SHAPE_INFERENCE_INTERFACE
include "toy/ShapeInferenceInterface.td"
-#endif // SHAPE_INFERENCE_INTERFACE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef SHAPE_INFERENCE_INTERFACE
#define SHAPE_INFERENCE_INTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> {
let description = [{
#ifndef TOY_COMBINE
#define TOY_COMBINE
-#ifndef OP_BASE
include "toy/Ops.td"
-#endif // OP_BASE
/// Note: The DRR definition used for defining patterns is shown below:
///
#ifndef TOY_OPS
#define TOY_OPS
-#ifndef MLIR_CALLINTERFACES
include "mlir/Analysis/CallInterfaces.td"
-#endif // MLIR_CALLINTERFACES
-
-#ifndef SHAPE_INFERENCE_INTERFACE
include "toy/ShapeInferenceInterface.td"
-#endif // SHAPE_INFERENCE_INTERFACE
// Provide a definition of the 'toy' dialect in the ODS framework so that we
// can define our operations.
#ifndef SHAPE_INFERENCE_INTERFACE
#define SHAPE_INFERENCE_INTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def ShapeInferenceOpInterface : OpInterface<"ShapeInference"> {
let description = [{
#ifndef TOY_COMBINE
#define TOY_COMBINE
-#ifndef OP_BASE
include "toy/Ops.td"
-#endif // OP_BASE
/// Note: The DRR definition used for defining patterns is shown below:
///
#ifndef MLIR_CALLINTERFACES
#define MLIR_CALLINTERFACES
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
// `CallInterfaceCallable`: This is a type used to represent a single callable
// region. A callable is either a symbol, or an SSA value, that is referenced by
#ifndef MLIR_INFERTYPEOPINTERFACE
#define MLIR_INFERTYPEOPINTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
// OpInterface to compute the return type of an operation. The arguments match
// those in Operation::create with the exception that the location is optional
#ifndef AFFINE_OPS
#define AFFINE_OPS
-#ifndef OP_BASE
+include "mlir/Dialect/AffineOps/AffineOpsBase.td"
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
-
-#ifndef MLIR_LOOPLIKEINTERFACE
include "mlir/Transforms/LoopLikeInterface.td"
-#endif
-
-include "mlir/Dialect/AffineOps/AffineOpsBase.td"
def Affine_Dialect : Dialect {
let name = "affine";
#ifndef AFFINE_OPS_BASE
#define AFFINE_OPS_BASE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
// Attributes containing affine maps.
def AffineMapAttr : Attr<
#ifndef DIALECT_FXPMATHOPS_FXPMATH_OPS_
#define DIALECT_FXPMATHOPS_FXPMATH_OPS_
-#ifndef OP_BASE
-include "mlir/IR/OpBase.td"
-#endif // OP_BASE
+include "mlir/IR/OpBase.td"
include "mlir/Dialect/QuantOps/QuantPredicates.td"
def fxpmath_Dialect : Dialect {
#ifndef GPU_OPS
#define GPU_OPS
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def GPU_Dialect : Dialect {
let name = "gpu";
#ifndef LLVMIR_OP_BASE
#define LLVMIR_OP_BASE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def LLVM_Dialect : Dialect {
let name = "llvm";
//
//===----------------------------------------------------------------------===//
-#ifndef OP_BASE
-include "mlir/IR/OpBase.td"
-#endif // OP_BASE
-
#ifndef LINALG_BASE
#define LINALG_BASE
+include "mlir/IR/OpBase.td"
+
def Linalg_Dialect : Dialect {
let name = "linalg";
let description = [{
#ifndef LINALG_LIBRARY_OPS
#define LINALG_LIBRARY_OPS
-#ifndef AFFINE_OPS_BASE
include "mlir/Dialect/AffineOps/AffineOpsBase.td"
-#endif // AFFINE_OPS_BASE
-
-#ifndef LINALG_BASE
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
-#endif // LINALG_BASE
class LinalgParametricNativeOpTrait<string prop, string parameters> :
NativeOpTrait<"linalg::" # prop # parameters>
#ifndef LINALG_OPS
#define LINALG_OPS
-#ifndef AFFINE_OPS_BASE
include "mlir/Dialect/AffineOps/AffineOpsBase.td"
-#endif // AFFINE_OPS_BASE
-
-#ifndef LINALG_BASE
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
-#endif // LINALG_BASE
// Base class for Linalg dialect ops that do not correspond to library calls.
class Linalg_Op<string mnemonic, list<OpTrait> traits = []> :
#ifndef LINALG_TRANSFORMS
#define LINALG_TRANSFORMS
-#ifndef LINALG_OPS
include "mlir/Dialect/Linalg/IR/LinalgOps.td"
-#endif // LINALG_OPS
-#ifndef LINALG_LIBRARY_OPS
include "mlir/Dialect/Linalg/IR/LinalgLibraryOps.td"
-#endif // LINALG_LIBRARY_OPS
def HasNoLinalgTransformMarker : CPred<[{
!$0.getAttrOfType<StringAttr>(LinalgTransforms::kLinalgTransformMarker)
#ifndef LOOP_OPS
#define LOOP_OPS
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
-
-#ifndef MLIR_LOOPLIKEINTERFACE
include "mlir/Transforms/LoopLikeInterface.td"
-#endif
def Loop_Dialect : Dialect {
let name = "loop";
#ifndef DIALECT_QUANTOPS_QUANT_OPS_
#define DIALECT_QUANTOPS_QUANT_OPS_
-#ifndef OP_BASE
+
include "mlir/IR/OpBase.td"
include "mlir/Dialect/QuantOps/QuantPredicates.td"
-#endif // OP_BASE
def quant_Dialect : Dialect {
let name = "quant";
#ifndef SPIRV_ARITHMETIC_OPS
#define SPIRV_ARITHMETIC_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
class SPV_ArithmeticBinaryOp<string mnemonic, Type type,
list<OpTrait> traits = []> :
#ifndef SPIRV_BASE
#define SPIRV_BASE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
//===----------------------------------------------------------------------===//
// SPIR-V dialect definitions
#ifndef SPIRV_BIT_OPS
#define SPIRV_BIT_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
class SPV_BitBinaryOp<string mnemonic, list<OpTrait> traits = []> :
// All the operands type used in bit instructions are SPV_Integer.
#ifndef SPIRV_CAST_OPS
#define SPIRV_CAST_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
class SPV_CastOp<string mnemonic, Type resultType, Type operandType,
list<OpTrait> traits = []> :
#ifndef SPIRV_CONTROLFLOW_OPS
#define SPIRV_CONTROLFLOW_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
-
-#ifndef MLIR_CALLINTERFACES
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
include "mlir/Analysis/CallInterfaces.td"
-#endif // MLIR_CALLINTERFACES
// -----
#ifndef SPIRV_GLSL_OPS
#define SPIRV_GLSL_OPS
-#ifndef SPIRV_BASE
include "mlir/Dialect/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
//===----------------------------------------------------------------------===//
// SPIR-V GLSL 4.50 opcode specification.
#ifndef SPIRV_LOGICAL_OPS
#define SPIRV_LOGICAL_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
class SPV_LogicalBinaryOp<string mnemonic, Type operandsType,
list<OpTrait> traits = []> :
#ifndef SPIRV_OPS
#define SPIRV_OPS
-#ifndef SPIRV_BASE
include "mlir/Dialect/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
-
-#ifndef SPIRV_ARITHMETIC_OPS
include "mlir/Dialect/SPIRV/SPIRVArithmeticOps.td"
-#endif // SPIRV_ARITHMETIC_OPS
-
-#ifndef SPIRV_BIT_OPS
include "mlir/Dialect/SPIRV/SPIRVBitOps.td"
-#endif // SPIRV_BIT_OPS
-
-#ifndef SPIRV_CAST_OPS
include "mlir/Dialect/SPIRV/SPIRVCastOps.td"
-#endif // SPIRV_CAST_OPS
-
-#ifndef SPIRV_CONTROLFLOW_OPS
include "mlir/Dialect/SPIRV/SPIRVControlFlowOps.td"
-#endif // SPIRV_CONTROLFLOW_OPS
-
-#ifndef SPIRV_LOGICAL_OPS
include "mlir/Dialect/SPIRV/SPIRVLogicalOps.td"
-#endif // SPIRV_LOGICAL_OPS
-
-#ifndef SPIRV_STRUCTURE_OPS
// Pull in ops for defining the SPIR-V module structure
include "mlir/Dialect/SPIRV/SPIRVStructureOps.td"
-#endif // SPIRV_STRUCTURE_OPS
-
-#ifndef SPIRV_GLSL_OPS
// Pull in ops for extended instruction set for GLSL
include "mlir/Dialect/SPIRV/SPIRVGLSLOps.td"
-#endif // SPIRV_GLSL_OPS
// -----
#ifndef SPIRV_STRUCTURE_OPS
#define SPIRV_STRUCTURE_OPS
-#ifndef SPIRV_BASE
-include "mlir/SPIRV/SPIRVBase.td"
-#endif // SPIRV_BASE
+include "mlir/Dialect/SPIRV/SPIRVBase.td"
def SPV_AddressOfOp : SPV_Op<"_address_of", [InFunctionScope, NoSideEffect]> {
let summary = "Get the address of a global variable.";
#ifndef STANDARD_OPS
#define STANDARD_OPS
-#ifndef OP_BASE
-include "mlir/IR/OpBase.td"
-#endif // OP_BASE
-
-include "mlir/IR/OpAsmInterface.td"
include "mlir/Analysis/CallInterfaces.td"
+include "mlir/IR/OpAsmInterface.td"
def Std_Dialect : Dialect {
let name = "std";
#ifndef VECTOR_OPS
#define VECTOR_OPS
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
-
-#ifndef AFFINE_OPS_BASE
include "mlir/Dialect/AffineOps/AffineOpsBase.td"
-#endif // AFFINE_OPS_BASE
def Vector_Dialect : Dialect {
let name = "vector";
#ifndef MLIR_OPASMINTERFACE
#define MLIR_OPASMINTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
/// Interface for hooking into the OpAsmPrinter and OpAsmParser.
def OpAsmOpInterface : OpInterface<"OpAsmOpInterface"> {
#ifndef MLIR_LOOPLIKEINTERFACE
#define MLIR_LOOPLIKEINTERFACE
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
let description = [{
#ifndef MLIR_CONVERSION_GPUTONVVM_TD
#define MLIR_CONVERSION_GPUTONVVM_TD
-#ifndef GPU_OPS
include "mlir/Dialect/GPU/GPUOps.td"
-#endif // GPU_OPS
-
-#ifndef NVVMIR_OPS
include "mlir/Dialect/LLVMIR/NVVMOps.td"
-#endif // NVVMIR_OPS
def : Pat<(GPU_BarrierOp), (NVVM_Barrier0Op)>;
#ifndef MLIR_CONVERSION_STANDARDTOSPIRV_TD
#define MLIR_CONVERSION_STANDARDTOSPIRV_TD
-#ifndef STANDARD_OPS
include "mlir/Dialect/StandardOps/Ops.td"
-#endif // STANDARD_OPS
-
-#ifndef SPIRV_OPS
include "mlir/Dialect/SPIRV/SPIRVOps.td"
-#endif // SPIRV_OPS
class BinaryOpPattern<Op src, Op tgt> :
Pat<(src SPV_ScalarOrVector:$l, SPV_ScalarOrVector:$r),
#ifndef TEST_LINALG_TRANSFORMS_PATTERNS
#define TEST_LINALG_TRANSFORMS_PATTERNS
-#ifndef LINALG_TRANSFORMS
include "mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td"
-#endif // LINALG_TRANSFORMS
//===----------------------------------------------------------------------===//
// Test Linalg fusion patterns.
// RUN: mlir-tblgen -gen-reference-implementations -I %S/../../include %s | FileCheck %s
-#ifndef OP_BASE
include "mlir/IR/OpBase.td"
-#endif // OP_BASE
def X_Dialect : Dialect {
let name = "x";