//===- TestTransformDialectExtension.td --------------------*- tablegen -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file declares the operations that are injected into the Transform // dialect through the extension mechanism, as a test. // //===----------------------------------------------------------------------===// #ifndef MLIR_TESTTRANSFORMDIALECTEXTENSION_TD #define MLIR_TESTTRANSFORMDIALECTEXTENSION_TD include "mlir/IR/OpBase.td" include "mlir/Dialect/Transform/IR/TransformDialect.td" include "mlir/Dialect/Transform/IR/TransformEffects.td" include "mlir/Dialect/Transform/IR/TransformInterfaces.td" include "mlir/Dialect/PDL/IR/PDLTypes.td" def TestProduceParamOrForwardOperandOp : Op]> { let arguments = (ins Arg, "", [TransformMappingRead]>:$operand, OptionalAttr:$parameter); let results = (outs Res:$res); let assemblyFormat = "(`from` $operand^)? ($parameter^)? attr-dict"; let cppNamespace = "::mlir::test"; let hasVerifier = 1; } def TestConsumeOperandIfMatchesParamOrFail : Op]> { let arguments = (ins Arg:$operand, I64Attr:$parameter); let assemblyFormat = "$operand `[` $parameter `]` attr-dict"; let cppNamespace = "::mlir::test"; } def TestPrintRemarkAtOperandOp : Op]> { let arguments = (ins Arg:$operand, StrAttr:$message); let assemblyFormat = "$operand `,` $message attr-dict"; let cppNamespace = "::mlir::test"; } #endif // MLIR_TESTTRANSFORMDIALECTEXTENSION_TD