This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] completed codegen environment privatization
ClosedPublic

Authored by aartbik on Dec 21 2022, 5:18 PM.

Details

Summary

All members are now private and access is through delegate
or convenience methods only (except the loop emitter, which
is still under refactoring).

Diff Detail

Event Timeline

aartbik created this revision.Dec 21 2022, 5:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 5:18 PM
aartbik requested review of this revision.Dec 21 2022, 5:18 PM
Peiming added inline comments.Dec 22 2022, 9:54 AM
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
614–620

Maybe we can group all this into Env as well?

we can have a fancy RAII like object

{
   auto guard = env.getReductionGuard(reduc)
   callback();
}
Peiming accepted this revision.Dec 22 2022, 9:59 AM
This revision is now accepted and ready to land.Dec 22 2022, 9:59 AM
aartbik marked an inline comment as done.Dec 22 2022, 10:33 AM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
614–620

Nice suggestion. I will move a few more methods to env after this larger diff revision....

This revision was automatically updated to reflect the committed changes.
aartbik marked an inline comment as done.