Ignore:
Timestamp:
Dec 28, 2011, 8:33:20 PM (13 years ago)
Author:
[email protected]
Message:

spill unboxed values in DFG 32_64
https://bugs.webkit.org/show_bug.cgi?id=75291

Reviewed by Filip Pizlo.

Currently all the values are spilled as boxed in DFG 32_64, which is
not necessary and introduces additional stores/loads. Instead we
can spill them as unboxed if feasible. It can be applied to the
Integers, Cells and Booleans in DFG 32_64. Doubles are left as is
because they don't need to be boxed at all. The modifications to the
spill/fill and the OSR exit are required, as well as a bug fix to the
"isUnknownJS" logic.

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::displacedInRegisterFile):
(JSC::ValueRecovery::virtualRegister):
(JSC::ValueRecovery::dump):

  • dfg/DFGGenerationInfo.h:

(JSC::DFG::GenerationInfo::isUnknownJS):
(JSC::DFG::GenerationInfo::spill):

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::isKnownNotBoolean):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::silentFillGPR):
(JSC::DFG::SpeculativeJIT::spill):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::fillDouble):
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compile):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/ValueRecovery.h

    r102743 r103792  
    6363    Int32DisplacedInRegisterFile,
    6464    DoubleDisplacedInRegisterFile,
     65    CellDisplacedInRegisterFile,
     66    BooleanDisplacedInRegisterFile,
    6567    // It's a constant.
    6668    Constant,
     
    167169            break;
    168170
     171        case DataFormatCell:
     172            result.m_technique = CellDisplacedInRegisterFile;
     173            break;
     174           
     175        case DataFormatBoolean:
     176            result.m_technique = BooleanDisplacedInRegisterFile;
     177            break;
     178           
    169179        default:
    170180            ASSERT(dataFormat != DataFormatNone && dataFormat != DataFormatStorage);
     
    230240    VirtualRegister virtualRegister() const
    231241    {
    232         ASSERT(m_technique == DisplacedInRegisterFile || m_technique == Int32DisplacedInRegisterFile || m_technique == DoubleDisplacedInRegisterFile);
     242        ASSERT(m_technique == DisplacedInRegisterFile || m_technique == Int32DisplacedInRegisterFile || m_technique == DoubleDisplacedInRegisterFile || m_technique == CellDisplacedInRegisterFile || m_technique == BooleanDisplacedInRegisterFile);
    233243        return m_source.virtualReg;
    234244    }
     
    287297        case DoubleDisplacedInRegisterFile:
    288298            fprintf(out, "*double(%d)", virtualRegister());
     299            break;
     300        case CellDisplacedInRegisterFile:
     301            fprintf(out, "*cell(%d)", virtualRegister());
     302            break;
     303        case BooleanDisplacedInRegisterFile:
     304            fprintf(out, "*bool(%d)", virtualRegister());
    289305            break;
    290306        case Constant:
Note: See TracChangeset for help on using the changeset viewer.