19f3f6d7bSStella Laurenzo//===-- python_test_ops.td - Python test Op definitions ----*- tablegen -*-===// 29f3f6d7bSStella Laurenzo// 39f3f6d7bSStella Laurenzo// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 49f3f6d7bSStella Laurenzo// See https://llvm.org/LICENSE.txt for license information. 59f3f6d7bSStella Laurenzo// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 69f3f6d7bSStella Laurenzo// 79f3f6d7bSStella Laurenzo//===----------------------------------------------------------------------===// 89f3f6d7bSStella Laurenzo 99f3f6d7bSStella Laurenzo#ifndef PYTHON_TEST_OPS 109f3f6d7bSStella Laurenzo#define PYTHON_TEST_OPS 119f3f6d7bSStella Laurenzo 129f3f6d7bSStella Laurenzoinclude "mlir/Bindings/Python/Attributes.td" 139f3f6d7bSStella Laurenzoinclude "mlir/IR/OpBase.td" 149f3f6d7bSStella Laurenzo 159f3f6d7bSStella Laurenzodef Python_Test_Dialect : Dialect { 169f3f6d7bSStella Laurenzo let name = "python_test"; 179f3f6d7bSStella Laurenzo let cppNamespace = "PythonTest"; 189f3f6d7bSStella Laurenzo} 199f3f6d7bSStella Laurenzoclass TestOp<string mnemonic, list<OpTrait> traits = []> 209f3f6d7bSStella Laurenzo : Op<Python_Test_Dialect, mnemonic, traits>; 219f3f6d7bSStella Laurenzo 229f3f6d7bSStella Laurenzodef AttributedOp : TestOp<"attributed_op"> { 239f3f6d7bSStella Laurenzo let arguments = (ins I32Attr:$mandatory_i32, 249f3f6d7bSStella Laurenzo OptionalAttr<I32Attr>:$optional_i32, 259f3f6d7bSStella Laurenzo UnitAttr:$unit); 269f3f6d7bSStella Laurenzo} 279f3f6d7bSStella Laurenzo 28*b4c93eceSJohn Demmedef PropertyOp : TestOp<"property_op"> { 29*b4c93eceSJohn Demme let arguments = (ins I32Attr:$property, 30*b4c93eceSJohn Demme I32:$idx); 31*b4c93eceSJohn Demme} 32*b4c93eceSJohn Demme 339f3f6d7bSStella Laurenzo#endif // PYTHON_TEST_OPS 34