[Mlir-commits] [mlir] [mlir][MemRef] Add ExtractStridedMetadataOpCollapseShapeFolder (PR #89954)

Diego Caballero llvmlistbot at llvm.org
Thu Apr 25 13:56:18 PDT 2024


================
@@ -550,6 +550,78 @@ getCollapsedStride(memref::CollapseShapeOp collapseShape, OpBuilder &builder,
   return {makeComposedFoldedAffineMin(builder, collapseShape.getLoc(), minMap,
                                       groupStrides)};
 }
+
+template <typename ReassociativeReshapeLikeOp,
+          SmallVector<OpFoldResult> (*getReshapedSizes)(
+              ReassociativeReshapeLikeOp, OpBuilder &,
+              ArrayRef<OpFoldResult> /*origSizes*/, unsigned /*groupId*/),
+          SmallVector<OpFoldResult> (*getReshapedStrides)(
+              ReassociativeReshapeLikeOp, OpBuilder &,
+              ArrayRef<OpFoldResult> /*origSizes*/,
+              ArrayRef<OpFoldResult> /*origStrides*/, unsigned /*groupId*/)>
----------------
dcaballe wrote:

Probably not. I mostly followed the style of the caller

https://github.com/llvm/llvm-project/pull/89954


More information about the Mlir-commits mailing list