[PATCH] D134826: [mlir][MemRef] Simplify extract_strided_metadata(collapse_shape)

lorenzo chelini via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 06:30:46 PDT 2022


chelini added inline comments.


================
Comment at: mlir/lib/Dialect/MemRef/Transforms/SimplifyExtractStridedMetadata.cpp:466
 /// materialize its effects on the sizes and the strides using affine apply.
-struct ExtractStridedMetadataOpExpandShapeFolder
+template <typename ReshapeLikeOp,
+          SmallVector<OpFoldResult> (*getReshapedSizes)(
----------------
qcolombet wrote:
> If you have a better name for this template type I'm taking!
> 
> In particular, this class is meant to deal with reshape ops with reassociation groups like collapse_shape and expand_shape. My problem with the name is that it could be confusing since we have `memref.reshape` and we don't support that here.
maybe `ReassociativeReshapeLikeOp` ? Just got the name from: https://github.com/llvm/llvm-project/blob/ea32658288d449a01c89188a440a53aaed2563c8/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td#L1370 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134826/new/

https://reviews.llvm.org/D134826



More information about the llvm-commits mailing list