[mlir][vector] Remove vector.transfer_read/write to LLVM lowering
authorMatthias Springer <springerm@google.com>
Sat, 17 Jul 2021 05:01:48 +0000 (14:01 +0900)
committerMatthias Springer <springerm@google.com>
Sat, 17 Jul 2021 05:07:27 +0000 (14:07 +0900)
commitd1a9e9a7cbad4044ccc8e08d0217c23aca417714
treeb69dc8c00f5310844005cd6ab963d2e6ddf96ad7
parent4a3defa6298ae84f88bf0ad76b50a6264ab2f337
[mlir][vector] Remove vector.transfer_read/write to LLVM lowering

This simplifies the vector to LLVM lowering. Previously, both vector.load/store and vector.transfer_read/write lowered directly to LLVM. With this commit, there is a single path to LLVM vector load/store instructions and vector.transfer_read/write ops must first be lowered to vector.load/store ops.

* Remove vector.transfer_read/write to LLVM lowering.
* Allow non-unit memref strides on all but the most minor dimension for vector.load/store ops.
* Add maxTransferRank option to populateVectorTransferLoweringPatterns.
* vector.transfer_reads with changing element type can no longer be lowered to LLVM. (This functionality is needed only for SPIRV.)

Differential Revision: https://reviews.llvm.org/D106118
mlir/include/mlir/Dialect/Vector/VectorOps.h
mlir/include/mlir/Dialect/Vector/VectorOps.td
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
mlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp
mlir/lib/Dialect/Vector/VectorOps.cpp
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
mlir/test/Dialect/Vector/invalid.mlir
mlir/test/Dialect/Vector/vector-transfer-lowering.mlir
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp