Skip to content

Commit 8dd58a5

Browse files
[mlir][Linalg] NFC - Fully compose map and operands when creating AffineMin in tiling.
This may simplify the composition of patterns but is otherwise NFC.
1 parent b1e1bba commit 8dd58a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ using namespace mlir::edsc::intrinsics;
3434
using namespace mlir::linalg;
3535
using namespace mlir::scf;
3636

37-
using folded_affine_min = FoldedValueBuilder<AffineMinOp>;
3837

3938
#define DEBUG_TYPE "linalg-tiling"
4039

@@ -292,8 +291,9 @@ makeTiledShapes(OpBuilder &b, Location loc, LinalgOp linalgOp,
292291
getAffineDimExpr(/*position=*/2, b.getContext())},
293292
b.getContext());
294293
auto d = std_dim(shapedOp, r);
295-
size =
296-
affine_min(b.getIndexType(), minMap, ValueRange{size, d, offset});
294+
SmallVector<Value, 4> operands{size, d, offset};
295+
fullyComposeAffineMapAndOperands(&minMap, &operands);
296+
size = affine_min(b.getIndexType(), minMap, operands);
297297
}
298298

299299
sizes.push_back(size);

0 commit comments

Comments
 (0)