[Mlir-commits] [mlir] [MLIR][Doc] Prepend "Variadic of" in front of variadic operands (PR #69285)

Mehdi Amini llvmlistbot at llvm.org
Mon Oct 16 22:05:49 PDT 2023


https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/69285

Table of Operands for operations like:

https://mlir.llvm.org/docs/Dialects/MemRef/#operands-6

Don't distinguish variadic ODS operands from others right now.

After this change, it'll print:

| Operand      | Description       |
| dynamicSizes | Variadic of index |

instead of:

| Operand      | Description |
| dynamicSizes | index       |

>From 101edb9c6347927cc027b20879ba78310b1d8dd2 Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Mon, 16 Oct 2023 21:38:50 -0700
Subject: [PATCH] [MLIR][Doc] Prepend "Variadic of" in front of variadic
 operands

Table of Operands for operations like:

https://mlir.llvm.org/docs/Dialects/MemRef/#operands-6

Don't distinguish variadic ODS operands from others right now.

After this change, it'll print:

| Operand      | Description       |
| dynamicSizes | Variadic of index |

instead of:

| Operand      | Description |
| dynamicSizes | index       |
---
 mlir/include/mlir/IR/CommonTypeConstraints.td | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mlir/include/mlir/IR/CommonTypeConstraints.td b/mlir/include/mlir/IR/CommonTypeConstraints.td
index 59249349921a3b6..8a0cc6e3e689d32 100644
--- a/mlir/include/mlir/IR/CommonTypeConstraints.td
+++ b/mlir/include/mlir/IR/CommonTypeConstraints.td
@@ -117,7 +117,8 @@ class DialectType<Dialect d, Pred condition, string descr = "",
 
 // A variadic type constraint. It expands to zero or more of the base type. This
 // class is used for supporting variadic operands/results.
-class Variadic<Type type> : TypeConstraint<type.predicate, type.summary,
+class Variadic<Type type> : TypeConstraint<type.predicate,
+                                           "Variadic of " # type.summary,
                                            type.cppClassName> {
   Type baseType = type;
   int minSize = 0;



More information about the Mlir-commits mailing list