Changeset 90065 in webkit
- Timestamp:
- Jun 29, 2011 4:50:12 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r90063 r90065 1 2011-06-29 Gavin Barraclough <barraclough@apple.com> 2 3 Reviewed by Geoff Garen. 4 5 https://bugs.webkit.org/show_bug.cgi?id=63669 6 DFG JIT - fix spectral-norm regression 7 8 The problem is a mis-speculation leading to us falling off the speculative path. 9 Make the speculation logic slightly smarter, don't predict int if one of the 10 operands is already loaded as a double (we use this logic already for compares). 11 12 * dfg/DFGSpeculativeJIT.cpp: 13 (JSC::DFG::SpeculativeJIT::compile): 14 * dfg/DFGSpeculativeJIT.h: 15 (JSC::DFG::SpeculativeJIT::shouldSpeculateInteger): 16 1 17 2011-06-29 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r89961 r90065 562 562 case ValueAdd: 563 563 case ArithAdd: { 564 if ( isInteger(node.child1) || isInteger(node.child2)) {564 if (shouldSpeculateInteger(node.child1, node.child2)) { 565 565 if (isInt32Constant(node.child1)) { 566 566 int32_t imm1 = valueOfInt32Constant(node.child1); … … 618 618 619 619 case ArithSub: { 620 if ( isInteger(node.child1) || isInteger(node.child2)) {620 if (shouldSpeculateInteger(node.child1, node.child2)) { 621 621 if (isInt32Constant(node.child2)) { 622 622 SpeculateIntegerOperand op1(this, node.child1); … … 639 639 break; 640 640 } 641 641 642 SpeculateDoubleOperand op1(this, node.child1); 642 643 SpeculateDoubleOperand op2(this, node.child2); … … 652 653 653 654 case ArithMul: { 654 if ( isInteger(node.child1) && isInteger(node.child2)) {655 if (shouldSpeculateInteger(node.child1, node.child2)) { 655 656 SpeculateIntegerOperand op1(this, node.child1); 656 657 SpeculateIntegerOperand op2(this, node.child2); … … 669 670 break; 670 671 } 672 671 673 SpeculateDoubleOperand op1(this, node.child1); 672 674 SpeculateDoubleOperand op2(this, node.child2); … … 745 747 ASSERT(node.adjustedRefCount() == 1); 746 748 747 if ( compareIsInteger(node.child1, node.child2))749 if (shouldSpeculateInteger(node.child1, node.child2)) 748 750 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThan); 749 751 else … … 777 779 ASSERT(node.adjustedRefCount() == 1); 778 780 779 if ( compareIsInteger(node.child1, node.child2))781 if (shouldSpeculateInteger(node.child1, node.child2)) 780 782 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::LessThanOrEqual); 781 783 else … … 809 811 ASSERT(node.adjustedRefCount() == 1); 810 812 811 if ( compareIsInteger(node.child1, node.child2))813 if (shouldSpeculateInteger(node.child1, node.child2)) 812 814 compilePeepHoleIntegerBranch(node, branchNodeIndex, JITCompiler::Equal); 813 815 else -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r89961 r90065 180 180 } 181 181 182 bool compareIsInteger(NodeIndex op1, NodeIndex op2)182 bool shouldSpeculateInteger(NodeIndex op1, NodeIndex op2) 183 183 { 184 184 return !(isDataFormatDouble(op1) || isDataFormatDouble(op2)) && (isInteger(op1) || isInteger(op2));
Note: See TracChangeset
for help on using the changeset viewer.