Skip to content

Commit 0909040

Browse files
GleasonKftynse
authored andcommitted
[NFC] Update parseDimensionList comments for dynamic size from -1 to kDynamic
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
1 parent 0b857c5 commit 0909040

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

mlir/include/mlir/IR/OpImplementation.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,9 @@ class AsmParser {
12131213
}
12141214

12151215
/// Parse a dimension list of a tensor or memref type. This populates the
1216-
/// dimension list, using -1 for the `?` dimensions if `allowDynamic` is set
1217-
/// and errors out on `?` otherwise. Parsing the trailing `x` is configurable.
1216+
/// dimension list, using ShapedType::kDynamic for the `?` dimensions if
1217+
/// `allowDynamic` is set and errors out on `?` otherwise. Parsing the
1218+
/// trailing `x` is configurable.
12181219
///
12191220
/// dimension-list ::= eps | dimension (`x` dimension)*
12201221
/// dimension-list-with-trailing-x ::= (dimension `x`)*

mlir/lib/AsmParser/TypeParser.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,9 @@ Parser::parseVectorDimensionList(SmallVectorImpl<int64_t> &dimensions,
495495
}
496496

497497
/// Parse a dimension list of a tensor or memref type. This populates the
498-
/// dimension list, using -1 for the `?` dimensions if `allowDynamic` is set and
499-
/// errors out on `?` otherwise. Parsing the trailing `x` is configurable.
498+
/// dimension list, using ShapedType::kDynamic for the `?` dimensions if
499+
/// `allowDynamic` is set and errors out on `?` otherwise. Parsing the trailing
500+
/// `x` is configurable.
500501
///
501502
/// dimension-list ::= eps | dimension (`x` dimension)*
502503
/// dimension-list-with-trailing-x ::= (dimension `x`)*

0 commit comments

Comments
 (0)