[mlir:PDLL] Don't require users to provide operands/results when all are variadic
authorRiver Riddle <riddleriver@gmail.com>
Mon, 12 Sep 2022 18:43:44 +0000 (11:43 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 8 Nov 2022 09:57:58 +0000 (01:57 -0800)
commitec92a125acc66c67e8d86dcf6e200fe34d204b3d
treedcd561641fe3b1352f50945cbd1b85edb54498db
parent9e57210ad9f76b93bb8e9fc441be5cf3597b2928
[mlir:PDLL] Don't require users to provide operands/results when all are variadic

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.

Differential Revision: https://reviews.llvm.org/D133721
mlir/lib/Tools/PDLL/Parser/Parser.cpp
mlir/test/lib/Transforms/TestDialectConversion.pdll
mlir/test/mlir-pdll/Parser/expr.pdll
mlir/test/mlir-pdll/Parser/include/ops.td