[llvm-commits] CVS: llvm/lib/Analysis/LoopInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 17 16:48:00 PDT 2003


Changes in directory llvm/lib/Analysis:

LoopInfo.cpp updated: 1.38 -> 1.39

---
Log message:

Fix the bug that broke the nightly tester in McCat/18-imp last night.  :(


---
Diffs of the changes:

Index: llvm/lib/Analysis/LoopInfo.cpp
diff -u llvm/lib/Analysis/LoopInfo.cpp:1.38 llvm/lib/Analysis/LoopInfo.cpp:1.39
--- llvm/lib/Analysis/LoopInfo.cpp:1.38	Sat Aug 16 15:57:16 2003
+++ llvm/lib/Analysis/LoopInfo.cpp	Sun Aug 17 16:47:33 2003
@@ -220,15 +220,15 @@
           if (BlockLoop == 0) {   // Child block not processed yet...
             BlockLoop = Child;
           } else if (BlockLoop != Child) {
+            Loop *SubLoop = BlockLoop;
+            // Reparent all of the blocks which used to belong to BlockLoops
+            for (unsigned j = 0, e = SubLoop->Blocks.size(); j != e; ++j)
+              ContainingLoops[SubLoop->Blocks[j]] = Child;
+
             // There is already a loop which contains this block, that means
             // that we should reparent the loop which the block is currently
             // considered to belong to to be a child of this loop.
-            MoveSiblingLoopInto(BlockLoop, Child);
-            
-            // Reparent all of the blocks which used to belong to BlockLoops
-            for (unsigned j = 0, e = BlockLoop->Blocks.size(); j != e; ++j)
-              ContainingLoops[BlockLoop->Blocks[j]] = Child;
-            
+            MoveSiblingLoopInto(SubLoop, Child);
             --i;  // We just shrunk the SubLoops list.
           }
         }





More information about the llvm-commits mailing list