Ignore:
Timestamp:
Apr 29, 2018, 4:41:55 PM (7 years ago)
Author:
[email protected]
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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.