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

Chris Lattner sabre at nondot.org
Fri Mar 2 11:59:46 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.638 -> 1.639
---
Log message:

minor cleanup


---
Diffs of the changes:  (+2 -6)

 InstructionCombining.cpp |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.638 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.639
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.638	Thu Mar  1 13:33:52 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Fri Mar  2 13:59:19 2007
@@ -5799,13 +5799,9 @@
       while (UI != E && *UI == User)
         ++UI; // If this instruction uses AI more than once, don't break UI.
       
-      // Add operands to the worklist.
-      AddUsesToWorkList(*User);
       ++NumDeadInst;
       DOUT << "IC: DCE: " << *User;
-      
-      User->eraseFromParent();
-      removeFromWorkList(User);
+      EraseInstFromFunction(*User);
     }
   }
   
@@ -7389,7 +7385,7 @@
 
   if (Caller->getType() != Type::VoidTy && !Caller->use_empty())
     Caller->replaceAllUsesWith(NV);
-  Caller->getParent()->getInstList().erase(Caller);
+  Caller->eraseFromParent();
   removeFromWorkList(Caller);
   return true;
 }






More information about the llvm-commits mailing list