[mlir][Vector] Introduce UnrollVectorOptions to control vector unrolling.
authorMaheshRavishankar <ravishankarm@google.com>
Fri, 23 Oct 2020 19:56:12 +0000 (12:56 -0700)
committerMaheshRavishankar <ravishankarm@google.com>
Fri, 23 Oct 2020 20:52:26 +0000 (13:52 -0700)
commitb6204b995eaa2ec771f947a2109bd2ef338e688c
tree316772f0cfa3d77ad14af1d4a8d6263b3a4fe165
parentb22e2e4c6e420b78a8a4c307f0cf002f51af9590
[mlir][Vector] Introduce UnrollVectorOptions to control vector unrolling.

The current pattern for vector unrolling takes the native shape to
unroll to at pattern instantiation time, but the native shape might
defer based on the types of the operand. Introduce a
UnrollVectorOptions struct which allows for using a function that will
return the native shape based on the operation. Move other options of
unrolling like `filterConstraints` into this struct.

Differential Revision: https://reviews.llvm.org/D89744
mlir/include/mlir/Dialect/Vector/VectorTransforms.h
mlir/test/Dialect/Vector/vector-unroll-options.mlir [new file with mode: 0644]
mlir/test/lib/Transforms/TestVectorTransforms.cpp