Changeset 194820 in webkit


Ignore:
Timestamp:
Jan 9, 2016 7:23:56 AM (8 years ago)
Author:
mark.lam@apple.com
Message:

The FTL allocated spill slots for BinaryOps is sometimes inaccurate.
https://bugs.webkit.org/show_bug.cgi?id=152918

Reviewed by Filip Pizlo and Saam Barati.

  • ftl/FTLCompile.cpp:
  • Updated a comment.
  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::lower):

  • The code to compute maxNumberOfCatchSpills was unnecessarily allocating an extra slot for BinaryOps that don't have Untyped operands, and failing to allocate that extra slot for some binary ops. This is now fixed.
  • tests/stress/ftl-shr-exception.js:
  • tests/stress/ftl-xor-exception.js:
  • Un-skipped these tests. They now pass with this patch.
Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r194819 r194820  
     12016-01-09  Mark Lam  <mark.lam@apple.com>
     2
     3        The FTL allocated spill slots for BinaryOps is sometimes inaccurate.
     4        https://bugs.webkit.org/show_bug.cgi?id=152918
     5
     6        Reviewed by Filip Pizlo and Saam Barati.
     7
     8        * ftl/FTLCompile.cpp:
     9        - Updated a comment.
     10        * ftl/FTLLowerDFGToLLVM.cpp:
     11        (JSC::FTL::DFG::LowerDFGToLLVM::lower):
     12        - The code to compute maxNumberOfCatchSpills was unnecessarily allocating an
     13          extra slot for BinaryOps that don't have Untyped operands, and failing to
     14          allocate that extra slot for some binary ops.  This is now fixed.
     15
     16        * tests/stress/ftl-shr-exception.js:
     17        * tests/stress/ftl-xor-exception.js:
     18        - Un-skipped these tests.  They now pass with this patch.
     19
    1202016-01-09  Andreas Kling  <akling@apple.com>
    221
  • trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp

    r194496 r194820  
    544544                }
    545545
    546                 // Subs and GetByIds have an interesting register preservation story,
     546                // BinaryOps and GetByIds have an interesting register preservation story,
    547547                // see comment below at GetById to read about it.
    548548                //
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

    r194805 r194820  
    263263                    case ArithMul:
    264264                    case ArithSub:
     265                    case ValueAdd:
     266                    case DFG::BitAnd:
     267                    case DFG::BitOr:
     268                    case DFG::BitXor:
     269                    case BitLShift:
     270                    case BitRShift:
     271                    case BitURShift:
     272                        if (!node->isBinaryUseKind(UntypedUse))
     273                            break; // We only compile patchpoints for UntypedUse.
     274                        FALLTHROUGH;
     275
    265276                    case GetById:
    266                     case GetByIdFlush:
    267                     case ValueAdd: {
    268                         // We may have to flush one thing for GetByIds/ArithSubs when the base and result or the left/right and the result
     277                    case GetByIdFlush: {
     278                        // We may have to flush one thing for GetByIds/ binary ops when the base and result or the left/right and the result
    269279                        // are assigned the same register. For a more comprehensive overview, look at the comment in FTLCompile.cpp
    270                         if (node->op() == ArithSub && node->binaryUseKind() != UntypedUse)
    271                             break; // We only compile patchpoints for ArithSub UntypedUse.
    272280                        CodeOrigin opCatchOrigin;
    273281                        HandlerInfo* exceptionHandler;
  • trunk/Source/JavaScriptCore/tests/stress/ftl-shr-exception.js

    r194747 r194820  
    1 //@ skip
    2 
    31function foo(a, b) {
    42    try {
  • trunk/Source/JavaScriptCore/tests/stress/ftl-xor-exception.js

    r194747 r194820  
    1 //@ skip
    2 
    31function foo(a, b) {
    42    try {
Note: See TracChangeset for help on using the changeset viewer.