Changeset 92071 in webkit


Ignore:
Timestamp:
Jul 30, 2011 11:14:10 PM (13 years ago)
Author:
fpizlo@apple.com
Message:

DFG JIT speculation failure pass sometimes forgets to emit code to
move certain registers.
https://bugs.webkit.org/show_bug.cgi?id=65421

Reviewed by Oliver Hunt.

Restructured the offending loops (for gprs and fprs). It's once again
possible to use spreadsheets on docs.google.com.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r92068 r92071  
     12011-07-30  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG JIT speculation failure pass sometimes forgets to emit code to
     4        move certain registers.
     5        https://bugs.webkit.org/show_bug.cgi?id=65421
     6
     7        Reviewed by Oliver Hunt.
     8       
     9        Restructured the offending loops (for gprs and fprs).  It's once again
     10        possible to use spreadsheets on docs.google.com.
     11
     12        * dfg/DFGJITCompiler.cpp:
     13        (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
     14
    1152011-07-30  Patrick Gansterer  <paroga@webkit.org>
    216
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp

    r92024 r92071  
    567567    for (unsigned index = 0; index < GPRInfo::numberOfRegisters; ++index) {
    568568        NodeIndex nodeIndex = check.m_gprInfo[index].nodeIndex;
    569         if (nodeIndex == NoNode || check.m_gprInfo[index].isSpilled) {
     569       
     570        // Bail out if this register isn't assigned to anything.
     571        if (nodeIndex == NoNode) {
    570572            scratchGPR = GPRInfo::toRegister(index);
    571573            continue;
    572574        }
    573575       
     576        // If the non-speculative path also has a register for the nodeIndex that this
     577        // register stores, link them together.
    574578        NodeToRegisterMap::iterator mapIterator = entryNodeToRegisterMap.find(nodeIndex);
    575579        if (mapIterator != entryNodeToRegisterMap.end()) {
     
    580584            next->hasTo = true;
    581585           
     586            // If the non-speculative path has not spilled this register, then skip the spillin
     587            // part below regardless of whether or not the speculative path has spilled it.
    582588            if (!mapIterator->second.findInEntryLocation(entry).isSpilled)
    583589                continue;
    584590        }
    585591       
     592        // If the speculative path has already spilled the register then there is no need to
     593        // spill it.
     594        if (check.m_gprInfo[index].isSpilled)
     595            continue;
     596       
    586597        DataFormat dataFormat = check.m_gprInfo[index].format;
    587598        VirtualRegister virtualRegister = graph()[nodeIndex].virtualRegister();
    588 
     599       
    589600        ASSERT(dataFormat == DataFormatInteger || DataFormatCell || dataFormat & DataFormatJS);
    590601        if (dataFormat == DataFormatInteger)
     
    602613    for (unsigned index = 0; index < FPRInfo::numberOfRegisters; ++index) {
    603614        NodeIndex nodeIndex = check.m_fprInfo[index].nodeIndex;
    604         if (nodeIndex == NoNode || check.m_fprInfo[index].isSpilled)
     615        if (nodeIndex == NoNode)
    605616            continue;
    606617
     
    616627                continue;
    617628        }
     629       
     630        if (check.m_fprInfo[index].isSpilled)
     631            continue;
    618632
    619633        VirtualRegister virtualRegister = graph()[nodeIndex].virtualRegister();
Note: See TracChangeset for help on using the changeset viewer.