Skip to content

Commit c10bbc2

Browse files
author
Stephan Herhut
committed
[mlir][bazel] Add suport for PDLL tests.
Differential Revision: https://reviews.llvm.org/D124515
1 parent 425620c commit c10bbc2

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6188,6 +6188,7 @@ cc_binary(
61886188
"//mlir/test:TestLinalg",
61896189
"//mlir/test:TestMath",
61906190
"//mlir/test:TestMemRef",
6191+
"//mlir/test:TestPDLL",
61916192
"//mlir/test:TestPass",
61926193
"//mlir/test:TestReducer",
61936194
"//mlir/test:TestRewrite",

utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,38 @@ cc_library(
626626
"//mlir:Transforms",
627627
],
628628
)
629+
630+
gentbl_cc_library(
631+
name = "TestPDLLPatternsIncGen",
632+
includes = ["lib/Dialect/Test"],
633+
strip_include_prefix = "lib",
634+
tbl_outs = [
635+
(
636+
["-x=cpp"],
637+
"lib/Tools/PDLL/TestPDLLPatterns.h.inc",
638+
),
639+
],
640+
tblgen = "//mlir:mlir-pdll",
641+
td_file = "lib/Tools/PDLL/TestPDLL.pdll",
642+
deps = [
643+
":TestDialect",
644+
":TestOpTdFiles",
645+
],
646+
)
647+
648+
cc_library(
649+
name = "TestPDLL",
650+
srcs = ["lib/Tools/PDLL/TestPDLL.cpp"],
651+
includes = ["lib/Tools/PDLL"],
652+
deps = [
653+
":TestDialect",
654+
":TestPDLLPatternsIncGen",
655+
"//mlir:IR",
656+
"//mlir:PDLDialect",
657+
"//mlir:PDLInterpDialect",
658+
"//mlir:Parser",
659+
"//mlir:Pass",
660+
"//mlir:Support",
661+
"//mlir:TransformUtils",
662+
],
663+
)

0 commit comments

Comments
 (0)