[NFC] Update parseDimensionList comments for dynamic size from -1 to kDynamic
authorKevin Gleason <gleasonk@google.com>
Wed, 4 Jan 2023 17:09:27 +0000 (18:09 +0100)
committerAlex Zinenko <zinenko@google.com>
Wed, 4 Jan 2023 17:10:14 +0000 (18:10 +0100)
Comment is stale now that kDynamic is defined as intmin instead of -1.

Confirmed that implementation in `parseDimensionListRanked` uses kDynamic.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D140994

mlir/include/mlir/IR/OpImplementation.h
mlir/lib/AsmParser/TypeParser.cpp

index 8a917b4..9e7fe09 100644 (file)
@@ -1213,8 +1213,9 @@ public:
   }
 
   /// Parse a dimension list of a tensor or memref type.  This populates the
-  /// dimension list, using -1 for the `?` dimensions if `allowDynamic` is set
-  /// and errors out on `?` otherwise. Parsing the trailing `x` is configurable.
+  /// dimension list, using ShapedType::kDynamic for the `?` dimensions if
+  /// `allowDynamic` is set and errors out on `?` otherwise. Parsing the
+  /// trailing `x` is configurable.
   ///
   ///   dimension-list ::= eps | dimension (`x` dimension)*
   ///   dimension-list-with-trailing-x ::= (dimension `x`)*
index 38ae3ff..63f5b83 100644 (file)
@@ -495,8 +495,9 @@ Parser::parseVectorDimensionList(SmallVectorImpl<int64_t> &dimensions,
 }
 
 /// Parse a dimension list of a tensor or memref type.  This populates the
-/// dimension list, using -1 for the `?` dimensions if `allowDynamic` is set and
-/// errors out on `?` otherwise. Parsing the trailing `x` is configurable.
+/// dimension list, using ShapedType::kDynamic for the `?` dimensions if
+/// `allowDynamic` is set and errors out on `?` otherwise. Parsing the trailing
+/// `x` is configurable.
 ///
 ///   dimension-list ::= eps | dimension (`x` dimension)*
 ///   dimension-list-with-trailing-x ::= (dimension `x`)*