[PATCH] D85063: [NewPM][LoopVersioning] Port LoopVersioning to NPM

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 18:54:02 PDT 2020


ychen added a comment.

Add a test case in llvm/test/Transforms/LoopVersioning/basic.ll? Where is the unit test for this (if there is any)?



================
Comment at: llvm/lib/Transforms/Utils/LoopVersioning.cpp:259
 namespace {
+bool runImpl(LoopInfo *LI, std::function<const LoopAccessInfo &(Loop &)> GetLAA,
+             DominatorTree *DT, ScalarEvolution *SE) {
----------------
use function_ref since it is a one-time use/ref of a callable.


================
Comment at: llvm/lib/Transforms/Utils/LoopVersioning.cpp:275
+  for (Loop *L : Worklist) {
+    // const LoopAccessInfo &LAI = LAA->getInfo(L);
+    const LoopAccessInfo &LAI = GetLAA(*L);
----------------
delete


================
Comment at: llvm/lib/Transforms/Utils/LoopVersioning.cpp:365
+
+  if (runImpl(&LI, GetLAA, &DT, &SE)) {
+    return PreservedAnalyses::none();
----------------
extra brace


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85063



More information about the llvm-commits mailing list