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

Quentin Colombet llvmlistbot at llvm.org
Thu Apr 25 14:23:45 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*/)>
----------------
qcolombet wrote:

I could be misremembering, but I think function_ref doesn't work for template arguments. (Aka the compiler chokes on them.)

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


More information about the Mlir-commits mailing list