Krzysztof Drewniak df852599f3 [mlir] Split up VectorToLLVM pass
Currently, the VectorToLLVM patterns are built into a library along
with the corresponding pass, which also pulls in all the
platform-specific vector dialects (like AMXDialect) to apply all the
vector to LLVM conversions.

This causes dependency bloat when writing libraries - for example the
GPU to LLVM passes, which use the vector to LLVM patterns, don't need
the X86Vector dialect to be present at all.

This commit partitions the library into VectorToLLVM and
VectorToLLVMPass, where the latter pulls in all the other vector
transformations.

Reviewed By: nicolasvasilache, mehdi_amini

Differential Revision: https://reviews.llvm.org/D158287
2023-09-13 16:09:56 +00:00

47 lines
899 B
CMake

add_mlir_conversion_library(MLIRVectorToLLVM
PARTIAL_SOURCES_INTENDED
ConvertVectorToLLVM.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLLVM
DEPENDS
MLIRConversionPassIncGen
intrinsics_gen
LINK_COMPONENTS
Core
LINK_LIBS PUBLIC
MLIRArithDialect
MLIRLLVMCommonConversion
MLIRLLVMDialect
MLIRMemRefDialect
MLIRTargetLLVMIRExport
MLIRTransforms
MLIRVectorDialect
MLIRVectorTransforms
)
add_mlir_conversion_library(MLIRVectorToLLVMPass
PARTIAL_SOURCES_INTENDED
ConvertVectorToLLVMPass.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLLVM
LINK_LIBS PUBLIC
MLIRVectorToLLVM
MLIRArmNeonDialect
MLIRArmSMEDialect
MLIRArmSMETransforms
MLIRArmSVEDialect
MLIRArmSVETransforms
MLIRVectorToArmSME
MLIRAMXDialect
MLIRAMXTransforms
MLIRX86VectorDialect
MLIRX86VectorTransforms
)