[mlir][sparse] introduce vectorization pass for sparse loops
authorAart Bik <ajcbik@google.com>
Fri, 18 Nov 2022 20:18:00 +0000 (12:18 -0800)
committerAart Bik <ajcbik@google.com>
Tue, 22 Nov 2022 00:12:12 +0000 (16:12 -0800)
commit99b3849d89cfdbc60ce4e18fc9c70dfd377bd93b
treeaa84d2b5c41a2f58c9ddccb9f1eebf713d791e16
parent9df8ba631d4612eb8f930c9fe7c6cf39e5deb3af
[mlir][sparse] introduce vectorization pass for sparse loops

This brings back previous SIMD functionality, but in a separate pass.
The idea is to improve this new pass incrementally, going beyond for-loops
to while-loops for co-iteration as welll (masking), while introducing new
abstractions to make the lowering more progressive. The separation of
sparsification and vectorization is a very good first step on this journey.

Also brings back ArmSVE support

Still to be fine-tuned:
  + use of "index" in SIMD loop (viz. a[i] = i)
  + check that all ops really have SIMD support
  + check all forms of reductions
  + chain reduction SIMD values

Reviewed By: dcaballe

Differential Revision: https://reviews.llvm.org/D138236
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp [new file with mode: 0644]
mlir/test/Dialect/SparseTensor/sparse_vector.mlir [changed mode: 0644->0755]
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel