no bug: Fix the spew that was messed up in a merge, and refactor control flow a bit (r=sunfish)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Tue, 15 Jul 2014 03:34:07 -0400
changeset 215955 60b9b810aa29725cdd6fff2b2656d6781991f1d7
parent 215954 cc1776b2606d9d7a00b467b0d1d309f6f83477b1
child 215956 414ac77b7f2d6eb48f96d991414b78459a3b42c5
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
no bug: Fix the spew that was messed up in a merge, and refactor control flow a bit (r=sunfish)
js/src/jit/BacktrackingAllocator.cpp
--- a/js/src/jit/BacktrackingAllocator.cpp
+++ b/js/src/jit/BacktrackingAllocator.cpp
@@ -771,37 +771,36 @@ BacktrackingAllocator::tryAllocateRegist
 
     JS_ASSERT_IF(interval->requirement()->kind() == Requirement::FIXED,
                  interval->requirement()->allocation() == LAllocation(r.reg));
 
     for (size_t i = 0; i < interval->numRanges(); i++) {
         AllocatedRange range(interval, interval->getRange(i)), existing;
         for (size_t a = 0; a < r.reg.numAliased(); a++) {
             PhysicalRegister &rAlias = registers[r.reg.aliased(a).code()];
-            if (rAlias.allocations.contains(range, &existing)) {
-                if (existing.interval->hasVreg()) {
-                    if (IonSpewEnabled(IonSpew_RegAlloc)) {
+            if (!rAlias.allocations.contains(range, &existing))
+                continue;
+            if (existing.interval->hasVreg()) {
+                if (IonSpewEnabled(IonSpew_RegAlloc)) {
                     IonSpew(IonSpew_RegAlloc, "  %s collides with v%u[%u] %s [weight %lu]",
+                            rAlias.reg.name(), existing.interval->vreg(),
+                            existing.interval->index(),
                             existing.range->toString(),
-                                rAlias.reg.name(), existing.interval->vreg(),
-                                existing.interval->index(),
-                                existing.range->toString(),
-                                computeSpillWeight(existing.interval));
-                    }
-                    if (!*pconflicting || computeSpillWeight(existing.interval) < computeSpillWeight(*pconflicting))
-                        *pconflicting = existing.interval;
-                } else {
-                    if (IonSpewEnabled(IonSpew_RegAlloc)) {
+                            computeSpillWeight(existing.interval));
+                }
+                if (!*pconflicting || computeSpillWeight(existing.interval) < computeSpillWeight(*pconflicting))
+                    *pconflicting = existing.interval;
+            } else {
+                if (IonSpewEnabled(IonSpew_RegAlloc)) {
                     IonSpew(IonSpew_RegAlloc, "  %s collides with fixed use %s",
-                                rAlias.reg.name(), existing.range->toString());
-                    }
-                    *pfixed = true;
+                            rAlias.reg.name(), existing.range->toString());
                 }
-                return true;
+                *pfixed = true;
             }
+            return true;
         }
     }
 
     IonSpew(IonSpew_RegAlloc, "  allocated to %s", r.reg.name());
 
     for (size_t i = 0; i < interval->numRanges(); i++) {
         AllocatedRange range(interval, interval->getRange(i));
         if (!r.allocations.insert(range))