This is an archive of the discontinued LLVM Phabricator instance.

[mlir][scf] Add callback to annotate ops during pipelining
ClosedPublic

Authored by ThomasRaoux on Feb 15 2022, 10:20 AM.

Details

Summary

This allow user to register a callback that can annotate operations
during software pipelining. This allows user potential annotate op to
know what part of the pipeline they correspond to.

This is analogue to what is done in loop unrolling: https://reviews.llvm.org/D107789

Diff Detail

Event Timeline

ThomasRaoux created this revision.Feb 15 2022, 10:20 AM
ThomasRaoux requested review of this revision.Feb 15 2022, 10:20 AM
ThomasRaoux edited the summary of this revision. (Show Details)Feb 15 2022, 11:29 AM
antiagainst accepted this revision.Feb 15 2022, 11:54 AM

LGTM! Just a few nits.

mlir/include/mlir/Dialect/SCF/Transforms.h
130

I think for enum class we just need to use style like Prologue, Kernel, etc.? All caps are for enum and there is no need to have the prefix anymore given enum class would need namespace anyway.

137

Could you add documentation for the parameters to this function, esp. the last unsigned? Right now it's unclear what it means without looking at how it is used.

mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
143

Don't need default for enum classes. New cases will be checked by the compilers.

This revision is now accepted and ready to land.Feb 15 2022, 11:54 AM

Address review comments

ThomasRaoux marked 3 inline comments as done.Feb 15 2022, 12:27 PM
This revision was landed with ongoing or failed builds.Feb 15 2022, 12:48 PM
This revision was automatically updated to reflect the committed changes.