This is an archive of the discontinued LLVM Phabricator instance.

[mlir:PDLL] Fix handling of unspecified operands/results on operation expressions
ClosedPublic

Authored by rriddle on Feb 14 2022, 2:07 PM.

Details

Summary

If the operand list or result list of an operation expression is not specified, we interpret
this as meaning that the operands/results are "unconstraint" (i.e. "could be anything").
We currently don't properly handle differentiating this case from the case of
"no operands/results". This commit adds the insertion of implicit value/type range
variables when these lists are unspecified. This allows for adding proper support
for when zero operands or results are expected.

Diff Detail

Event Timeline

rriddle created this revision.Feb 14 2022, 2:07 PM
rriddle requested review of this revision.Feb 14 2022, 2:07 PM
nicolasvasilache accepted this revision.Feb 15 2022, 1:13 AM
This revision is now accepted and ready to land.Feb 15 2022, 1:13 AM
jpienaar accepted this revision.Feb 15 2022, 9:40 AM
jpienaar added inline comments.
mlir/test/mlir-pdll/Parser/expr.pdll
99–113

Could you add comments describing the tests?

rriddle updated this revision to Diff 409071.Feb 15 2022, 3:20 PM
rriddle edited the summary of this revision. (Show Details)
rriddle updated this revision to Diff 409415.Feb 16 2022, 2:42 PM
rriddle marked an inline comment as done.