Skip to content
Commit 6971b83b authored by Mathieu Fehr's avatar Mathieu Fehr
Browse files

[mlir][irdl] Add Variadicity to IRDL operations

This patch adds optional and variadic operands and results
to IRDL. These are added using the `irdl.variadicity` attribute,
which has to be attached to every `irdl.operands` and `irdl.results`
operations.

For instance:
```mlir
irdl.operands(%0, single %1, optional %2, variadic %3)
```
has 4 operand definitions. The first two are single operands,
the second one is optional, and the last one is variadic.

Note that this patch only adds the variadicities to the definition,
but does not consider them when loading a dialect at runtime. This
will be done in the next patch.

Reviewed By: Mogball, unterumarmung

Differential Revision: https://reviews.llvm.org/D153983
parent e9570d1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment