[Mlir-commits] [mlir] d2b7a8e - [mlir] Partial revert of 93c42299bdb1ef094857ef2d065670af0695c26b
Adrian Kuegel
llvmlistbot at llvm.org
Tue Sep 26 23:27:15 PDT 2023
Author: Adrian Kuegel
Date: 2023-09-27T06:27:04Z
New Revision: d2b7a8e83e3ed53a8124f77082e7448f479f8610
URL: https://github.com/llvm/llvm-project/commit/d2b7a8e83e3ed53a8124f77082e7448f479f8610
DIFF: https://github.com/llvm/llvm-project/commit/d2b7a8e83e3ed53a8124f77082e7448f479f8610.diff
LOG: [mlir] Partial revert of 93c42299bdb1ef094857ef2d065670af0695c26b
This part of the change was not NFC.
Added:
Modified:
mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
index 72fb30388c631cf..1ecfe7906c571f9 100644
--- a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
@@ -101,9 +101,10 @@ static bool tileDividesIterationDomain(Range loopRange) {
/// `tileSize`, i.e., `min(tileSize, range.end() - iv)`.
static OpFoldResult getBoundedTileSize(OpBuilder &b, Location loc,
Range loopRange, Value iv,
- OpFoldResult tileSize) {
- if (isConstantIntValue(tileSize, 1))
- return tileSize;
+ Value tileSize) {
+ std::optional<int64_t> ts = getConstantIntValue(tileSize);
+ if (ts && ts.value() == 1)
+ return getAsOpFoldResult(tileSize);
if (tileDividesIterationDomain(
Range{loopRange.offset, loopRange.size, tileSize}))
More information about the Mlir-commits
mailing list