Skip to content

Commit

Permalink
[NFC] Update parseDimensionList comments for dynamic size from -1 to …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
GleasonK authored and ftynse committed Jan 4, 2023
1 parent 0b857c5 commit 0909040
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions mlir/include/mlir/IR/OpImplementation.h
Expand Up @@ -1213,8 +1213,9 @@ class AsmParser {
}

/// 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`)*
Expand Down
5 changes: 3 additions & 2 deletions mlir/lib/AsmParser/TypeParser.cpp
Expand Up @@ -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`)*
Expand Down

0 comments on commit 0909040

Please sign in to comment.