[Mlir-commits] [mlir] [mlir][Interfaces][NFC] Update doc of ViewLikeOpInterface parser/printer handlers (PR #122555)
Matthias Springer
llvmlistbot at llvm.org
Sat Jan 11 01:27:05 PST 2025
================
@@ -86,24 +86,46 @@ class OpWithOffsetSizesAndStridesConstantArgumentFolder final
}
};
-/// Printer hook for custom directive in assemblyFormat.
+/// Printer hooks for custom directive in assemblyFormat.
///
/// custom<DynamicIndexList>($values, $integers)
/// custom<DynamicIndexList>($values, $integers, type($values))
///
-/// where `values` is of ODS type `Variadic<*>` and `integers` is of ODS
-/// type `I64ArrayAttr`. Prints a list with either (1) the static integer value
-/// in `integers` is `kDynamic` or (2) the next value otherwise. If `valueTypes`
-/// is non-empty, it is expected to contain as many elements as `values`
-/// indicating their types. This allows idiomatic printing of mixed value and
-/// integer attributes in a list. E.g.
-/// `[%arg0 : index, 7, 42, %arg42 : i32]`.
-///
-/// Indices can be scalable. For example, "4" in "[2, [4], 8]" is scalable.
-/// This notation is similar to how scalable dims are marked when defining
-/// Vectors. For each value in `integers`, the corresponding `bool` in
-/// `scalables` encodes whether it's a scalable index. If `scalableVals` is
-/// empty then assume that all indices are non-scalable.
+/// where `values` is of ODS type `Variadic<*>` and `integers` is of ODS type
+/// `I64ArrayAttr`. Print a list where each element is either:
+/// 1. the static integer value in `integers`, if it's not `kDynamic` or,
+/// 2. the next value in `values`, otherwise.
+///
+/// If `valueTypes` is provided, the corresponding type of each dynamic value is
----------------
matthias-springer wrote:
I would add a note here, that `valueTypes` could be deduced from `values`, but we have to make sure that the API for the parse/print functions is symmetric.
https://github.com/llvm/llvm-project/pull/122555
More information about the Mlir-commits
mailing list