From 090904070e2512338c9ca4bea454853aabc1c528 Mon Sep 17 00:00:00 2001 From: Kevin Gleason Date: Wed, 4 Jan 2023 18:09:27 +0100 Subject: [PATCH] [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 --- mlir/include/mlir/IR/OpImplementation.h | 5 +++-- mlir/lib/AsmParser/TypeParser.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h index 8a917b4..9e7fe09 100644 --- a/mlir/include/mlir/IR/OpImplementation.h +++ b/mlir/include/mlir/IR/OpImplementation.h @@ -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`)* diff --git a/mlir/lib/AsmParser/TypeParser.cpp b/mlir/lib/AsmParser/TypeParser.cpp index 38ae3ff..63f5b83 100644 --- a/mlir/lib/AsmParser/TypeParser.cpp +++ b/mlir/lib/AsmParser/TypeParser.cpp @@ -495,8 +495,9 @@ Parser::parseVectorDimensionList(SmallVectorImpl &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`)* -- 2.7.4