From 38b71020a1c34021b87e56bebc2eb4eab61d09ec Mon Sep 17 00:00:00 2001 From: Victor Guerra Date: Wed, 27 Sep 2023 22:32:28 +0200 Subject: [PATCH] Adding canonicalizers to cmake build --- lib/Dialect/Poly/CMakeLists.txt | 4 ++++ lib/Dialect/Poly/PolyPatterns.td | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Dialect/Poly/CMakeLists.txt b/lib/Dialect/Poly/CMakeLists.txt index a78cc1b..2228778 100644 --- a/lib/Dialect/Poly/CMakeLists.txt +++ b/lib/Dialect/Poly/CMakeLists.txt @@ -1,6 +1,10 @@ add_mlir_dialect(Poly poly) add_mlir_doc(PolyDialect PolyDialect Poly/ -gen-dialect-doc) +set(LLVM_TARGET_DEFINITIONS PolyPatterns.td) +mlir_tablegen(PolyCanonicalize.cpp.inc -gen-rewriters) +add_public_tablegen_target(MLIRPolyCanonicalizationIncGen) + add_mlir_dialect_library(MLIRPoly PolyDialect.cpp PolyOps.cpp diff --git a/lib/Dialect/Poly/PolyPatterns.td b/lib/Dialect/Poly/PolyPatterns.td index 442a1ba..bfb2918 100644 --- a/lib/Dialect/Poly/PolyPatterns.td +++ b/lib/Dialect/Poly/PolyPatterns.td @@ -1,7 +1,7 @@ #ifndef LIB_DIALECT_POLY_POLYPATTERNS_TD_ #define LIB_DIALECT_POLY_POLYPATTERNS_TD_ -include "PolyOps.td" +include "Poly.td" include "mlir/Dialect/Complex/IR/ComplexOps.td" include "mlir/IR/PatternBase.td"