Page MenuHomePhabricator

[mlir:PDLL] Don't require users to provide operands/results when all are variadic
ClosedPublic

Authored by rriddle on Sep 12 2022, 11:45 AM.

Details

Summary

When all operands or results are variadic, zero values is a perfectly valid behavior
to expect, and we shouldn't force the user to provide values in this case. For example,
when creating a call or a return operation we often don't want/need to provide return
values.

Diff Detail

Event Timeline

rriddle created this revision.Sep 12 2022, 11:45 AM
rriddle requested review of this revision.Sep 12 2022, 11:45 AM
jpienaar accepted this revision.Oct 6 2022, 7:23 PM
jpienaar added inline comments.
mlir/test/lib/Transforms/TestDialectConversion.pdll
13–14

This is more concise, and especially can see how this is better with multiple optional and not too magical. The previous form is indeed closer to ODS.

This revision is now accepted and ready to land.Oct 6 2022, 7:23 PM
rriddle updated this revision to Diff 473850.Nov 7 2022, 6:25 PM