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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 27 14:06:18 PDT 2021


nikic added a comment.

I think the main thing that I don't get here is how this fits into our optimization pipeline, and whether there is some viable path to default enablement here. In abstract, I can see that the LNICM + LoopInterchange combination makes sense. But the way our pipeline is currently structured, LICM and LoopInterchange are run as part of two separate LPMs. This means that by the time LoopInterchange runs, LICM will have been run on all loops already, and hoisted operations as far as possible, including out of loop nests.

This would only make sense to me if we wanted to add a LNICM run into LPM2, but why would we want to do that? Also, LoopInterchange doesn't preserve MSSA, so it can't be part of the same LPM as LICM/LNICM anyway. Or technically it can, because we still support AST-based LICM, but that's only because we haven't gotten around to removing it yet. It's not an option that exists longer term.


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

https://reviews.llvm.org/D104180



More information about the llvm-commits mailing list