Changeset 231154 in webkit


Ignore:
Timestamp:
Apr 29, 2018 4:41:55 PM (6 years ago)
Author:
fpizlo@apple.com
Message:

B3 should run tail duplication at the bitter end
https://bugs.webkit.org/show_bug.cgi?id=185123

Reviewed by Geoffrey Garen.

Also added an option to disable taildup. This appears to be a 1% AsmBench speed-up. It's neutral
everywhere else.

The goal of this change is to allow us to run path specialization after switch lowering but
before tail duplication.

  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • runtime/Options.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r231147 r231154  
     12018-04-29  Filip Pizlo  <fpizlo@apple.com>
     2
     3        B3 should run tail duplication at the bitter end
     4        https://bugs.webkit.org/show_bug.cgi?id=185123
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        Also added an option to disable taildup. This appears to be a 1% AsmBench speed-up. It's neutral
     9        everywhere else.
     10       
     11        The goal of this change is to allow us to run path specialization after switch lowering but
     12        before tail duplication.
     13
     14        * b3/B3Generate.cpp:
     15        (JSC::B3::generateToAir):
     16        * runtime/Options.h:
     17
    1182018-04-29  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/JavaScriptCore/b3/B3Generate.cpp

    r231116 r231154  
    8181    if (shouldValidateIR())
    8282        validate(procedure);
    83 
     83   
    8484    if (procedure.optLevel() >= 2) {
    8585        reduceDoubleToFloat(procedure);
     
    8888        if (eliminateCommonSubexpressions(procedure))
    8989            eliminateCommonSubexpressions(procedure);
    90         foldPathConstants(procedure);
    91         reduceStrength(procedure);
    9290        inferSwitches(procedure);
    93         duplicateTails(procedure);
    94         fixSSA(procedure);
    95         foldPathConstants(procedure);
    9691       
    9792        // FIXME: Add more optimizations here.
     
    106101
    107102    if (procedure.optLevel() >= 2) {
     103        reduceStrength(procedure);
     104        if (Options::useB3TailDup())
     105            duplicateTails(procedure);
     106        fixSSA(procedure);
     107        foldPathConstants(procedure);
    108108        reduceStrength(procedure);
    109109
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r231047 r231154  
    438438    v(bool, coalesceSpillSlots, true, Normal, nullptr) \
    439439    v(bool, logAirRegisterPressure, false, Normal, nullptr) \
     440    v(bool, useB3TailDup, true, Normal, nullptr) \
    440441    v(unsigned, maxB3TailDupBlockSize, 3, Normal, nullptr) \
    441442    v(unsigned, maxB3TailDupBlockSuccessors, 3, Normal, nullptr) \
Note: See TracChangeset for help on using the changeset viewer.