[Mlir-commits] [mlir] 8dd58a5 - [mlir][Linalg] NFC - Fully compose map and operands when creating AffineMin in tiling.

Nicolas Vasilache llvmlistbot at llvm.org
Wed Jan 20 12:36:56 PST 2021


Author: Nicolas Vasilache
Date: 2021-01-20T20:36:18Z
New Revision: 8dd58a509cc8b93a211c9b07b12e1548dc187fc3

URL: https://github.com/llvm/llvm-project/commit/8dd58a509cc8b93a211c9b07b12e1548dc187fc3
DIFF: https://github.com/llvm/llvm-project/commit/8dd58a509cc8b93a211c9b07b12e1548dc187fc3.diff

LOG: [mlir][Linalg] NFC - Fully compose map and operands when creating AffineMin in tiling.

This may simplify the composition of patterns but is otherwise NFC.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
index eb8c9bb6a6fc..62a5d325ddcf 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
@@ -34,7 +34,6 @@ using namespace mlir::edsc::intrinsics;
 using namespace mlir::linalg;
 using namespace mlir::scf;
 
-using folded_affine_min = FoldedValueBuilder<AffineMinOp>;
 
 #define DEBUG_TYPE "linalg-tiling"
 
@@ -292,8 +291,9 @@ makeTiledShapes(OpBuilder &b, Location loc, LinalgOp linalgOp,
                  getAffineDimExpr(/*position=*/2, b.getContext())},
             b.getContext());
         auto d = std_dim(shapedOp, r);
-        size =
-            affine_min(b.getIndexType(), minMap, ValueRange{size, d, offset});
+        SmallVector<Value, 4> operands{size, d, offset};
+        fullyComposeAffineMapAndOperands(&minMap, &operands);
+        size = affine_min(b.getIndexType(), minMap, operands);
       }
 
       sizes.push_back(size);


        


More information about the Mlir-commits mailing list