xref: /llvm-project/mlir/examples/transform/Ch3/include/MyExtensionTypes.td (revision 5a9bdd85ee4d8527e2cedf44f3ce26ff414f9b6a)
1//===-- MyExtensionTypes.td - Transform dialect tutorial ---*- tablegen -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines Transform dialect extension types used in the
10// Chapter 3 of the Transform dialect tutorial.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef MY_EXTENSIONTYPES
15#define MY_EXTENSIONTYPES
16
17include "mlir/IR/AttrTypeBase.td"
18include "mlir/Dialect/Transform/IR/TransformDialect.td"
19include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.td"
20
21// Transform dialect allows additional types to be defined and injected.
22def CallOpInterfaceHandle
23  : TypeDef<Transform_Dialect, "CallOpInterfaceHandle",
24      // The type must implement `TransformHandleTypeInterface`.
25      [DeclareTypeInterfaceMethods<TransformHandleTypeInterface>]> {
26
27  // The usual components of a type such as description, mnemonic and assembly format
28  // should be provided.
29  let summary = "handle to payload operations implementing CallOpInterface";
30  let mnemonic = "my.call_op_interface";
31  let assemblyFormat = "";
32}
33
34#endif // MY_EXTENSIONTYPES
35