Title: [195939] trunk/Source/_javascript_Core
Revision
195939
Author
[email protected]
Date
2016-01-31 16:07:06 -0800 (Sun, 31 Jan 2016)

Log Message

B3->Air lowering should use MoveFloat more
https://bugs.webkit.org/show_bug.cgi?id=153714

Reviewed by Sam Weinig.

This is a very minor and benign bug. It just means that we will use the more canonical
MoveFloat instruction when moving floats, rather than using MoveDouble.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::relaxedMoveForType):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (195938 => 195939)


--- trunk/Source/_javascript_Core/ChangeLog	2016-01-31 23:05:10 UTC (rev 195938)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-02-01 00:07:06 UTC (rev 195939)
@@ -1,3 +1,16 @@
+2016-01-30  Filip Pizlo  <[email protected]>
+
+        B3->Air lowering should use MoveFloat more
+        https://bugs.webkit.org/show_bug.cgi?id=153714
+
+        Reviewed by Sam Weinig.
+
+        This is a very minor and benign bug. It just means that we will use the more canonical
+        MoveFloat instruction when moving floats, rather than using MoveDouble.
+
+        * b3/B3LowerToAir.cpp:
+        (JSC::B3::Air::LowerToAir::relaxedMoveForType):
+
 2016-01-31  Yusuke Suzuki  <[email protected]>
 
         Should not predict OtherObj for ToThis with primitive types under strict mode

Modified: trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp (195938 => 195939)


--- trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2016-01-31 23:05:10 UTC (rev 195938)
+++ trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2016-02-01 00:07:06 UTC (rev 195939)
@@ -855,8 +855,25 @@
         switch (type) {
         case Int32:
         case Int64:
+            // For Int32, we could return Move or Move32. It's a trade-off.
+            //
+            // Move32: Using Move32 guarantees that we use the narrower move, but in cases where the
+            //     register allocator can't prove that the variables involved are 32-bit, this will
+            //     disable coalescing.
+            //
+            // Move: Using Move guarantees that the register allocator can coalesce normally, but in
+            //     cases where it can't prove that the variables are 32-bit and it doesn't coalesce,
+            //     this will force us to use a full 64-bit Move instead of the slightly cheaper
+            //     32-bit Move32.
+            //
+            // Coalescing is a lot more profitable than turning Move into Move32. So, it's better to
+            // use Move here because in cases where the register allocator cannot prove that
+            // everything is 32-bit, we still get coalescing.
             return Move;
         case Float:
+            // MoveFloat is always coalescable and we never convert MoveDouble to MoveFloat, so we
+            // should use MoveFloat when we know that the temporaries involved are 32-bit.
+            return MoveFloat;
         case Double:
             return MoveDouble;
         case Void:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to