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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Oct 16 22:06:58 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-ods

Author: Mehdi Amini (joker-eph)

<details>
<summary>Changes</summary>

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       |

---
Full diff: https://github.com/llvm/llvm-project/pull/69285.diff


1 Files Affected:

- (modified) mlir/include/mlir/IR/CommonTypeConstraints.td (+2-1) 


``````````diff
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;

``````````

</details>


https://github.com/llvm/llvm-project/pull/69285


More information about the Mlir-commits mailing list