Author: nicholas
Date: Wed Jan 30 02:01:28 2008
New Revision: 46555

URL: http://llvm.org/viewvc/llvm-project?rev=46555&view=rev
Log:
Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.

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

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadStoreElimination.cpp Wed Jan 30 
02:01:28 2008
@@ -327,7 +327,7 @@
     if (LoadInst* L = dyn_cast<LoadInst>(BBI)) {
       // However, if this load is unused, we can go ahead and remove it, and
       // not have to worry about it making our pointer undead!
-      if (L->getNumUses() == 0) {
+      if (L->use_empty()) {
         MD.removeInstruction(L);
         
         // DCE instructions only used to calculate that load
@@ -350,7 +350,7 @@
       deadPointers.erase(A);
       
       // Dead alloca's can be DCE'd when we reach them
-      if (A->getNumUses() == 0) {
+      if (A->use_empty()) {
         MD.removeInstruction(A);
         
         // DCE instructions only used to calculate that load


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to