[llvm-commits] CVS: llvm/lib/Transforms/IPO/LoopExtractor.cpp
    Chris Lattner 
    lattner at cs.uiuc.edu
       
    Sun Apr 18 17:14:35 PDT 2004
    
    
  
Changes in directory llvm/lib/Transforms/IPO:
LoopExtractor.cpp updated: 1.10 -> 1.11
---
Log message:
Change the ExitBlocks list from being explicitly contained in the Loop
structure to being dynamically computed on demand.  This makes updating
loop information MUCH easier.
---
Diffs of the changes:  (+4 -2)
Index: llvm/lib/Transforms/IPO/LoopExtractor.cpp
diff -u llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.10 llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.11
--- llvm/lib/Transforms/IPO/LoopExtractor.cpp:1.10	Wed Mar 17 23:46:10 2004
+++ llvm/lib/Transforms/IPO/LoopExtractor.cpp	Sun Apr 18 17:13:44 2004
@@ -92,8 +92,10 @@
     else {
       // Check to see if any exits from the loop are more than just return
       // blocks.
-      for (unsigned i = 0, e = TLL->getExitBlocks().size(); i != e; ++i)
-        if (!isa<ReturnInst>(TLL->getExitBlocks()[i]->getTerminator())) {
+      std::vector<BasicBlock*> ExitBlocks;
+      TLL->getExitBlocks(ExitBlocks);
+      for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
+        if (!isa<ReturnInst>(ExitBlocks[i]->getTerminator())) {
           ShouldExtractLoop = true;
           break;
         }
    
    
More information about the llvm-commits
mailing list