|
| 1 | +2015-11-18 Mark Lam <mark.lam@apple.com> |
| 2 | + |
| 3 | + Remove some unnecessary jumps in snippet code. |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=151415 |
| 5 | + |
| 6 | + Reviewed by Geoffrey Garen. |
| 7 | + |
| 8 | + Previously, the snippet generators always emit a jump at the end of the fast |
| 9 | + path. In the baseline JIT and FTL, this results in a jump to the very next |
| 10 | + instruction. I've change it to assume that the fast path will just fall thru, |
| 11 | + and let the client decide instead if it wants/needs a jump or not after the fast |
| 12 | + path. |
| 13 | + |
| 14 | + I also changed the generators to provide a didEmitFastPath() query explicitly |
| 15 | + declare if they actually generated the fast path, instead of having the client |
| 16 | + infer it from an empty endJumpList. |
| 17 | + |
| 18 | + Benchmarks show that perf is neutral with this change (tested on x86_64). |
| 19 | + |
| 20 | + * dfg/DFGSpeculativeJIT.cpp: |
| 21 | + (JSC::DFG::SpeculativeJIT::compileValueAdd): |
| 22 | + (JSC::DFG::SpeculativeJIT::compileArithSub): |
| 23 | + * ftl/FTLCompile.cpp: |
| 24 | + (JSC::FTL::mmAllocateDataSection): |
| 25 | + * jit/JITAddGenerator.cpp: |
| 26 | + (JSC::JITAddGenerator::generateFastPath): |
| 27 | + * jit/JITAddGenerator.h: |
| 28 | + (JSC::JITAddGenerator::didEmitFastPath): |
| 29 | + (JSC::JITAddGenerator::endJumpList): |
| 30 | + (JSC::JITAddGenerator::slowPathJumpList): |
| 31 | + * jit/JITArithmetic.cpp: |
| 32 | + (JSC::JIT::emit_op_add): |
| 33 | + (JSC::JIT::emit_op_sub): |
| 34 | + * jit/JITSubGenerator.cpp: |
| 35 | + (JSC::JITSubGenerator::generateFastPath): |
| 36 | + * jit/JITSubGenerator.h: |
| 37 | + (JSC::JITSubGenerator::didEmitFastPath): |
| 38 | + (JSC::JITSubGenerator::endJumpList): |
| 39 | + (JSC::JITSubGenerator::slowPathJumpList): |
| 40 | + |
1 | 41 | 2015-11-18 Commit Queue <commit-queue@webkit.org> |
2 | 42 |
|
3 | 43 | Unreviewed, rolling out r192436 and r192586. |
|
0 commit comments