DFG speculative JIT has dead code for slow calls for branches.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jul 2011 23:14:09 +0000 (23:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Jul 2011 23:14:09 +0000 (23:14 +0000)
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

index aeaa5a7..3ee37ea 100644 (file)
@@ -1,3 +1,15 @@
+2011-07-16  Filip Pizlo  <fpizlo@apple.com>
+
+        DFG speculative JIT has dead code for slow calls for branches.
+        https://bugs.webkit.org/show_bug.cgi?id=64653
+
+        Reviewed by Gavin Barraclough.
+        
+        Removed SpeculativeJIT::compilePeepHoleCall.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        * dfg/DFGSpeculativeJIT.h:
+
 2011-07-15  Mark Rowe  <mrowe@apple.com>
 
         Fix the build.
index 76740c4..3394d64 100644 (file)
@@ -380,37 +380,6 @@ void SpeculativeJIT::compilePeepHoleIntegerBranch(Node& node, NodeIndex branchNo
         addBranch(m_jit.jump(), notTaken);
 }
 
-void SpeculativeJIT::compilePeepHoleCall(Node& node, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ operation)
-{
-    Node& branchNode = m_jit.graph()[branchNodeIndex];
-    BlockIndex taken = m_jit.graph().blockIndexForBytecodeOffset(branchNode.takenBytecodeOffset());
-    BlockIndex notTaken = m_jit.graph().blockIndexForBytecodeOffset(branchNode.notTakenBytecodeOffset());
-
-    // The branch instruction will branch to the taken block.
-    // If taken is next, switch taken with notTaken & invert the branch condition so we can fall through.
-    JITCompiler::ResultCondition condition = JITCompiler::NonZero;
-    if (taken == (m_block + 1)) {
-        condition = JITCompiler::Zero;
-        BlockIndex tmp = taken;
-        taken = notTaken;
-        notTaken = tmp;
-    }
-
-    JSValueOperand op1(this, node.child1());
-    JSValueOperand op2(this, node.child2());
-    GPRReg op1GPR = op1.gpr();
-    GPRReg op2GPR = op2.gpr();
-    flushRegisters();
-
-    GPRResult result(this);
-    callOperation(operation, result.gpr(), op1GPR, op2GPR);
-    addBranch(m_jit.branchTest8(condition, result.gpr()), taken);
-
-    // Check for fall through, otherwise we need to jump.
-    if (notTaken != (m_block + 1))
-        addBranch(m_jit.jump(), notTaken);
-}
-
 // Returns true if the compare is fused with a subsequent branch.
 bool SpeculativeJIT::compare(Node& node, MacroAssembler::RelationalCondition condition, Z_DFGOperation_EJJ operation)
 {
index aef80ef..10e06e7 100644 (file)
@@ -171,7 +171,6 @@ private:
 
     bool compare(Node&, MacroAssembler::RelationalCondition, Z_DFGOperation_EJJ);
     void compilePeepHoleIntegerBranch(Node&, NodeIndex branchNodeIndex, JITCompiler::RelationalCondition);
-    void compilePeepHoleCall(Node&, NodeIndex branchNodeIndex, Z_DFGOperation_EJJ);
 
     // Add a speculation check without additional recovery.
     void speculationCheck(MacroAssembler::Jump jumpToFail)