Title: [192544] trunk/Source/_javascript_Core
Revision
192544
Author
commit-qu...@webkit.org
Date
2015-11-17 15:10:14 -0800 (Tue, 17 Nov 2015)

Log Message

[JSC] Do not copy the adjacency list when we just need to manipulate them
https://bugs.webkit.org/show_bug.cgi?id=151343

Patch by Benjamin Poulain <bpoul...@apple.com> on 2015-11-17
Reviewed by Geoffrey Garen.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::precoloredCoalescingHeuristic):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::conservativeHeuristic):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (192543 => 192544)


--- trunk/Source/_javascript_Core/ChangeLog	2015-11-17 22:48:19 UTC (rev 192543)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-11-17 23:10:14 UTC (rev 192544)
@@ -1,5 +1,16 @@
 2015-11-17  Benjamin Poulain  <bpoul...@apple.com>
 
+        [JSC] Do not copy the adjacency list when we just need to manipulate them
+        https://bugs.webkit.org/show_bug.cgi?id=151343
+
+        Reviewed by Geoffrey Garen.
+
+        * b3/air/AirIteratedRegisterCoalescing.cpp:
+        (JSC::B3::Air::IteratedRegisterCoalescingAllocator::precoloredCoalescingHeuristic):
+        (JSC::B3::Air::IteratedRegisterCoalescingAllocator::conservativeHeuristic):
+
+2015-11-17  Benjamin Poulain  <bpoul...@apple.com>
+
         [JSC] Remove FTLOutput operations that act directly on floats
         https://bugs.webkit.org/show_bug.cgi?id=151342
 

Modified: trunk/Source/_javascript_Core/b3/air/AirIteratedRegisterCoalescing.cpp (192543 => 192544)


--- trunk/Source/_javascript_Core/b3/air/AirIteratedRegisterCoalescing.cpp	2015-11-17 22:48:19 UTC (rev 192543)
+++ trunk/Source/_javascript_Core/b3/air/AirIteratedRegisterCoalescing.cpp	2015-11-17 23:10:14 UTC (rev 192544)
@@ -464,7 +464,7 @@
         // If any adjacent of the non-colored node is not an adjacent of the colored node AND has a degree >= K
         // there is a risk that this node needs to have the same color as our precolored node. If we coalesce such
         // move, we may create an uncolorable graph.
-        auto adjacentsOfV = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(v)];
+        const auto& adjacentsOfV = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(v)];
         for (Tmp adjacentTmp : adjacentsOfV) {
             if (!adjacentTmp.isReg()
                 && !hasBeenSimplified(adjacentTmp)
@@ -486,8 +486,8 @@
         ASSERT(!u.isReg());
         ASSERT(!v.isReg());
 
-        auto adjacentsOfU = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(u)];
-        auto adjacentsOfV = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(v)];
+        const auto& adjacentsOfU = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(u)];
+        const auto& adjacentsOfV = m_adjacencyList[AbsoluteTmpHelper<type>::absoluteIndex(v)];
 
         if (adjacentsOfU.size() + adjacentsOfV.size() < m_numberOfRegisters) {
             // Shortcut: if the total number of adjacents is less than the number of register, the condition is always met.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to