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

Jeff Niu llvmlistbot at llvm.org
Fri Jan 5 09:49:59 PST 2024


https://github.com/Mogball requested changes to this pull request.

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. 

An additional problem is that any canonicalization pattern that walks the body of an operation risks O(N^2) blowup in the pattern rewriter: each time an op is modified in the body of the while, the pattern is triggered again, causing another walk even if nothing changes.

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


More information about the Mlir-commits mailing list