Ignore:
Timestamp:
Apr 12, 2014, 4:01:33 PM (11 years ago)
Author:
[email protected]
Message:

Math.fround() should be an intrinsic
https://bugs.webkit.org/show_bug.cgi?id=131583

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Makes programs that use Math.fround() run up to 6x faster.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsic):

  • dfg/DFGCSEPhase.cpp:

(JSC::DFG::CSEPhase::performNodeCSE):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithFRound):

  • runtime/Intrinsic.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

LayoutTests:

Reviewed by Geoffrey Garen.

This test runs 4.4635x faster with the intrinsic.

  • js/regress/fround-expected.txt: Added.
  • js/regress/fround.html: Added.
  • js/regress/script-tests/fround.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r167187 r167189  
     12014-04-12  Filip Pizlo  <[email protected]>
     2
     3        Math.fround() should be an intrinsic
     4        https://bugs.webkit.org/show_bug.cgi?id=131583
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        Makes programs that use Math.fround() run up to 6x faster.
     9
     10        * dfg/DFGAbstractInterpreterInlines.h:
     11        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     12        * dfg/DFGByteCodeParser.cpp:
     13        (JSC::DFG::ByteCodeParser::handleIntrinsic):
     14        * dfg/DFGCSEPhase.cpp:
     15        (JSC::DFG::CSEPhase::performNodeCSE):
     16        * dfg/DFGClobberize.h:
     17        (JSC::DFG::clobberize):
     18        * dfg/DFGFixupPhase.cpp:
     19        (JSC::DFG::FixupPhase::fixupNode):
     20        * dfg/DFGNodeType.h:
     21        * dfg/DFGPredictionPropagationPhase.cpp:
     22        (JSC::DFG::PredictionPropagationPhase::propagate):
     23        * dfg/DFGSafeToExecute.h:
     24        (JSC::DFG::safeToExecute):
     25        * dfg/DFGSpeculativeJIT32_64.cpp:
     26        (JSC::DFG::SpeculativeJIT::compile):
     27        * dfg/DFGSpeculativeJIT64.cpp:
     28        (JSC::DFG::SpeculativeJIT::compile):
     29        * ftl/FTLCapabilities.cpp:
     30        (JSC::FTL::canCompile):
     31        * ftl/FTLLowerDFGToLLVM.cpp:
     32        (JSC::FTL::LowerDFGToLLVM::compileNode):
     33        (JSC::FTL::LowerDFGToLLVM::compileArithFRound):
     34        * runtime/Intrinsic.h:
     35        * runtime/MathObject.cpp:
     36        (JSC::MathObject::finishCreation):
     37
    1382014-04-12  Filip Pizlo  <[email protected]>
    239
Note: See TracChangeset for help on using the changeset viewer.