This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform] Add PrintOp to transform dialect
ClosedPublic

Authored by springerm on Nov 1 2022, 3:38 AM.

Details

Summary

This op dumps the associated payload IR to stderr. It has proven useful for printf-style debugging.

Diff Detail

Event Timeline

springerm created this revision.Nov 1 2022, 3:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2022, 3:38 AM
springerm requested review of this revision.Nov 1 2022, 3:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2022, 3:38 AM
ftynse added inline comments.Nov 2 2022, 1:57 AM
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
824

You can do ->print(llvm::errs()) and avoid this comment.

839–842

We have more readable helpers onlyReadsPayload, modifiesPayload, ...

ftynse accepted this revision.Nov 2 2022, 1:57 AM
This revision is now accepted and ready to land.Nov 2 2022, 1:57 AM
springerm updated this revision to Diff 472541.Nov 2 2022, 2:10 AM

address comments

springerm marked 2 inline comments as done.Nov 2 2022, 2:11 AM
This revision was landed with ongoing or failed builds.Nov 2 2022, 2:16 AM
This revision was automatically updated to reflect the committed changes.