[llvm-commits] [llvm] r70872 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Chris Lattner sabre at nondot.org
Mon May 4 09:29:24 PDT 2009


Author: lattner
Date: Mon May  4 11:29:24 2009
New Revision: 70872

URL: http://llvm.org/viewvc/llvm-project?rev=70872&view=rev
Log:
fix some problems spotted by Duncan and Nicolas Geoffray

Modified:
    llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=70872&r1=70871&r2=70872&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Mon May  4 11:29:24 2009
@@ -120,8 +120,8 @@
           BB != &BB->getParent()->getEntryBlock()) {
         DOUT << "  JT: Deleting dead block '" << BB->getNameStart()
              << "' with terminator: " << *BB->getTerminator();
-        DeleteDeadBlock(BB);
         LoopHeaders.erase(BB);
+        DeleteDeadBlock(BB);
         Changed = true;
       }
     }
@@ -133,7 +133,7 @@
   return EverChanged;
 }
 
-/// FindLoopHeaders - We do not wan jump threading to turn proper loop
+/// FindLoopHeaders - We do not want jump threading to turn proper loop
 /// structures into irreducible loops.  Doing this breaks up the loop nesting
 /// hierarchy and pessimizes later transformations.  To prevent this from
 /// happening, we first have to find the loop headers.  Here we approximate this





More information about the llvm-commits mailing list