[Mlir-commits] [mlir] 0909040 - [NFC] Update parseDimensionList comments for dynamic size from -1 to kDynamic

Alex Zinenko llvmlistbot at llvm.org
Wed Jan 4 09:10:21 PST 2023


Author: Kevin Gleason
Date: 2023-01-04T18:10:14+01:00
New Revision: 090904070e2512338c9ca4bea454853aabc1c528

URL: https://github.com/llvm/llvm-project/commit/090904070e2512338c9ca4bea454853aabc1c528
DIFF: https://github.com/llvm/llvm-project/commit/090904070e2512338c9ca4bea454853aabc1c528.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h
index 8a917b45c6c30..9e7fe093b2ae5 100644
--- a/mlir/include/mlir/IR/OpImplementation.h
+++ b/mlir/include/mlir/IR/OpImplementation.h
@@ -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`)*

diff  --git a/mlir/lib/AsmParser/TypeParser.cpp b/mlir/lib/AsmParser/TypeParser.cpp
index 38ae3ffc078dc..63f5b835eb3ca 100644
--- a/mlir/lib/AsmParser/TypeParser.cpp
+++ b/mlir/lib/AsmParser/TypeParser.cpp
@@ -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`)*


        


More information about the Mlir-commits mailing list