[Mlir-commits] [mlir] [mlir][memref] canonicalization for erasing copying subview to identical subview (PR #125852)

Matthias Gehre llvmlistbot at llvm.org
Fri Feb 28 03:19:22 PST 2025


mgehre-amd wrote:

> > I guess the question is, why can't you run canonicalize->cse->canonicalize to solve this problem?
> 
> This is really expensive though: so rather than a "can" I see it as whether it is desirable. Beyond the "purity" of the design, this gets into practical territory: the tradeoff for the canonicalization to be useful enough can be driven by actual patterns of IR observed. Note also that because canonicalization can perform transformations that enable CSE, you may have to do `loop_until_no_change(canonization, use)` if you really wanna guarantee to catch it all.


Ok, that makes sense to me. Thanks for the explanation!

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


More information about the Mlir-commits mailing list