diff --git a/mlir/lib/Dialect/Shape/CMakeLists.txt b/mlir/lib/Dialect/Shape/CMakeLists.txt --- a/mlir/lib/Dialect/Shape/CMakeLists.txt +++ b/mlir/lib/Dialect/Shape/CMakeLists.txt @@ -1,20 +1 @@ -set(LLVM_TARGET_DEFINITIONS IR/ShapeCanonicalization.td) -mlir_tablegen(IR/ShapeCanonicalization.inc -gen-rewriters) -add_public_tablegen_target(MLIRShapeCanonicalizationIncGen) - -add_mlir_dialect_library(MLIRShape - IR/Shape.cpp - - ADDITIONAL_HEADER_DIRS - ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Shape - - DEPENDS - MLIRShapeOpsIncGen - - LINK_LIBS PUBLIC - MLIRControlFlowInterfaces - MLIRDialect - MLIRInferTypeOpInterface - MLIRIR - MLIRSideEffectInterfaces - ) +add_subdirectory(IR) diff --git a/mlir/lib/Dialect/Shape/CMakeLists.txt b/mlir/lib/Dialect/Shape/IR/CMakeLists.txt copy from mlir/lib/Dialect/Shape/CMakeLists.txt copy to mlir/lib/Dialect/Shape/IR/CMakeLists.txt --- a/mlir/lib/Dialect/Shape/CMakeLists.txt +++ b/mlir/lib/Dialect/Shape/IR/CMakeLists.txt @@ -1,9 +1,9 @@ -set(LLVM_TARGET_DEFINITIONS IR/ShapeCanonicalization.td) -mlir_tablegen(IR/ShapeCanonicalization.inc -gen-rewriters) +set(LLVM_TARGET_DEFINITIONS ShapeCanonicalization.td) +mlir_tablegen(ShapeCanonicalization.inc -gen-rewriters) add_public_tablegen_target(MLIRShapeCanonicalizationIncGen) add_mlir_dialect_library(MLIRShape - IR/Shape.cpp + Shape.cpp ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Shape diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -19,7 +19,7 @@ using namespace mlir::shape; namespace { -#include "IR/ShapeCanonicalization.inc" +#include "ShapeCanonicalization.inc" } ShapeDialect::ShapeDialect(MLIRContext *context)