diff options
author | Stephan Herhut <herhut@google.com> | 2022-04-27 13:11:03 +0300 |
---|---|---|
committer | Stephan Herhut <herhut@google.com> | 2022-04-27 13:35:12 +0300 |
commit | c10bbc20bc4df4fcf2c8da9f312facce7abbccae (patch) | |
tree | f881ba3278f8402773d8ec03e1edb82505d72e24 /utils | |
parent | 425620ccdd47e56b59512913cdc71e116f951e4e (diff) |
[mlir][bazel] Add suport for PDLL tests.
Differential Revision: https://reviews.llvm.org/D124515
Diffstat (limited to 'utils')
-rw-r--r-- | utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 1 | ||||
-rw-r--r-- | utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel index 274fa873823d..354bbb2ab8c0 100644 --- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel @@ -6188,6 +6188,7 @@ cc_binary( "//mlir/test:TestLinalg", "//mlir/test:TestMath", "//mlir/test:TestMemRef", + "//mlir/test:TestPDLL", "//mlir/test:TestPass", "//mlir/test:TestReducer", "//mlir/test:TestRewrite", diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel index 1e4707f02a52..8768eed8fa0d 100644 --- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel @@ -626,3 +626,38 @@ cc_library( "//mlir:Transforms", ], ) + +gentbl_cc_library( + name = "TestPDLLPatternsIncGen", + includes = ["lib/Dialect/Test"], + strip_include_prefix = "lib", + tbl_outs = [ + ( + ["-x=cpp"], + "lib/Tools/PDLL/TestPDLLPatterns.h.inc", + ), + ], + tblgen = "//mlir:mlir-pdll", + td_file = "lib/Tools/PDLL/TestPDLL.pdll", + deps = [ + ":TestDialect", + ":TestOpTdFiles", + ], +) + +cc_library( + name = "TestPDLL", + srcs = ["lib/Tools/PDLL/TestPDLL.cpp"], + includes = ["lib/Tools/PDLL"], + deps = [ + ":TestDialect", + ":TestPDLLPatternsIncGen", + "//mlir:IR", + "//mlir:PDLDialect", + "//mlir:PDLInterpDialect", + "//mlir:Parser", + "//mlir:Pass", + "//mlir:Support", + "//mlir:TransformUtils", + ], +) |