[PATCH] D22630: Loop rotation
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 11:21:56 PDT 2016
eli.friedman added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopRotation.cpp:165
@@ -209,5 +164,3 @@
- // Rotate if either the loop latch does *not* exit the loop, or if the loop
- // latch was just simplified.
- if (L->isLoopExiting(OrigLatch) && !SimplifiedLatch)
+ if (!isSEME(OrigH, LoopLatch, DT))
return false;
----------------
Any update on why this check is necessary, or a comment in the code about why it is necessary?
================
Comment at: llvm/lib/Transforms/Scalar/LoopRotation.cpp:319
@@ +318,3 @@
+ // Collect all nodes of the loop from header to latch.
+ BasicBlock *NewH = collectSEMEBlocks(OrigH, OrigLatch, Blocks, Exits);
+ assert(NewH);
----------------
Is it possible this will clone more code? The trunk version would only clone the header; it looks like this will clone the whole loop body excluding the latch block?
https://reviews.llvm.org/D22630
More information about the llvm-commits
mailing list