[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 08:08:30 PDT 2025


mbagherbeikTT wrote:

fair point. yes that will get moved out. The current LICM pass doesn't account for dead loops either and will move out the op if it has no mem effects AND is speculatable --> but since there's no effects it'll probably get removed by DCE whereas now the memWrites will force it to remain.

I'm looking through the LoopLikeOpInterface to see if we can infer dead loops. Might end up being restricted to only loops with known/constant iterator ranges. Let me know if you have any suggestions for where else to look for a solution.



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


More information about the Mlir-commits mailing list