Skip to content

Commit

Permalink
update template generator for DialectTransforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenithalHourlyRate committed Dec 21, 2024
1 parent 276bc7c commit 116ad54
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions scripts/templates/DialectTransforms/lib/BUILD.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library")
load("@heir//lib/Transforms:transforms.bzl", "add_heir_transforms")

package(
default_applicable_licenses = ["@heir//:license"],
Expand Down Expand Up @@ -29,25 +29,8 @@ cc_library(
],
)

gentbl_cc_library(
name = "pass_inc_gen",
tbl_outs = [
(
[
"-gen-pass-decls",
"-name={{ dialect_name }}",
],
"Passes.h.inc",
),
(
["-gen-pass-doc"],
"{{ dialect_name }}Passes.md",
),
],
tblgen = "@llvm-project//mlir:mlir-tblgen",
add_heir_transforms(
header_filename = "Passes.h.inc",
pass_name = "{{ dialect_name }}",
td_file = "Passes.td",
deps = [
"@llvm-project//mlir:OpBaseTdFiles",
"@llvm-project//mlir:PassBaseTdFiles",
],
)

0 comments on commit 116ad54

Please sign in to comment.