[Mlir-commits] [mlir] f061295 - [MLIR] Complete refactoring of Affine dialect into sub-libraries.
Stephen Neuendorffer
llvmlistbot at llvm.org
Thu Apr 16 13:41:39 PDT 2020
Author: Stephen Neuendorffer
Date: 2020-04-16T13:41:17-07:00
New Revision: f0612957324b287d8bf3e00cac3dc3d48ba6d414
URL: https://github.com/llvm/llvm-project/commit/f0612957324b287d8bf3e00cac3dc3d48ba6d414
DIFF: https://github.com/llvm/llvm-project/commit/f0612957324b287d8bf3e00cac3dc3d48ba6d414.diff
LOG: [MLIR] Complete refactoring of Affine dialect into sub-libraries.
There were some unused CMakeFiles for Affine/IR and Affine/EDSC.
This change builds separate MLIRAffineOps and MLIRAffineEDSC libraries
using those CMakeFiles. This combination replaces the old MLIRAffine
library.
Differential Revision: https://reviews.llvm.org/D78317
Added:
Modified:
mlir/lib/Analysis/CMakeLists.txt
mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
mlir/lib/Dialect/Affine/CMakeLists.txt
mlir/lib/Dialect/Affine/EDSC/CMakeLists.txt
mlir/lib/Dialect/Affine/IR/CMakeLists.txt
mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
mlir/lib/Dialect/Vector/CMakeLists.txt
mlir/lib/Transforms/CMakeLists.txt
mlir/lib/Transforms/Utils/CMakeLists.txt
mlir/test/EDSC/CMakeLists.txt
mlir/test/lib/Transforms/CMakeLists.txt
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/CMakeLists.txt b/mlir/lib/Analysis/CMakeLists.txt
index 262bc7e8a588..f9c0236e3d4e 100644
--- a/mlir/lib/Analysis/CMakeLists.txt
+++ b/mlir/lib/Analysis/CMakeLists.txt
@@ -24,7 +24,7 @@ add_mlir_library(MLIRAnalysis
target_link_libraries(MLIRAnalysis
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRCallInterfaces
MLIRControlFlowInterfaces
MLIRInferTypeOpInterface
@@ -44,7 +44,7 @@ add_mlir_library(MLIRLoopAnalysis
target_link_libraries(MLIRLoopAnalysis
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRCallInterfaces
MLIRControlFlowInterfaces
MLIRInferTypeOpInterface
diff --git a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
index 821a1deb0a15..9324f7b21c80 100644
--- a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
+++ b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
@@ -10,7 +10,7 @@ add_mlir_conversion_library(MLIRAffineToStandard
target_link_libraries(
MLIRAffineToStandard
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRLoopOps
MLIRPass
MLIRStandardOps
diff --git a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
index 2c62755eebc8..5b31429a0d0c 100644
--- a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
+++ b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
@@ -10,7 +10,7 @@ add_mlir_conversion_library(MLIRLoopsToGPU
)
target_link_libraries(MLIRLoopsToGPU
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRAffineToStandard
MLIRGPU
MLIRIR
diff --git a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
index 71aae34e4c0c..41414fc9bea7 100644
--- a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
@@ -6,6 +6,7 @@ add_mlir_conversion_library(MLIRVectorToLoops
)
set(LIBS
MLIREDSC
+ MLIRAffineEDSC
MLIRLLVMIR
MLIRTransforms
LLVMCore
diff --git a/mlir/lib/Dialect/Affine/CMakeLists.txt b/mlir/lib/Dialect/Affine/CMakeLists.txt
index 95cf0a44f21b..018cb0ba94a5 100644
--- a/mlir/lib/Dialect/Affine/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/CMakeLists.txt
@@ -1,22 +1,4 @@
-add_mlir_dialect_library(MLIRAffine
- IR/AffineOps.cpp
- IR/AffineValueMap.cpp
- EDSC/Builders.cpp
-
- ADDITIONAL_HEADER_DIRS
- ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Affine
-
- DEPENDS
- MLIRAffineOpsIncGen
- )
-target_link_libraries(MLIRAffine
- PUBLIC
- MLIREDSC
- MLIRIR
- MLIRLoopLikeInterface
- MLIRSideEffects
- MLIRStandardOps
- )
-
+add_subdirectory(IR)
+add_subdirectory(EDSC)
add_subdirectory(Transforms)
add_subdirectory(Utils)
diff --git a/mlir/lib/Dialect/Affine/EDSC/CMakeLists.txt b/mlir/lib/Dialect/Affine/EDSC/CMakeLists.txt
index 751bfd351bc6..a07905b71fbc 100644
--- a/mlir/lib/Dialect/Affine/EDSC/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/EDSC/CMakeLists.txt
@@ -1,5 +1,5 @@
-add_mlir_dialect_library(MLIRAffine
- EDSC/Builders.cpp
+add_mlir_dialect_library(MLIRAffineEDSC
+ Builders.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Affine
@@ -7,8 +7,9 @@ add_mlir_dialect_library(MLIRAffine
DEPENDS
MLIRAffineOpsIncGen
)
-target_link_libraries(MLIRAffine
+target_link_libraries(MLIRAffineEDSC
PUBLIC
+ MLIRAffineOps
MLIREDSC
MLIRIR
MLIRLoopLikeInterface
diff --git a/mlir/lib/Dialect/Affine/IR/CMakeLists.txt b/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
index 91dcceaf3912..8d186ae03b54 100644
--- a/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/IR/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_mlir_dialect_library(MLIRAffine
+add_mlir_dialect_library(MLIRAffineOps
AffineOps.cpp
AffineValueMap.cpp
@@ -8,7 +8,7 @@ add_mlir_dialect_library(MLIRAffine
DEPENDS
MLIRAffineOpsIncGen
)
-target_link_libraries(MLIRAffine
+target_link_libraries(MLIRAffineOps
PUBLIC
MLIREDSC
MLIRIR
diff --git a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
index 833736965776..bcad44d72497 100644
--- a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
@@ -17,7 +17,7 @@ add_mlir_dialect_library(MLIRAffineTransforms
)
target_link_libraries(MLIRAffineTransforms
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIREDSC
MLIRIR
MLIRPass
diff --git a/mlir/lib/Dialect/Affine/Utils/CMakeLists.txt b/mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
index ac9dae972488..ed3b5b8b1723 100644
--- a/mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Utils/CMakeLists.txt
@@ -7,6 +7,6 @@ add_mlir_dialect_library(MLIRAffineUtils
)
target_link_libraries(MLIRAffineUtils
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRTransformUtils
)
diff --git a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
index bc9e244d4ad5..8ec3c6dd7d22 100644
--- a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
@@ -12,7 +12,8 @@ target_link_libraries(MLIRLinalgEDSC
PUBLIC
MLIREDSC
MLIRIR
- MLIRAffine
+ MLIRAffineOps
+ MLIRAffineEDSC
MLIRLinalgOps
MLIRLoopOps
MLIRStandardOps
diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index 93f7142ce2df..c8e74ea30e8d 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -15,7 +15,7 @@ add_mlir_dialect_library(MLIRLinalgTransforms
)
target_link_libraries(MLIRLinalgTransforms
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRAnalysis
MLIREDSC
MLIRIR
diff --git a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
index f9ad613f2a17..681a47d31271 100644
--- a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
@@ -9,7 +9,7 @@ add_mlir_dialect_library(MLIRLinalgUtils
target_link_libraries(MLIRLinalgUtils
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIREDSC
MLIRIR
MLIRLinalgOps
diff --git a/mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt b/mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
index e3ec12b4b21d..13a6aa6f288a 100644
--- a/mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
@@ -11,7 +11,7 @@ add_mlir_dialect_library(MLIRLoopOpsTransforms
)
target_link_libraries(MLIRLoopOpsTransforms
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRIR
MLIRPass
MLIRLoopOps
diff --git a/mlir/lib/Dialect/Vector/CMakeLists.txt b/mlir/lib/Dialect/Vector/CMakeLists.txt
index e5e1251768cd..3e1d8de0d3ba 100644
--- a/mlir/lib/Dialect/Vector/CMakeLists.txt
+++ b/mlir/lib/Dialect/Vector/CMakeLists.txt
@@ -16,7 +16,7 @@ target_link_libraries(MLIRVector
MLIREDSC
MLIRIR
MLIRStandardOps
- MLIRAffine
+ MLIRAffineOps
MLIRLoopOps
MLIRLoopAnalysis
MLIRSideEffects
diff --git a/mlir/lib/Transforms/CMakeLists.txt b/mlir/lib/Transforms/CMakeLists.txt
index 49704229ad14..4f562ff90663 100644
--- a/mlir/lib/Transforms/CMakeLists.txt
+++ b/mlir/lib/Transforms/CMakeLists.txt
@@ -28,7 +28,7 @@ add_mlir_library(MLIRTransforms
target_link_libraries(MLIRTransforms
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRAnalysis
MLIRLoopLikeInterface
MLIRLoopOps
diff --git a/mlir/lib/Transforms/Utils/CMakeLists.txt b/mlir/lib/Transforms/Utils/CMakeLists.txt
index e28a97c18231..1e0442179bf4 100644
--- a/mlir/lib/Transforms/Utils/CMakeLists.txt
+++ b/mlir/lib/Transforms/Utils/CMakeLists.txt
@@ -16,7 +16,7 @@ add_mlir_library(MLIRTransformUtils
target_link_libraries(MLIRTransformUtils
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRAnalysis
MLIRLoopAnalysis
MLIRLoopOps
diff --git a/mlir/test/EDSC/CMakeLists.txt b/mlir/test/EDSC/CMakeLists.txt
index 6592f8cccd1d..d8e3be8f2079 100644
--- a/mlir/test/EDSC/CMakeLists.txt
+++ b/mlir/test/EDSC/CMakeLists.txt
@@ -6,7 +6,8 @@ llvm_update_compile_flags(mlir-edsc-builder-api-test)
target_link_libraries(mlir-edsc-builder-api-test
PRIVATE
- MLIRAffine
+ MLIRAffineOps
+ MLIRAffineEDSC
MLIREDSC
MLIRIR
MLIRLinalgEDSC
diff --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt
index 23107f223b9c..0417bee750ff 100644
--- a/mlir/test/lib/Transforms/CMakeLists.txt
+++ b/mlir/test/lib/Transforms/CMakeLists.txt
@@ -37,7 +37,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms)
target_link_libraries(MLIRTestTransforms
PUBLIC
- MLIRAffine
+ MLIRAffineOps
MLIRAnalysis
MLIREDSC
MLIRGPU
More information about the Mlir-commits
mailing list