Skip to content

Commit

Permalink
Add PDL dialect dependency on the pass
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Jul 22, 2024
1 parent 44617af commit e418182
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Transform/Arith/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ gentbl_cc_library(
td_file = "Passes.td",
deps = [
"@llvm-project//mlir:OpBaseTdFiles",
"@llvm-project//mlir:PDLDialectTdFiles",
"@llvm-project//mlir:PDLInterpOpsTdFiles",
"@llvm-project//mlir:PassBaseTdFiles",
],
)
Expand Down
6 changes: 6 additions & 0 deletions lib/Transform/Arith/Passes.td
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef LIB_TRANSFORM_ARITH_PASSES_TD_
#define LIB_TRANSFORM_ARITH_PASSES_TD_

include "mlir/Dialect/PDL/IR/PDLDialect.td"
include "mlir/Dialect/PDLInterp/IR/PDLInterpOps.td"
include "mlir/Pass/PassBase.td"

def MulToAdd : Pass<"mul-to-add"> {
Expand All @@ -15,6 +17,10 @@ def MulToAddPdll : Pass<"mul-to-add-pdll"> {
let description = [{
Convert multiplications to repeated additions (using pdll).
}];
let dependentDialects = [
"mlir::pdl::PDLDialect",
"mlir::pdl_interp::PDLInterpDialect",
];
}

#endif // LIB_TRANSFORM_ARITH_PASSES_TD_

0 comments on commit e418182

Please sign in to comment.