[all-commits] [llvm/llvm-project] 6971b8: [mlir][irdl] Add Variadicity to IRDL operations
Fehr Mathieu via All-commits
all-commits at lists.llvm.org
Wed Jul 26 10:17:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6971b83b2fddf13a42cd080ef86a54397a887f63
https://github.com/llvm/llvm-project/commit/6971b83b2fddf13a42cd080ef86a54397a887f63
Author: Mathieu Fehr <mathieu.fehr at gmail.com>
Date: 2023-07-26 (Wed, 26 Jul 2023)
Changed paths:
M mlir/include/mlir/Dialect/IRDL/IR/CMakeLists.txt
M mlir/include/mlir/Dialect/IRDL/IR/IRDL.h
M mlir/include/mlir/Dialect/IRDL/IR/IRDL.td
A mlir/include/mlir/Dialect/IRDL/IR/IRDLAttributes.td
M mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
M mlir/lib/Dialect/IRDL/IR/IRDL.cpp
A mlir/test/Dialect/IRDL/variadics-error.irdl.mlir
A mlir/test/Dialect/IRDL/variadics.irdl.mlir
Log Message:
-----------
[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
More information about the All-commits
mailing list