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

Mehdi Amini llvmlistbot at llvm.org
Fri Jan 5 08:13:10 PST 2024


joker-eph wrote:

> I don't think LICM should belong to canonicalization. LICM is not always good for code quality as it may increase register pressure so applying it blindly during canonicalization seems dangerous.

I don't see a contraction between what you're saying and the canonicalization.

The process of canonicalization isn't to make the code faster, it is to make two equivalent input programs with the same IR.

It is expected that a cost-model and target specific lowering has to do some scheduling, and likely undo some potential canonicalizations.


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


More information about the Mlir-commits mailing list