This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Using x-macros in the function-suffix functions
ClosedPublic

Authored by wrengr on May 31 2022, 2:40 PM.

Details

Summary

By defining the {primary,overhead}TypeFunctionSuffix functions via the same x-macros used to generate the runtime library's functions themselves, this helps avoid bugs from typos or things getting out of sync.

Diff Detail

Event Timeline

wrengr created this revision.May 31 2022, 2:40 PM
wrengr requested review of this revision.May 31 2022, 2:40 PM
bixia accepted this revision.May 31 2022, 3:53 PM
bixia added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
92

This line should align with "case". Am I right?

130

Similar to the above.

This revision is now accepted and ready to land.May 31 2022, 3:53 PM
wrengr marked 2 inline comments as done.May 31 2022, 5:32 PM
wrengr added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
92

In my personal style, yes; but alas clang-format disagrees

130

ditto

This revision was automatically updated to reflect the committed changes.
wrengr marked 2 inline comments as done.