Changeset 91156 in webkit


Ignore:
Timestamp:
Jul 16, 2011 4:14:09 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

DFG speculative JIT has dead code for slow calls for branches.
https://bugs.webkit.org/show_bug.cgi?id=64653

Patch by Filip Pizlo <fpizlo@apple.com> on 2011-07-16
Reviewed by Gavin Barraclough.

Removed SpeculativeJIT::compilePeepHoleCall.

  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r91131 r91156  
     12011-07-16  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG speculative JIT has dead code for slow calls for branches.
     4        https://bugs.webkit.org/show_bug.cgi?id=64653
     5
     6        Reviewed by Gavin Barraclough.
     7       
     8        Removed SpeculativeJIT::compilePeepHoleCall.
     9
     10        * dfg/DFGSpeculativeJIT.cpp:
     11        * dfg/DFGSpeculativeJIT.h:
     12
    1132011-07-15  Mark Rowe  <mrowe@apple.com>
    214
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r91099 r91156  
    381381}
    382382
    383 void SpeculativeJIT::compilePeepHoleCall(Node& node, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ operation)
    384 {
    385     Node& branchNode = m_jit.graph()[branchNodeIndex];
    386     BlockIndex taken = m_jit.graph().blockIndexForBytecodeOffset(branchNode.takenBytecodeOffset());
    387     BlockIndex notTaken = m_jit.graph().blockIndexForBytecodeOffset(branchNode.notTakenBytecodeOffset());
    388 
    389     // The branch instruction will branch to the taken block.
    390     // If taken is next, switch taken with notTaken & invert the branch condition so we can fall through.
    391     JITCompiler::ResultCondition condition = JITCompiler::NonZero;
    392     if (taken == (m_block + 1)) {
    393         condition = JITCompiler::Zero;
    394         BlockIndex tmp = taken;
    395         taken = notTaken;
    396         notTaken = tmp;
    397     }
    398 
    399     JSValueOperand op1(this, node.child1());
    400     JSValueOperand op2(this, node.child2());
    401     GPRReg op1GPR = op1.gpr();
    402     GPRReg op2GPR = op2.gpr();
    403     flushRegisters();
    404 
    405     GPRResult result(this);
    406     callOperation(operation, result.gpr(), op1GPR, op2GPR);
    407     addBranch(m_jit.branchTest8(condition, result.gpr()), taken);
    408 
    409     // Check for fall through, otherwise we need to jump.
    410     if (notTaken != (m_block + 1))
    411         addBranch(m_jit.jump(), notTaken);
    412 }
    413 
    414383// Returns true if the compare is fused with a subsequent branch.
    415384bool SpeculativeJIT::compare(Node& node, MacroAssembler::RelationalCondition condition, Z_DFGOperation_EJJ operation)
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r91099 r91156  
    172172    bool compare(Node&, MacroAssembler::RelationalCondition, Z_DFGOperation_EJJ);
    173173    void compilePeepHoleIntegerBranch(Node&, NodeIndex branchNodeIndex, JITCompiler::RelationalCondition);
    174     void compilePeepHoleCall(Node&, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ);
    175174
    176175    // Add a speculation check without additional recovery.
Note: See TracChangeset for help on using the changeset viewer.