diff --git a/scripts/templates/DialectTransforms/lib/BUILD.jinja b/scripts/templates/DialectTransforms/lib/BUILD.jinja index 5500cdd7f..3209f7d35 100644 --- a/scripts/templates/DialectTransforms/lib/BUILD.jinja +++ b/scripts/templates/DialectTransforms/lib/BUILD.jinja @@ -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"], @@ -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", - ], )