[all-commits] [llvm/llvm-project] eca7d8: [mlir][memref] Simplify expand_shape size/stride c...
Longsheng Mou via All-commits
all-commits at lists.llvm.org
Tue Mar 24 20:00:17 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eca7d833a6158194078635c1054ada81324e9b97
https://github.com/llvm/llvm-project/commit/eca7d833a6158194078635c1054ada81324e9b97
Author: Longsheng Mou <longshengmou at gmail.com>
Date: 2026-03-25 (Wed, 25 Mar 2026)
Changed paths:
M mlir/lib/Dialect/MemRef/Transforms/ExpandStridedMetadata.cpp
M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
M mlir/test/Dialect/MemRef/expand-strided-metadata.mlir
Log Message:
-----------
[mlir][memref] Simplify expand_shape size/stride computation using output_shape (#187844)
This PR refactors `getExpandedSizes` and `getExpandedStrides` to compute
their results directly from the `output_shape` of `memref.expand_shape`.
Instead of reconstructing expanded sizes/strides through manual
inference, we now rely on the operation’s explicit shape information.
The previous implementation imposed the restriction that there must be
at most one dynamic size per reassociation group. This limitation is
removed by the new approach: any number of dynamic dimensions within a
group is now supported, as long as they are represented in the
`output_shape`.
As a result, the code becomes both simpler and more expressive, while
better matching the semantics of `memref.expand_shape`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list