[mlir][sparse] refactor loop sequence codegen
authorAart Bik <ajcbik@google.com>
Tue, 26 Oct 2021 03:10:42 +0000 (20:10 -0700)
committerAart Bik <ajcbik@google.com>
Tue, 26 Oct 2021 20:42:21 +0000 (13:42 -0700)
commitc8d5dcb035284e22ee07ee5b77dec2c5b18e1fa1
tree456887c414f29412f1797bb5f25346e0ae6ead23
parente42e5785ad0c38465d45fe8d292c8e3cf2e260ab
[mlir][sparse] refactor loop sequence codegen

This refactoring adds a few "event" functions (start/end loop-seq/loop) for
readability of the core function of codegen. This also prepares sparse tensor
output codegen, where these "event" functions will provide convenient
placeholders to start or stop insertion bookkeeping.

This revision also includes a few various minor changes that kept on
pending in my local workspace.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D112506
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp