[mlir][vector] Split populateVectorContractLoweringPatterns
authorLei Zhang <antiagainst@google.com>
Thu, 7 Oct 2021 13:33:51 +0000 (09:33 -0400)
committerLei Zhang <antiagainst@google.com>
Thu, 7 Oct 2021 13:39:26 +0000 (09:39 -0400)
commit3964c1db915b00fffb77764892b890a3075e181e
tree0e67a8bcd0ba027a23f34e1def820dd1e80d9410
parent2baf7ad6d27fc9c08dd6eb9f8581d7e1353d4ece
[mlir][vector] Split populateVectorContractLoweringPatterns

It was bundling quite a lot of patterns that convert high-D
vector ops into low-D elementary ops. It might not be good
for all of the patterns to happen for a particular downstream
user. For example, `ShapeCastOpRewritePattern` rewrites
`vector.shape_cast` into data movement extract/insert ops.

Instead, split the entry point into multiple ones so users
can pull in patterns on demand.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D111225
mlir/include/mlir/Dialect/Vector/VectorOps.h
mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/lib/Dialect/Linalg/TestConvVectorization.cpp
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp