This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Print some message for op-printing verification
ClosedPublic

Authored by Chia-hungDuan on May 6 2022, 3:04 PM.

Details

Summary

Before dump, Insetad of switching to generic form silently after
verification failure. Print some debug logs to help identify why an op
may be printed in a different way.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.May 6 2022, 3:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 3:04 PM
Chia-hungDuan requested review of this revision.May 6 2022, 3:04 PM
Mogball added a subscriber: Mogball.May 6 2022, 3:16 PM
Mogball added inline comments.
mlir/lib/IR/AsmPrinter.cpp
1319–1320
1327–1328
1334–1336
Chia-hungDuan marked 2 inline comments as done.May 6 2022, 3:24 PM
Chia-hungDuan added inline comments.
mlir/lib/IR/AsmPrinter.cpp
1319–1320

I may prefer to mention this is run by printer, changed to
"verifying operation before printing: "

Address review comment

rriddle added inline comments.May 9 2022, 10:09 AM
mlir/lib/IR/AsmPrinter.cpp
52
1319–1320

Would likely be nice to just prefix the message with the debug type:

mlir-asm-printer: Verifying operation: ...
Chia-hungDuan marked an inline comment as done.

Address review comment

Chia-hungDuan marked an inline comment as done.May 10 2022, 2:52 PM
rriddle accepted this revision.May 10 2022, 3:38 PM

Nice!

This revision is now accepted and ready to land.May 10 2022, 3:38 PM