This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Move a few routines to CodegenUtils.
ClosedPublic

Authored by bixia on Oct 11 2022, 9:35 AM.

Details

Summary

Move a few supporting routines for generating function calls to CodegenUtils so
that they can be used by the codegen path for sparse tensor file input and
output.

Diff Detail

Event Timeline

bixia created this revision.Oct 11 2022, 9:35 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Oct 11 2022, 9:35 AM
aartbik added inline comments.Oct 11 2022, 9:55 AM
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
334

These functions now appear in the

"Inlined constant generators."

section. Either move them up to

"Misc code generators and utilities."

section, or start a new section after L333

336

we may want to move typedefs, enums etc. to the top of the header file

350

is there a redundant space here?

bixia updated this revision to Diff 466899.Oct 11 2022, 1:23 PM
bixia marked 3 inline comments as done.

Moved enum definition to the beginning of the header file. Moved functions to misc codegen function section.

bixia added inline comments.Oct 11 2022, 1:41 PM
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
334

Moved to "Misc code generators and utilities".

336

Moved to the top of the header file.

350

Not sure, but ran fomatter.

aartbik accepted this revision.Oct 11 2022, 1:49 PM
This revision is now accepted and ready to land.Oct 11 2022, 1:49 PM
bixia updated this revision to Diff 466914.Oct 11 2022, 2:06 PM

Rebase.

This revision was automatically updated to reflect the committed changes.