[Mlir-commits] [mlir] [mlir][scf] Add simple LICM pattern for `scf.while` (PR #76370)

Mehdi Amini llvmlistbot at llvm.org
Sat Jan 6 03:09:11 PST 2024


joker-eph wrote:

> This shouldn't be a canonicalization pattern for a variety of reasons. Some others have already pointed out, that this is not an "always good" optimization and should not be enabled by default.

This is not the definition of a canonicalization: I strongly oppose this argument right now. 
I argue that if you don't want this kind of transformation, then you don't want canonicalization by principle.

> An additional problem is that any canonicalization pattern that walks the body of an operation risks O(N^2) blowup in the pattern rewrite

This is a better argument to me, to be studied in detail though.


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


More information about the Mlir-commits mailing list