[llvm-commits] [llvm] r76808 - /llvm/trunk/lib/CodeGen/LiveInterval.cpp

David Greene greened at obbligato.org
Wed Jul 22 15:32:22 PDT 2009


Author: greened
Date: Wed Jul 22 17:32:19 2009
New Revision: 76808

URL: http://llvm.org/viewvc/llvm-project?rev=76808&view=rev
Log:

Reorder if-else branches as suggested by Bill.

Modified:
    llvm/trunk/lib/CodeGen/LiveInterval.cpp

Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=76808&r1=76807&r2=76808&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Wed Jul 22 17:32:19 2009
@@ -800,15 +800,15 @@
   // weight of the non-spilled interval.  This can only happen with
   // iterative coalescers.
 
-  if (weight == HUGE_VALF &&
+  if (Other.weight != HUGE_VALF) {
+    weight += Other.weight;
+  }
+  else if (weight == HUGE_VALF &&
       !TargetRegisterInfo::isPhysicalRegister(reg)) {
     // Remove this assert if you have an iterative coalescer
     assert(0 && "Joining to spilled interval");
     weight = Other.weight;
   }
-  else if (Other.weight != HUGE_VALF) {
-    weight += Other.weight;
-  }
   else {
     // Otherwise the weight stays the same
     // Remove this assert if you have an iterative coalescer





More information about the llvm-commits mailing list