[Mlir-commits] [mlir] [MLIR][SideEffects][MemoryEffects] Modified LICM to be more aggressive when checking movability of ops with MemWrite effects (PR #155344)

Mo Bagherbeik llvmlistbot at llvm.org
Tue Aug 26 14:08:55 PDT 2025


mbagherbeikTT wrote:

Added more conditions. Ops with MemWrite memory effects will now be moved out of loops if:
1. op is speculatable
2. **op's parent loop region has constant bounds/steps**
3. **op's parent loop isn't dead (is not a zero trip loop)**
4. inputs to op are defined outside of the loop that op resides in
5. the op only has MemWrite effects
6. no other operation in op's parent region has an Alloc/Free/Write effect on any of the resources written to by op
7. no other operation with a Read effect on any of the resources written to by op dominates op in its parent region

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


More information about the Mlir-commits mailing list