Ignore:
Timestamp:
Apr 12, 2014, 1:41:41 PM (11 years ago)
Author:
[email protected]
Message:

FTL should use stackmap register liveness
https://bugs.webkit.org/show_bug.cgi?id=130791

Reviewed by Goeffrey Garen.

Enable the stackmap register liveness support by fixing the two last bugs:

  • If everything is dead after the patchpoint - a good possibility for a put_by_id - then we shouldn't crash due to a null scratch buffer.


  • Always consider callee-saves as if they were live. More precisely, we should consider those callee-saves that are not saved by the enclosing function to be live. For now we do the much simpler thing and consider callee-saves to be always live since it has minimal impact on the scratch register allocator. It will know not to preserve those for calls, anyway.


I tried writing a test for the null scratch buffer thing, but failed. I will land the
test anyway since it seems useful.

  • ftl/FTLCompile.cpp:

(JSC::FTL::usedRegistersFor):

  • jit/ScratchRegisterAllocator.cpp:

(JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall):
(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):

  • runtime/Options.h:
  • tests/stress/repeated-put-by-id-reallocating-transition.js: Added.

(foo):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r167182 r167187  
     12014-04-12  Filip Pizlo  <[email protected]>
     2
     3        FTL should use stackmap register liveness
     4        https://bugs.webkit.org/show_bug.cgi?id=130791
     5
     6        Reviewed by Goeffrey Garen.
     7       
     8        Enable the stackmap register liveness support by fixing the two last bugs:
     9       
     10        - If everything is dead after the patchpoint - a good possibility for a put_by_id -
     11          then we shouldn't crash due to a null scratch buffer.
     12       
     13        - Always consider callee-saves as if they were live. More precisely, we should
     14          consider those callee-saves that are not saved by the enclosing function to be live.
     15          For now we do the much simpler thing and consider callee-saves to be always live
     16          since it has minimal impact on the scratch register allocator. It will know not to
     17          preserve those for calls, anyway.
     18       
     19        I tried writing a test for the null scratch buffer thing, but failed. I will land the
     20        test anyway since it seems useful.
     21
     22        * ftl/FTLCompile.cpp:
     23        (JSC::FTL::usedRegistersFor):
     24        * jit/ScratchRegisterAllocator.cpp:
     25        (JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBufferForCall):
     26        (JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):
     27        * runtime/Options.h:
     28        * tests/stress/repeated-put-by-id-reallocating-transition.js: Added.
     29        (foo):
     30
    1312014-04-11  Filip Pizlo  <[email protected]>
    232
Note: See TracChangeset for help on using the changeset viewer.