[sparse][mlir] simplify lattice optimization logic
authorAart Bik <ajcbik@google.com>
Sun, 21 Feb 2021 02:34:07 +0000 (18:34 -0800)
committerAart Bik <ajcbik@google.com>
Tue, 23 Feb 2021 00:52:06 +0000 (16:52 -0800)
commit0df59f234bf09dac203b98427f366be97288f636
tree1a67163a12894643a60d1aa0da1c59e785e7ce47
parent430817d0d53f53f3388dde130daa363f56353707
[sparse][mlir] simplify lattice optimization logic

Simplifies the way lattices are optimized with less, but more
powerful rules. This also fixes an inaccuracy where too many
lattices resulted (expecting a non-existing universal index).
Also puts no-side-effects on all proper getters and unifies
bufferization flags order in integration tests (for future,
more complex use cases).

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D97134
mlir/include/mlir/Dialect/Linalg/IR/LinalgSparseOps.td
mlir/integration_test/Sparse/CPU/sparse_sampled_matmul.mlir
mlir/integration_test/Sparse/CPU/sparse_sum.mlir
mlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
mlir/test/Dialect/Linalg/sparse_1d.mlir