[PATCH] D107219: [LICM] Support sinking in LNICM

toshiki maekawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 4 06:41:12 PDT 2021


uint256_t added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/LoopUtils.h:157
+
+bool sinkRegionForLoopNest(DomTreeNode *, AAResults *, LoopInfo *,
+                           DominatorTree *, BlockFrequencyInfo *,
----------------
Whitney wrote:
> Please add description for this function.
Ok, I'll add a brief description.


================
Comment at: llvm/test/Transforms/LICM/lnicm-sink.ll:15
+;     }
+;     y[i] = s;
+;   }
----------------
Whitney wrote:
> Why `y[i] = s;` is needed for this test case?
It is to show that LNICM maintains perfect loop nest.
LICM sinks `s = abs(i);` to right before `y[i] = s;`, whereas LNICM doesn't do so.


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

https://reviews.llvm.org/D107219



More information about the llvm-commits mailing list