[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

Owen Anderson resistor at mac.com
Mon Jun 12 14:49:33 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

LoopUnswitch.cpp updated: 1.38 -> 1.39
---
Log message:

Reapply my 6/9 changes.  The bug Evan saw no longer occurs.


---
Diffs of the changes:  (+7 -1)

 LoopUnswitch.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.38 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.39
--- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.38	Sun Jun 11 04:32:57 2006
+++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp	Mon Jun 12 16:49:21 2006
@@ -73,6 +73,8 @@
       AU.addPreservedID(LoopSimplifyID);
       AU.addRequired<LoopInfo>();
       AU.addPreserved<LoopInfo>();
+      AU.addRequiredID(LCSSAID);
+      AU.addPreservedID(LCSSAID);
     }
 
   private:
@@ -154,6 +156,8 @@
 }
 
 bool LoopUnswitch::visitLoop(Loop *L) {
+  assert(L->isLCSSAForm());
+  
   bool Changed = false;
   
   // Loop over all of the basic blocks in the loop.  If we find an interior
@@ -198,7 +202,9 @@
         }
       }
   }
-    
+  
+  assert(L->isLCSSAForm());
+  
   return Changed;
 }
 






More information about the llvm-commits mailing list