Skip to content

Conversation

joker-eph
Copy link
Collaborator

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 |

@joker-eph joker-eph requested review from jpienaar and Mogball October 17, 2023 05:05
@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir mlir:ods labels Oct 17, 2023
@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2023

@llvm/pr-subscribers-mlir-linalg
@llvm/pr-subscribers-mlir-llvm
@llvm/pr-subscribers-mlir-affine
@llvm/pr-subscribers-mlir
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir-ods

Author: Mehdi Amini (joker-eph)

Changes

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

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       |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category mlir:affine mlir:core MLIR Core Infrastructure mlir:linalg mlir:llvm mlir:ods mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants