This pass is completely broken.
authorChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2004 17:09:06 +0000 (17:09 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 30 Nov 2004 17:09:06 +0000 (17:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18387 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/PRE.cpp

index 15884b6c76177c91a4c76c8b36b0bab8bd4c1621..b8934d213d2d1231a0ad9779ba98c61cf34d9816 100644 (file)
@@ -152,20 +152,13 @@ bool PRE::runOnFunction(Function &F) {
 bool PRE::ProcessBlock(BasicBlock *BB) {
   bool Changed = false;
 
+  // DISABLED: This pass invalidates iterators and then uses them.
+  return false;
+
   // PRE expressions first defined in this block...
-  Instruction *PrevInst = 0;
   for (BasicBlock::iterator I = BB->begin(); I != BB->end(); )
-    if (ProcessExpression(I)) {
-      // The current instruction may have been deleted, make sure to back up to
-      // PrevInst instead.
-      if (PrevInst)
-        I = PrevInst;
-      else
-        I = BB->begin();
+    if (ProcessExpression(I++))
       Changed = true;
-    } else {
-      PrevInst = I++;
-    }
 
   return Changed;
 }