This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add a new `print-ir-after-failure` IR pass printing flag
ClosedPublic

Authored by rriddle on May 4 2021, 1:21 PM.

Details

Summary

This flag will print the IR after a pass only in the case where the pass failed. This can be useful to more easily view the invalid IR, without needing to print after every pass in the pipeline.

Diff Detail

Event Timeline

rriddle created this revision.May 4 2021, 1:21 PM
rriddle requested review of this revision.May 4 2021, 1:21 PM
mehdi_amini accepted this revision.May 4 2021, 5:00 PM
mehdi_amini added inline comments.
mlir/include/mlir/Pass/PassManager.h
246

I would re-document the "This option should *not* be used with the other print-ir-after flags above" here.

This revision is now accepted and ready to land.May 4 2021, 5:00 PM
jpienaar accepted this revision.May 7 2021, 6:27 PM
jpienaar added a subscriber: jpienaar.

Nice, LGTM with Mehdi's comments addressed.

mlir/lib/Pass/PassManagerOptions.cpp
54

I see this follows the style of the rest, but a more active formulation would read easier to me.

104–106

Update comment?

rriddle updated this revision to Diff 344492.May 11 2021, 11:14 AM
rriddle marked 2 inline comments as done.

Update