[PATCH] D104180: [LICM] Create LoopNest Invariant Code Motion (LNICM) pass

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 18 11:40:51 PDT 2021


nikic added a comment.

I'm okay with landing this, as the change to LICM is trivial and won't be an undue maintenance burden.

I remain somewhat skeptical about the proposed pipeline changes though. I believe it is pretty important that LICM runs early in the loop pipeline, e.g. in D99249 <https://reviews.llvm.org/D99249> we've seen that we sometimes need it already before LoopRotate (but also after LoopRotate). Replacing early LICM passes with LNICM means we don't perform (early) LICM anymore in some cases, which will presumably affect other passes in the pipeline adversely. At the same time, your proposal to add an additional LICM pass after LPM2 will have a significant negative compile-time impact because it requires recomputing MemorySSA. Though it's worth mentioning that the simplification pipeline already contains another late LICM pass, so possibly adding another one wouldn't actually be necessary.

But anyway, we can land this and then evaluate any pipeline changes separately.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104180/new/

https://reviews.llvm.org/D104180



More information about the llvm-commits mailing list