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

toshiki maekawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 12 08:37:29 PDT 2021


uint256_t added a comment.

> As the patch is written I am concerned that this appears to mostly duplicate the existing code of LICM (which adds a maintenance burden) and just changes the type of the pass.

I'll update the code to contain less duplication. I'm sorry to trouble you.

> Could you elaborate on what kind of improvements you plan on adding using LoopNest?

With LoopNest pass, it'll be easy to efficiently hoist invariants in nested loop out of the nested loop at once.

  for (i = 0 to 10) 
     for (k = 0 to 10) 
        j = invariant * 2;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104180



More information about the llvm-commits mailing list