[PATCH] D45191: [LoopReroll] Rewrite induction variable rewriting.

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 09:30:41 PDT 2018


javed.absar added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:1415
+    const SCEVAddRecExpr *IVSCEV =
+        cast<SCEVAddRecExpr>(SE->getSCEV(DRS.BaseInst));
+    StartExprs.push_back(IVSCEV->getStart());
----------------
Should probably use dyn_cast if we cant be 100% it will be SCEVAddRecExpr.


================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:1618
   Reductions.replaceSelected();
-  DAGRoots.replace(IterCount);
+  DAGRoots.replace(LIBETC);
 
----------------
Can LIBETC be renamed to something more meaningful.
Is LIBETC = Loop ??? back edge taken count?


Repository:
  rL LLVM

https://reviews.llvm.org/D45191





More information about the llvm-commits mailing list