[llvm-commits] [llvm] r61891 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Dan Gohman gohman at apple.com
Wed Jan 7 14:30:55 PST 2009


Author: djg
Date: Wed Jan  7 16:30:55 2009
New Revision: 61891

URL: http://llvm.org/viewvc/llvm-project?rev=61891&view=rev
Log:
Remove redundant 'else's. No functionality change.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=61891&r1=61890&r2=61891&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Jan  7 16:30:55 2009
@@ -971,27 +971,26 @@
         // allocation choices. But if it is a livein then perhaps we want it
         // closer to its uses so it can be coalesced.
         return 0xffff;
-      else if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg)
+      if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg)
         // CopyToReg should be close to its uses to facilitate coalescing and
         // avoid spilling.
         return 0;
-      else if (Opc == TargetInstrInfo::EXTRACT_SUBREG ||
-               Opc == TargetInstrInfo::INSERT_SUBREG)
+      if (Opc == TargetInstrInfo::EXTRACT_SUBREG ||
+          Opc == TargetInstrInfo::INSERT_SUBREG)
         // EXTRACT_SUBREG / INSERT_SUBREG should be close to its use to
         // facilitate coalescing.
         return 0;
-      else if (SU->NumSuccs == 0)
+      if (SU->NumSuccs == 0)
         // If SU does not have a use, i.e. it doesn't produce a value that would
         // be consumed (e.g. store), then it terminates a chain of computation.
         // Give it a large SethiUllman number so it will be scheduled right
         // before its predecessors that it doesn't lengthen their live ranges.
         return 0xffff;
-      else if (SU->NumPreds == 0)
+      if (SU->NumPreds == 0)
         // If SU does not have a def, schedule it close to its uses because it
         // does not lengthen any live ranges.
         return 0;
-      else
-        return SethiUllmanNumbers[SU->NodeNum];
+      return SethiUllmanNumbers[SU->NodeNum];
     }
     
     unsigned size() const { return Queue.size(); }





More information about the llvm-commits mailing list