Changeset 121073 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Jun 22, 2012, 4:32:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r121058 r121073 1 2012-06-22 Filip Pizlo <[email protected]> 2 3 DFG tier-up should happen in prologues, not epilogues 4 https://bugs.webkit.org/show_bug.cgi?id=89752 5 6 Reviewed by Geoffrey Garen. 7 8 This change has two outcomes: 9 10 1) Slightly reduces the likelihood that a function will be optimized both 11 standalone and via inlining. Previously, if you had a call sequence like foo() 12 calls bar() exactly once, and nobody else calls bar(), then bar() would get 13 optimized first (because it returns first) and then foo() gets optimized. If foo() 14 can inline bar() then that means that bar() gets optimized twice. But now, if we 15 optimize in prologues, then foo() will be optimized first. If it inlines bar(), 16 that means that there will no longer be any calls to bar(). 17 18 2) It lets us kill some code in JITStubs. Epilogue tier-up was very different from 19 loop tier-up, since epilogue tier-up should not attempt OSR. But prologue tier-up 20 requires OSR (albeit really easy OSR since it's the top of the compilation unit), 21 so it becomes just like loop tier-up. As a result, we now have one optimization 22 hook (cti_optimize) instead of two (cti_optimize_from_loop and 23 cti_optimize_from_ret). 24 25 As a consequence of not having an optimization check in epilogues, the OSR exit 26 code must now trigger reoptimization itself instead of just signaling the epilogue 27 check to fire. 28 29 This also adds the ability to count the number of DFG compilations, which was 30 useful for debugging this patch and might be useful for other things in the future. 31 32 * bytecode/CodeBlock.cpp: 33 (JSC::CodeBlock::reoptimize): 34 (JSC): 35 * bytecode/CodeBlock.h: 36 (CodeBlock): 37 * dfg/DFGByteCodeParser.cpp: 38 (JSC::DFG::ByteCodeParser::parseCodeBlock): 39 * dfg/DFGDriver.cpp: 40 (DFG): 41 (JSC::DFG::getNumCompilations): 42 (JSC::DFG::compile): 43 * dfg/DFGDriver.h: 44 (DFG): 45 * dfg/DFGOSRExitCompiler.cpp: 46 (JSC::DFG::OSRExitCompiler::handleExitCounts): 47 * dfg/DFGOperations.cpp: 48 * dfg/DFGOperations.h: 49 * jit/JIT.cpp: 50 (JSC::JIT::emitOptimizationCheck): 51 * jit/JIT.h: 52 * jit/JITCall32_64.cpp: 53 (JSC::JIT::emit_op_ret): 54 (JSC::JIT::emit_op_ret_object_or_this): 55 * jit/JITOpcodes.cpp: 56 (JSC::JIT::emit_op_ret): 57 (JSC::JIT::emit_op_ret_object_or_this): 58 (JSC::JIT::emit_op_enter): 59 * jit/JITOpcodes32_64.cpp: 60 (JSC::JIT::emit_op_enter): 61 * jit/JITStubs.cpp: 62 (JSC::DEFINE_STUB_FUNCTION): 63 * jit/JITStubs.h: 64 1 65 2012-06-20 Mark Hahnenberg <[email protected]> 2 66
Note:
See TracChangeset
for help on using the changeset viewer.