Changeset 191978 in webkit
- Timestamp:
- Nov 3, 2015 2:13:52 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r191977 r191978 1 2015-11-03 Mark Lam <mark.lam@apple.com> 2 3 Fix some inefficiencies in the baseline usage of JITAddGenerator. 4 https://bugs.webkit.org/show_bug.cgi?id=150850 5 6 Reviewed by Michael Saboff. 7 8 1. emit_op_add() was loading the operands twice. Removed the redundant load. 9 2. The snippet may decide that it wants to go the slow path route all the time. 10 In that case, emit_op_add will end up emitting a branch to an out of line 11 slow path followed by some dead code to store the result of the fast path 12 on to the stack. 13 We now check if the snippet determined that there's no fast path, and just 14 emit the slow path inline, and skip the dead store of the fast path result. 15 16 * jit/JITArithmetic.cpp: 17 (JSC::JIT::emit_op_add): 18 1 19 2015-11-03 Filip Pizlo <fpizlo@apple.com> 2 20 -
trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
r191905 r191978 933 933 #endif 934 934 935 emitGetVirtualRegister(op1, leftRegs);936 emitGetVirtualRegister(op2, rightRegs);937 938 935 bool leftIsConstInt32 = isOperandConstantInt(op1); 939 936 bool rightIsConstInt32 = isOperandConstantInt(op2); … … 969 966 970 967 gen.generateFastPath(*this); 971 gen.endJumpList().link(this); 972 emitPutVirtualRegister(result, resultRegs); 973 974 addSlowCase(gen.slowPathJumpList()); 968 969 if (!gen.endJumpList().empty()) { 970 gen.endJumpList().link(this); 971 emitPutVirtualRegister(result, resultRegs); 972 973 addSlowCase(gen.slowPathJumpList()); 974 } else { 975 gen.slowPathJumpList().link(this); 976 JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_add); 977 slowPathCall.call(); 978 } 975 979 } 976 980
Note: See TracChangeset
for help on using the changeset viewer.