[PATCH] D22630: Loop rotation

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 15:02:36 PDT 2016


sebpop added inline comments.

================
Comment at: llvm/lib/Transforms/Scalar/LoopRotation.cpp:250
@@ -249,3 +164,1 @@
-  if (SE)
-    SE->forgetLoop(L);
 
----------------
We will add this code back.

================
Comment at: llvm/lib/Transforms/Scalar/LoopRotation.cpp:676
@@ -675,3 @@
-    auto *SE = SEWP ? &SEWP->getSE() : nullptr;
-    LoopRotate LR(MaxHeaderSize, LI, TTI, AC, DT, SE);
-    return LR.processLoop(L);
----------------
mzolotukhin wrote:
> sebpop wrote:
> > Meinersbur wrote:
> > > Doesn't ScalarEvolution need be updated anymore? `getLoopAnalysisUsage()` adds `SCEVAAWrapperPass` (but not `ScalarEvolution` itself?)
> > The previous version of loop rotation was using the SE analysis.  Our revised loop rotation does not require SE: it only works on the CFG and DT.  There is no need to invalidate the SE, as LoopRotation adds new phi nodes, and the old phi nodes are removed.
> Are you sure about that? SE also provides info about, for instance, back-edge trip-count, and this would be different for the rotated loop.
I see that the previous code had an invalidation of the SE for the loop that gets transformed.  We will add that invalidation code back.


https://reviews.llvm.org/D22630





More information about the llvm-commits mailing list