This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] refactor loop sequence codegen
ClosedPublic

Authored by aartbik on Oct 25 2021, 8:12 PM.

Details

Summary

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.

Diff Detail

Event Timeline

aartbik created this revision.Oct 25 2021, 8:12 PM
aartbik requested review of this revision.Oct 25 2021, 8:12 PM
aartbik updated this revision to Diff 382368.Oct 26 2021, 9:24 AM

dangling typo

bixia accepted this revision.Oct 26 2021, 12:01 PM

The added (start/end loop-seq/loop) functions do help make the code more readable.

mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
1313–1318

Nit: reorder this two lines so that the assignment to ldx is closer to where it is used.

This revision is now accepted and ready to land.Oct 26 2021, 12:01 PM
This revision was automatically updated to reflect the committed changes.