This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] minor cleanup of Merger
ClosedPublic

Authored by aartbik on Jul 15 2021, 4:17 PM.

Details

Summary

Removed inconsistent name prefixes, added consistency checks
on debug strings, added more assertions to verify assumptions
that may be lifted in the future.

Diff Detail

Event Timeline

aartbik created this revision.Jul 15 2021, 4:17 PM
aartbik requested review of this revision.Jul 15 2021, 4:17 PM

Looks good, though still worried about bugs arising from kOpSymbols! See comment

mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
237–239

When we add a new op after ShlI, will we need to remember to update this line of code?

aartbik marked an inline comment as done.Jul 16 2021, 8:24 AM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
237–239

Yeah, you convinced me, I was trying to save vertical space in this debug code, but to what end in the end ;-). Switching back to switch!

aartbik updated this revision to Diff 359350.Jul 16 2021, 9:13 AM
aartbik marked an inline comment as done.

switching back to switching!

gussmith23 accepted this revision.Jul 16 2021, 10:19 AM
This revision is now accepted and ready to land.Jul 16 2021, 10:19 AM
This revision was automatically updated to reflect the committed changes.