Page MenuHomePhabricator

[mlir][ir] Custom ops' parse/print fall back to dialect hooks
ClosedPublic

Authored by Mogball on Dec 9 2021, 4:36 PM.

Details

Summary

Custom ops that have no parser or printer should fall back to the dialect's parser and/or printer hooks. This avoids the need to define parsers and printers that simply dispatch to the dialect hook.

Diff Detail

Event Timeline

Mogball created this revision.Dec 9 2021, 4:36 PM
Mogball requested review of this revision.Dec 9 2021, 4:36 PM
mehdi_amini accepted this revision.Dec 9 2021, 4:44 PM
mehdi_amini added inline comments.
mlir/include/mlir/IR/OpDefinition.h
176–180
mlir/lib/IR/Operation.cpp
593
This revision is now accepted and ready to land.Dec 9 2021, 4:44 PM
rriddle accepted this revision.Dec 9 2021, 4:46 PM

Nice.

Mogball updated this revision to Diff 393334.Dec 9 2021, 4:48 PM

Use op name printing with defaultDialect, and also review comments.

Mogball marked 2 inline comments as done.Dec 9 2021, 4:48 PM