Skip to content

Commit

Permalink
[mlir][bazel] Add suport for PDLL tests.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D124515
  • Loading branch information
Stephan Herhut committed Apr 27, 2022
1 parent 425620c commit c10bbc2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Expand Up @@ -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",
Expand Down
35 changes: 35 additions & 0 deletions utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
Expand Up @@ -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",
],
)

0 comments on commit c10bbc2

Please sign in to comment.