[Mlir-commits] [mlir] eaafee2 - [Affine] Replace a magic -1 with ShapedType::kDynamicSize
Benjamin Kramer
llvmlistbot at llvm.org
Thu Nov 17 15:30:05 PST 2022
Author: Benjamin Kramer
Date: 2022-11-18T00:26:25+01:00
New Revision: eaafee27a9e1440d1ed6fc19458e4fb0cafb01f1
URL: https://github.com/llvm/llvm-project/commit/eaafee27a9e1440d1ed6fc19458e4fb0cafb01f1
DIFF: https://github.com/llvm/llvm-project/commit/eaafee27a9e1440d1ed6fc19458e4fb0cafb01f1.diff
LOG: [Affine] Replace a magic -1 with ShapedType::kDynamicSize
Added:
Modified:
mlir/lib/Dialect/Affine/Analysis/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
index 6f6d988e3dd13..008b9c499191a 100644
--- a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
@@ -380,7 +380,7 @@ Optional<int64_t> MemRefRegion::getConstantBoundingSizeAndShape(
// If no constant bound is found, then it can always be bound by the
// memref's dim size if the latter has a constant size along this dim.
auto dimSize = memRefType.getDimSize(d);
- if (dimSize == -1)
+ if (dimSize == ShapedType::kDynamicSize)
return None;
diff Constant = dimSize;
// Lower bound becomes 0.
More information about the Mlir-commits
mailing list