Ignore:
Timestamp:
Aug 18, 2011, 5:18:49 PM (14 years ago)
Author:
[email protected]
Message:

DFG non-speculative JIT does not inline the double case of ValueAdd
https://bugs.webkit.org/show_bug.cgi?id=66025

Reviewed by Gavin Barraclough.

This is a 1.3% win on Kraken overall, with >=8% speed-ups on a few
benchmarks (imaging-darkroom, stanford-crypto-pbkdf2,
stanford-crypto-sha256-iterative). It looks like it might have
a speed-up in SunSpider (though not statistically significant or
particularly reproducible) and a slight slow-down in V8 (0.14%,
not statistically significant). It does slow down v8-crypto by
1.5%.

  • dfg/DFGJITCodeGenerator.cpp:

(JSC::DFG::JITCodeGenerator::isKnownInteger):
(JSC::DFG::JITCodeGenerator::isKnownNumeric):

  • dfg/DFGNonSpeculativeJIT.cpp:

(JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
(JSC::DFG::NonSpeculativeJIT::basicArithOp):

  • dfg/DFGOperations.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r93070 r93375  
    124124    JSValue op1 = JSValue::decode(encodedOp1);
    125125    JSValue op2 = JSValue::decode(encodedOp2);
    126 
    127     if (op1.isInt32() && op2.isInt32()) {
    128         int64_t result64 = static_cast<int64_t>(op1.asInt32()) + static_cast<int64_t>(op2.asInt32());
    129         int32_t result32 = static_cast<int32_t>(result64);
    130         if (LIKELY(result32 == result64))
    131             return JSValue::encode(jsNumber(result32));
    132         return JSValue::encode(jsNumber((double)result64));
    133     }
    134    
    135     double number1;
    136     double number2;
    137     if (op1.getNumber(number1) && op2.getNumber(number2))
    138         return JSValue::encode(jsNumber(number1 + number2));
     126   
     127    ASSERT(!op1.isNumber() || !op2.isNumber());
    139128
    140129    return JSValue::encode(jsAddSlowCase(exec, op1, op2));
Note: See TracChangeset for help on using the changeset viewer.