Ignore:
Timestamp:
Oct 28, 2019, 1:44:03 PM (6 years ago)
Author:
[email protected]
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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r251584 r251669  
    1529615296       
    1529715297        m_out.appendTo(slowPath, continuation);
    15298         results.append(m_out.anchor(m_out.call(Int32, m_out.operation(operationToInt32), doubleValue)));
     15298        results.append(m_out.anchor(m_out.callWithoutSideEffects(Int32, operationToInt32, doubleValue)));
    1529915299        m_out.jump(continuation);
    1530015300       
     
    1533615336       
    1533715337        LBasicBlock lastNext = m_out.appendTo(slowPath, continuation);
    15338         ValueFromBlock slowResult = m_out.anchor(
    15339             m_out.call(Int32, m_out.operation(operationToInt32SensibleSlow), doubleValue));
     15338        ValueFromBlock slowResult = m_out.anchor(m_out.callWithoutSideEffects(Int32, operationToInt32SensibleSlow, doubleValue));
    1534015339        m_out.jump(continuation);
    1534115340       
     
    1603016029        m_out.appendTo(doubleCase, continuation);
    1603116030       
    16032         LValue possibleResult = m_out.call(
    16033             Int64, m_out.operation(operationConvertBoxedDoubleToInt52), boxedValue);
     16031        LValue possibleResult = m_out.callWithoutSideEffects(Int64, operationConvertBoxedDoubleToInt52, boxedValue);
    1603416032        FTL_TYPE_CHECK(
    1603516033            jsValueValue(boxedValue), edge, SpecInt32Only | SpecAnyIntAsDouble,
Note: See TracChangeset for help on using the changeset viewer.