[Mlir-commits] [mlir] [mlir][fold-memref-alias-ops] Add support for folding memref.expand_shape involving dynamic dims (PR #89093)

Prathamesh Tagore llvmlistbot at llvm.org
Wed May 1 00:07:16 PDT 2024


meshtag wrote:

@MaheshRavishankar, I've rebased this PR and resolved all merge conflicts. 

I tried using `getOutputShape` utility added in the `expand_shape` PR referenced above, it ended up generating the same IR which we have atm using `memref.dim` op. The current logic for this seems less convoluted to me as `getOutputShape` returns only dynamic shapes (not immediately obvious to me - maybe consider naming it as `getDynamicOutputShape`?), so we would have to keep an additional variable to track the number of dynamic dimensions accessed and then pass that each time we want to get a dynamic dimension. 

Let me know your thoughts on this.

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


More information about the Mlir-commits mailing list