[Mlir-commits] [mlir] ee6255d - [mlir] move lib/Bindings/Python/Attributes.td to include/mlir/Bindings/Python

Alex Zinenko llvmlistbot at llvm.org
Tue Nov 24 00:19:10 PST 2020


Author: Alex Zinenko
Date: 2020-11-24T09:19:01+01:00
New Revision: ee6255d2074ccd50dfc9d993259caa0c5c4da4cd

URL: https://github.com/llvm/llvm-project/commit/ee6255d2074ccd50dfc9d993259caa0c5c4da4cd
DIFF: https://github.com/llvm/llvm-project/commit/ee6255d2074ccd50dfc9d993259caa0c5c4da4cd.diff

LOG: [mlir] move lib/Bindings/Python/Attributes.td to include/mlir/Bindings/Python

This file is intended to be included by other files, including
out-of-tree dialects, and makes more sense in `include` than in `lib`.

Depends On D91652

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D91961

Added: 
    mlir/include/mlir/Bindings/Python/Attributes.td

Modified: 
    mlir/lib/Bindings/Python/StandardOps.td
    mlir/test/Bindings/Python/python_test_ops.td
    mlir/test/mlir-tblgen/op-python-bindings.td

Removed: 
    mlir/lib/Bindings/Python/Attributes.td


################################################################################
diff  --git a/mlir/lib/Bindings/Python/Attributes.td b/mlir/include/mlir/Bindings/Python/Attributes.td
similarity index 100%
rename from mlir/lib/Bindings/Python/Attributes.td
rename to mlir/include/mlir/Bindings/Python/Attributes.td

diff  --git a/mlir/lib/Bindings/Python/StandardOps.td b/mlir/lib/Bindings/Python/StandardOps.td
index 1bc7b09a4719..5b7caabc2341 100644
--- a/mlir/lib/Bindings/Python/StandardOps.td
+++ b/mlir/lib/Bindings/Python/StandardOps.td
@@ -14,7 +14,7 @@
 #ifndef PYTHON_BINDINGS_STANDARD_OPS
 #define PYTHON_BINDINGS_STANDARD_OPS
 
+include "mlir/Bindings/Python/Attributes.td"
 include "mlir/Dialect/StandardOps/IR/Ops.td"
-include "Attributes.td"
 
 #endif

diff  --git a/mlir/test/Bindings/Python/python_test_ops.td b/mlir/test/Bindings/Python/python_test_ops.td
index ac749e759806..34c7e37ef4b2 100644
--- a/mlir/test/Bindings/Python/python_test_ops.td
+++ b/mlir/test/Bindings/Python/python_test_ops.td
@@ -9,8 +9,8 @@
 #ifndef PYTHON_TEST_OPS
 #define PYTHON_TEST_OPS
 
+include "mlir/Bindings/Python/Attributes.td"
 include "mlir/IR/OpBase.td"
-include "../../../lib/Bindings/Python/Attributes.td"
 
 def Python_Test_Dialect : Dialect {
   let name = "python_test";

diff  --git a/mlir/test/mlir-tblgen/op-python-bindings.td b/mlir/test/mlir-tblgen/op-python-bindings.td
index 5a27cc2f0cd5..ef8b20fa2ccc 100644
--- a/mlir/test/mlir-tblgen/op-python-bindings.td
+++ b/mlir/test/mlir-tblgen/op-python-bindings.td
@@ -1,7 +1,7 @@
-// RUN: mlir-tblgen -gen-python-op-bindings -bind-dialect=test -I %S/../../include -I %S/../../lib/Bindings/Python %s | FileCheck %s
+// RUN: mlir-tblgen -gen-python-op-bindings -bind-dialect=test -I %S/../../include %s | FileCheck %s
 
 include "mlir/IR/OpBase.td"
-include "Attributes.td"
+include "mlir/Bindings/Python/Attributes.td"
 
 // CHECK: @_cext.register_dialect
 // CHECK: class _Dialect(_ir.Dialect):


        


More information about the Mlir-commits mailing list