[PATCH] D45278: [LoopInterchange] Preserve LoopInfo after interchanging.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 14:31:02 PDT 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:1221
+    if (BB == InnerHeader || BB == InnerLatch)
+      OuterLoop->removeBlockFromLoop(BB);
+    else
----------------
efriedma wrote:
> This looks weird; you're removing the block from the outer loop, but it's still in the inner loop?
In this version, the variable OuterLoop refers to the original outer loop, which becomes the inner loop and InnerLoop refers to the loop that becomes the outer loop. I have renamed the variables to NewInner and NewOuter. Do you think it's clearer now?


https://reviews.llvm.org/D45278





More information about the llvm-commits mailing list