[llvm-commits] [llvm] r92735 - in /llvm/trunk/lib/Transforms/Scalar: IndVarSimplify.cpp LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Tue Jan 5 08:31:45 PST 2010


Author: djg
Date: Tue Jan  5 10:31:45 2010
New Revision: 92735

URL: http://llvm.org/viewvc/llvm-project?rev=92735&view=rev
Log:
Set Changed properly after calling DeleteDeadPHIs.

Modified:
    llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Jan  5 10:31:45 2010
@@ -438,7 +438,7 @@
     IU->AddUsersIfInteresting(cast<Instruction>(NewICmp->getOperand(0)));
 
   // Clean up dead instructions.
-  DeleteDeadPHIs(L->getHeader());
+  Changed |= DeleteDeadPHIs(L->getHeader());
   // Check a post-condition.
   assert(L->isLCSSAForm() && "Indvars did not leave the loop in lcssa form!");
   return Changed;

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Jan  5 10:31:45 2010
@@ -2723,7 +2723,7 @@
 
   // At this point, it is worth checking to see if any recurrence PHIs are also
   // dead, so that we can remove them as well.
-  DeleteDeadPHIs(L->getHeader());
+  Changed |= DeleteDeadPHIs(L->getHeader());
 
   return Changed;
 }





More information about the llvm-commits mailing list