[Mlir-commits] [llvm] [mlir] CMake: Remove unnecessary dependencies on LLVM/MLIR (PR #110362)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Sep 28 17:38:12 PDT 2024
https://github.com/Adnios updated https://github.com/llvm/llvm-project/pull/110362
>From 56fa4f3682d4bfb4191958805ecd77d49e653b7b Mon Sep 17 00:00:00 2001
From: barretw <barretw at nvidia.com>
Date: Sat, 28 Sep 2024 06:50:18 -0700
Subject: [PATCH 1/3] remove unneeded libs
---
llvm/lib/MC/CMakeLists.txt | 1 -
llvm/lib/ProfileData/CMakeLists.txt | 1 -
mlir/lib/Conversion/ConvertToLLVM/CMakeLists.txt | 1 -
mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt | 2 --
mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt | 1 -
mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt | 2 --
mlir/lib/Dialect/Func/Transforms/CMakeLists.txt | 2 --
mlir/lib/Dialect/GPU/CMakeLists.txt | 2 --
mlir/lib/Dialect/Linalg/IR/CMakeLists.txt | 2 --
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt | 9 ---------
mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt | 3 ---
mlir/lib/Dialect/Mesh/Transforms/CMakeLists.txt | 2 --
mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt | 5 -----
mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt | 4 ----
mlir/lib/Dialect/Tosa/CMakeLists.txt | 3 ---
mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt | 2 --
mlir/lib/Target/LLVM/CMakeLists.txt | 1 -
mlir/lib/Target/LLVMIR/CMakeLists.txt | 2 --
mlir/lib/Target/SPIRV/CMakeLists.txt | 4 ----
mlir/lib/Target/SPIRV/Serialization/CMakeLists.txt | 3 ---
mlir/lib/Transforms/CMakeLists.txt | 1 -
21 files changed, 53 deletions(-)
diff --git a/llvm/lib/MC/CMakeLists.txt b/llvm/lib/MC/CMakeLists.txt
index a089d2bff94f42..e1d19196c8766a 100644
--- a/llvm/lib/MC/CMakeLists.txt
+++ b/llvm/lib/MC/CMakeLists.txt
@@ -79,7 +79,6 @@ add_llvm_component_library(LLVMMC
Support
TargetParser
BinaryFormat
- DebugInfoCodeView
DEPENDS
intrinsics_gen
diff --git a/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt
index 4fa1b76f0a062c..6568a735a4b2f9 100644
--- a/llvm/lib/ProfileData/CMakeLists.txt
+++ b/llvm/lib/ProfileData/CMakeLists.txt
@@ -27,7 +27,6 @@ add_llvm_component_library(LLVMProfileData
Object
Support
Demangle
- Symbolize
DebugInfoDWARF
TargetParser
)
diff --git a/mlir/lib/Conversion/ConvertToLLVM/CMakeLists.txt b/mlir/lib/Conversion/ConvertToLLVM/CMakeLists.txt
index df7e3f995303c9..de3d850d520c0f 100644
--- a/mlir/lib/Conversion/ConvertToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/ConvertToLLVM/CMakeLists.txt
@@ -20,7 +20,6 @@ add_mlir_conversion_library(MLIRConvertToLLVMPass
MLIRConversionPassIncGen
LINK_LIBS PUBLIC
- MLIRConvertToLLVMInterface
MLIRIR
MLIRLLVMCommonConversion
MLIRLLVMDialect
diff --git a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
index 35576732c82cfb..27b5bf7eaa89f2 100644
--- a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
@@ -34,8 +34,6 @@ add_mlir_conversion_library(MLIRVectorToLLVMPass
LINK_LIBS PUBLIC
MLIRVectorToLLVM
- MLIRArmNeonDialect
- MLIRArmSMEDialect
MLIRArmSVEDialect
MLIRArmSVETransforms
MLIRAMXDialect
diff --git a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
index 772f15335d907f..607d4557e2f6a2 100644
--- a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
@@ -32,7 +32,6 @@ add_mlir_dialect_library(MLIRAffineTransforms
MLIRIR
MLIRMemRefDialect
MLIRPass
- MLIRSCFUtils
MLIRSideEffectInterfaces
MLIRTensorDialect
MLIRTransformUtils
diff --git a/mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt
index 6b8bde8dc2aaf3..93a004d31916f5 100644
--- a/mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt
@@ -20,8 +20,6 @@ add_mlir_dialect_library(MLIRArithTransforms
LINK_LIBS PUBLIC
MLIRAnalysis
MLIRArithDialect
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRFuncDialect
MLIRFuncTransforms
MLIRInferIntRangeInterface
diff --git a/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
index 172019907c3a8a..6ba7aaaae903f4 100644
--- a/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
@@ -12,8 +12,6 @@ add_mlir_dialect_library(MLIRFuncTransforms
MLIRFuncTransformsIncGen
LINK_LIBS PUBLIC
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRFuncDialect
MLIRIR
MLIRMemRefDialect
diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt
index a59645480aba21..a8a961282993a2 100644
--- a/mlir/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -67,9 +67,7 @@ add_mlir_dialect_library(MLIRGPUTransforms
MLIRPass
MLIRSCFDialect
MLIRSideEffectInterfaces
- MLIRSPIRVTarget
MLIRSupport
- MLIRROCDLTarget
MLIRTransformUtils
MLIRVectorDialect
)
diff --git a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
index c187563b8f0c4e..f1fcb22fb8d548 100644
--- a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
@@ -25,14 +25,12 @@ add_mlir_dialect_library(MLIRLinalgDialect
MLIRInferTypeOpInterface
MLIRIR
MLIRParser
- MLIRShardingInterface
MLIRSideEffectInterfaces
MLIRSparseTensorDialect
MLIRSCFDialect
MLIRMathDialect
MLIRMemRefDialect
MLIRTensorDialect
- MLIRTilingInterface
MLIRValueBoundsOpInterface
MLIRViewLikeInterface
)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index 47af392def94ac..b4968b9d66e27e 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -48,14 +48,11 @@ add_mlir_dialect_library(MLIRLinalgTransforms
LINK_LIBS PUBLIC
MLIRAffineDialect
- MLIRAffineTransforms
MLIRAffineUtils
MLIRAnalysis
MLIRArithDialect
MLIRArithTransforms
MLIRArithUtils
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRComplexDialect
MLIRDestinationStyleOpInterface
MLIRDialectUtils
@@ -66,20 +63,14 @@ add_mlir_dialect_library(MLIRLinalgTransforms
MLIRIR
MLIRMemRefDialect
MLIRMemRefTransforms
- MLIRMeshDialect
- MLIRMeshTransforms
MLIRLinalgDialect
MLIRLinalgUtils
MLIRSCFDialect
MLIRSCFTransforms
- MLIRSCFUtils
MLIRPass
- MLIRShardingInterface
MLIRSubsetOpInterface
MLIRSparseTensorDialect
MLIRTensorDialect
- MLIRTensorTilingInterfaceImpl
- MLIRTensorTransforms
MLIRTransforms
MLIRTransformUtils
MLIRValueBoundsOpInterface
diff --git a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
index 4c7f42745ce8bb..d408c07df93860 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
@@ -23,12 +23,9 @@ add_mlir_dialect_library(MLIRMemRefTransforms
LINK_LIBS PUBLIC
MLIRAffineDialect
- MLIRAffineTransforms
MLIRAffineUtils
MLIRArithDialect
MLIRArithTransforms
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRDialectUtils
MLIRFuncDialect
MLIRGPUDialect
diff --git a/mlir/lib/Dialect/Mesh/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Mesh/Transforms/CMakeLists.txt
index 212ea6d6948b27..d1d6261fb448d4 100644
--- a/mlir/lib/Dialect/Mesh/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Mesh/Transforms/CMakeLists.txt
@@ -23,8 +23,6 @@ add_mlir_dialect_library(MLIRMeshTransforms
MLIRIR
MLIRMeshDialect
MLIRPass
- MLIRShardingInterface
MLIRSupport
MLIRTensorDialect
- MLIRTosaShardingInterfaceImpl
)
diff --git a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
index 8c73515c608f58..f79eaf3dfeb70a 100644
--- a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
@@ -29,20 +29,15 @@ add_mlir_dialect_library(MLIRSCFTransforms
MLIRAffineDialect
MLIRAffineAnalysis
MLIRArithDialect
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRDestinationStyleOpInterface
MLIRDialectUtils
MLIRIR
MLIRMemRefDialect
MLIRPass
MLIRSCFDialect
- MLIRSCFUtils
MLIRSideEffectInterfaces
MLIRSupport
MLIRTensorDialect
- MLIRTensorTransforms
- MLIRTilingInterface
MLIRTransforms
MLIRTransformUtils
)
diff --git a/mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
index ce32dea09bb0b5..a6152ecc23b532 100644
--- a/mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
@@ -20,12 +20,9 @@ add_mlir_dialect_library(MLIRTensorTransforms
LINK_LIBS PUBLIC
MLIRAffineDialect
- MLIRAffineTransforms
MLIRAffineUtils
MLIRArithDialect
MLIRArithUtils
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRDialectUtils
MLIRIR
MLIRLinalgDialect
@@ -35,7 +32,6 @@ add_mlir_dialect_library(MLIRTensorTransforms
MLIRSubsetOpInterface
MLIRTensorDialect
MLIRTensorUtils
- MLIRTilingInterface
MLIRTransforms
MLIRVectorDialect
MLIRVectorUtils
diff --git a/mlir/lib/Dialect/Tosa/CMakeLists.txt b/mlir/lib/Dialect/Tosa/CMakeLists.txt
index 1911405c63cd58..4b72309a70c064 100644
--- a/mlir/lib/Dialect/Tosa/CMakeLists.txt
+++ b/mlir/lib/Dialect/Tosa/CMakeLists.txt
@@ -19,7 +19,6 @@ add_mlir_dialect_library(MLIRTosaDialect
MLIRDialect
MLIRCallInterfaces
MLIRControlFlowInterfaces
- MLIRQuantDialect
MLIRQuantUtils
MLIRSideEffectInterfaces
MLIRTensorDialect
@@ -35,10 +34,8 @@ add_mlir_dialect_library(MLIRTosaShardingInterfaceImpl
LINK_LIBS PUBLIC
MLIRIR
- MLIRMeshDialect
MLIRShardingInterface
MLIRSupport
- MLIRTosaDialect
)
add_subdirectory(Transforms)
diff --git a/mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt
index 2639a67e1c8b31..b7e8724c3c2582 100644
--- a/mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt
@@ -35,8 +35,6 @@ add_mlir_dialect_library(MLIRVectorTransforms
MLIRAffineAnalysis
MLIRAffineUtils
MLIRArithDialect
- MLIRBufferizationDialect
- MLIRBufferizationTransforms
MLIRDialectUtils
MLIRGPUDialect
MLIRIR
diff --git a/mlir/lib/Target/LLVM/CMakeLists.txt b/mlir/lib/Target/LLVM/CMakeLists.txt
index bc14c568e46be2..7e597b0f9bf94a 100644
--- a/mlir/lib/Target/LLVM/CMakeLists.txt
+++ b/mlir/lib/Target/LLVM/CMakeLists.txt
@@ -125,7 +125,6 @@ add_mlir_dialect_library(MLIRROCDLTarget
MLIRSupport
MLIRGPUDialect
MLIRTargetLLVM
- MLIRROCDLToLLVMIRTranslation
)
if(MLIR_ENABLE_ROCM_CONVERSIONS)
diff --git a/mlir/lib/Target/LLVMIR/CMakeLists.txt b/mlir/lib/Target/LLVMIR/CMakeLists.txt
index 93032c3ce10387..4cc83edb0e9616 100644
--- a/mlir/lib/Target/LLVMIR/CMakeLists.txt
+++ b/mlir/lib/Target/LLVMIR/CMakeLists.txt
@@ -38,7 +38,6 @@ add_mlir_translation_library(MLIRTargetLLVMIRExport
MLIRDLTIDialect
MLIRLLVMDialect
MLIRLLVMIRTransforms
- MLIRTranslateLib
MLIRTransformUtils
)
@@ -79,7 +78,6 @@ add_mlir_translation_library(MLIRTargetLLVMIRImport
LINK_LIBS PUBLIC
MLIRDLTIDialect
MLIRLLVMDialect
- MLIRTranslateLib
)
add_mlir_translation_library(MLIRFromLLVMIRTranslationRegistration
diff --git a/mlir/lib/Target/SPIRV/CMakeLists.txt b/mlir/lib/Target/SPIRV/CMakeLists.txt
index 22d6d195a249eb..2926320ed286b8 100644
--- a/mlir/lib/Target/SPIRV/CMakeLists.txt
+++ b/mlir/lib/Target/SPIRV/CMakeLists.txt
@@ -12,7 +12,6 @@ add_mlir_translation_library(MLIRSPIRVBinaryUtils
LINK_LIBS PUBLIC
MLIRIR
- MLIRSPIRVDialect
MLIRSupport
)
@@ -21,11 +20,9 @@ add_mlir_translation_library(MLIRSPIRVTranslateRegistration
LINK_LIBS PUBLIC
MLIRIR
- MLIRSPIRVDialect
MLIRSPIRVSerialization
MLIRSPIRVDeserialization
MLIRSupport
- MLIRTranslateLib
)
add_mlir_dialect_library(MLIRSPIRVTarget
@@ -34,7 +31,6 @@ add_mlir_dialect_library(MLIRSPIRVTarget
LINK_LIBS PUBLIC
MLIRIR
MLIRGPUDialect
- MLIRSPIRVDialect
MLIRSPIRVSerialization
MLIRSupport
)
diff --git a/mlir/lib/Target/SPIRV/Serialization/CMakeLists.txt b/mlir/lib/Target/SPIRV/Serialization/CMakeLists.txt
index 71580d8fcb978e..036b97af4f9e7c 100644
--- a/mlir/lib/Target/SPIRV/Serialization/CMakeLists.txt
+++ b/mlir/lib/Target/SPIRV/Serialization/CMakeLists.txt
@@ -8,10 +8,7 @@ add_mlir_translation_library(MLIRSPIRVSerialization
LINK_LIBS PUBLIC
MLIRIR
- MLIRSPIRVDialect
MLIRSPIRVBinaryUtils
MLIRSupport
MLIRTranslateLib
)
-
-
diff --git a/mlir/lib/Transforms/CMakeLists.txt b/mlir/lib/Transforms/CMakeLists.txt
index 90c0298fb5e46a..058039e47313e2 100644
--- a/mlir/lib/Transforms/CMakeLists.txt
+++ b/mlir/lib/Transforms/CMakeLists.txt
@@ -29,7 +29,6 @@ add_mlir_library(MLIRTransforms
LINK_LIBS PUBLIC
MLIRAnalysis
- MLIRCopyOpInterface
MLIRFunctionInterfaces
MLIRLoopLikeInterface
MLIRMemorySlotInterfaces
>From b4877fd4e988e4776373ba14cd59340d720951a6 Mon Sep 17 00:00:00 2001
From: barretw <barretw at nvidia.com>
Date: Sat, 28 Sep 2024 08:58:59 -0700
Subject: [PATCH 2/3] fix CI error.
---
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt | 1 +
mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt | 2 +-
mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt | 3 ++-
mlir/unittests/Target/LLVM/CMakeLists.txt | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index b4968b9d66e27e..06bac0d470d42e 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -63,6 +63,7 @@ add_mlir_dialect_library(MLIRLinalgTransforms
MLIRIR
MLIRMemRefDialect
MLIRMemRefTransforms
+ MLIRMeshTransforms
MLIRLinalgDialect
MLIRLinalgUtils
MLIRSCFDialect
diff --git a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
index d408c07df93860..ecab97bc2b8e75 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
@@ -22,7 +22,7 @@ add_mlir_dialect_library(MLIRMemRefTransforms
MLIRMemRefPassIncGen
LINK_LIBS PUBLIC
- MLIRAffineDialect
+ MLIRAffineTransforms
MLIRAffineUtils
MLIRArithDialect
MLIRArithTransforms
diff --git a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
index f79eaf3dfeb70a..fb877b50914920 100644
--- a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
@@ -35,9 +35,10 @@ add_mlir_dialect_library(MLIRSCFTransforms
MLIRMemRefDialect
MLIRPass
MLIRSCFDialect
+ MLIRSCFUtils
MLIRSideEffectInterfaces
MLIRSupport
- MLIRTensorDialect
+ MLIRTensorTransforms
MLIRTransforms
MLIRTransformUtils
)
diff --git a/mlir/unittests/Target/LLVM/CMakeLists.txt b/mlir/unittests/Target/LLVM/CMakeLists.txt
index 6d612548a94c0f..5d50e98f1a2a45 100644
--- a/mlir/unittests/Target/LLVM/CMakeLists.txt
+++ b/mlir/unittests/Target/LLVM/CMakeLists.txt
@@ -19,6 +19,7 @@ target_link_libraries(MLIRTargetLLVMTests
MLIRNVVMToLLVMIRTranslation
MLIRROCDLToLLVMIRTranslation
MLIRGPUToLLVMIRTranslation
+ MLIRParser
${llvm_libs}
)
>From a602c0d7b0c828d6c0c7997c6703592c77f85946 Mon Sep 17 00:00:00 2001
From: barretw <barretw at nvidia.com>
Date: Sat, 28 Sep 2024 17:37:12 -0700
Subject: [PATCH 3/3] fix windows CI error symbolize is needed by ProlfileDate.
It's wired that local linux compilation doesn't report error.
---
llvm/lib/ProfileData/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt
index 6568a735a4b2f9..4fa1b76f0a062c 100644
--- a/llvm/lib/ProfileData/CMakeLists.txt
+++ b/llvm/lib/ProfileData/CMakeLists.txt
@@ -27,6 +27,7 @@ add_llvm_component_library(LLVMProfileData
Object
Support
Demangle
+ Symbolize
DebugInfoDWARF
TargetParser
)
More information about the Mlir-commits
mailing list