[PATCH] D45970: [LoopInterchange] Do not change LI for BBs in child loops.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 14:41:47 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330653: [LoopInterchange] Do not change LI for BBs in child loops. (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45970?vs=143579&id=143653#toc
Repository:
rL LLVM
https://reviews.llvm.org/D45970
Files:
llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
Index: llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
+++ llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -1220,6 +1220,9 @@
BasicBlock *OuterHeader = NewOuter->getHeader();
BasicBlock *OuterLatch = NewOuter->getLoopLatch();
for (BasicBlock *BB : OrigInnerBBs) {
+ // Nothing will change for BBs in child loops.
+ if (LI->getLoopFor(BB) != NewOuter)
+ continue;
// Remove the new outer loop header and latch from the new inner loop.
if (BB == OuterHeader || BB == OuterLatch)
NewInner->removeBlockFromLoop(BB);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45970.143653.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/b552799c/attachment.bin>
More information about the llvm-commits
mailing list