Title: [251669] trunk/Source/_javascript_Core
Revision
251669
Author
ysuz...@apple.com
Date
2019-10-28 13:44:03 -0700 (Mon, 28 Oct 2019)

Log Message

[JSC] Use FTLOutput::callWithoutSideEffects if operation does not have side effects
https://bugs.webkit.org/show_bug.cgi?id=203485

Reviewed by Mark Lam.

This makes Call's Effect none, and encourages optimizations around it.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (251668 => 251669)


--- trunk/Source/_javascript_Core/ChangeLog	2019-10-28 20:32:16 UTC (rev 251668)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-10-28 20:44:03 UTC (rev 251669)
@@ -1,3 +1,17 @@
+2019-10-28  Yusuke Suzuki  <ysuz...@apple.com>
+
+        [JSC] Use FTLOutput::callWithoutSideEffects if operation does not have side effects
+        https://bugs.webkit.org/show_bug.cgi?id=203485
+
+        Reviewed by Mark Lam.
+
+        This makes Call's Effect none, and encourages optimizations around it.
+
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
+        (JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
+        (JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
+
 2019-10-28  Tuomas Karkkainen  <tuomas.web...@apple.com>
 
         dumpSpeculation in SpeculatedType.cpp prints to the wrong stream and has wrong capitalization for NaN

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (251668 => 251669)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2019-10-28 20:32:16 UTC (rev 251668)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2019-10-28 20:44:03 UTC (rev 251669)
@@ -15295,7 +15295,7 @@
         m_out.jump(continuation);
         
         m_out.appendTo(slowPath, continuation);
-        results.append(m_out.anchor(m_out.call(Int32, m_out.operation(operationToInt32), doubleValue)));
+        results.append(m_out.anchor(m_out.callWithoutSideEffects(Int32, operationToInt32, doubleValue)));
         m_out.jump(continuation);
         
         m_out.appendTo(continuation, lastNext);
@@ -15335,8 +15335,7 @@
             rarely(slowPath), usually(continuation));
         
         LBasicBlock lastNext = m_out.appendTo(slowPath, continuation);
-        ValueFromBlock slowResult = m_out.anchor(
-            m_out.call(Int32, m_out.operation(operationToInt32SensibleSlow), doubleValue));
+        ValueFromBlock slowResult = m_out.anchor(m_out.callWithoutSideEffects(Int32, operationToInt32SensibleSlow, doubleValue));
         m_out.jump(continuation);
         
         m_out.appendTo(continuation, lastNext);
@@ -16029,8 +16028,7 @@
             
         m_out.appendTo(doubleCase, continuation);
         
-        LValue possibleResult = m_out.call(
-            Int64, m_out.operation(operationConvertBoxedDoubleToInt52), boxedValue);
+        LValue possibleResult = m_out.callWithoutSideEffects(Int64, operationConvertBoxedDoubleToInt52, boxedValue);
         FTL_TYPE_CHECK(
             jsValueValue(boxedValue), edge, SpecInt32Only | SpecAnyIntAsDouble,
             m_out.equal(possibleResult, m_out.constInt64(JSValue::notInt52)));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to