Bug 89752

Summary: DFG tier-up should happen in prologues, not epilogues
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
webkit-ews: commit-queue-
the patch ggaren: review+

Filip Pizlo
Reported 2012-06-22 02:22:58 PDT
This change has two outcomes: 1) Slightly reduces the likelihood that a function will be optimized both standalone and via inlining. Previously, if you had a call sequence like foo() calls bar() exactly once, and nobody else calls bar(), then bar() would get optimized first (because it returns first) and then foo() gets optimized. If foo() can inline bar() then that means that bar() gets optimized twice. But now, if we optimize in prologues, then foo() will be optimized first. If it inlines bar(), that means that there will no longer be any calls to bar(). 2) It lets us kill some code in JITStubs. Epilogue tier-up was very different from loop tier-up, since epilogue tier-up should not attempt OSR. But prologue tier-up requires OSR (albeit really easy OSR since it's the top of the compilation unit), so it becomes just like loop tier-up. As a result, we now have one optimizatio hook (cti_optimize) instead of two (cti_optimize_from_loop and cti_optimize_from_ret).
Attachments
the patch (21.71 KB, patch)
2012-06-22 02:29 PDT, Filip Pizlo
webkit-ews: commit-queue-
the patch (23.29 KB, patch)
2012-06-22 15:10 PDT, Filip Pizlo
ggaren: review+
Filip Pizlo
Comment 1 2012-06-22 02:29:19 PDT
Created attachment 148984 [details] the patch
Early Warning System Bot
Comment 2 2012-06-22 02:57:01 PDT
Comment on attachment 148984 [details] the patch Attachment 148984 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/13035353
Build Bot
Comment 3 2012-06-22 02:57:04 PDT
Early Warning System Bot
Comment 4 2012-06-22 03:15:33 PDT
Filip Pizlo
Comment 5 2012-06-22 15:10:10 PDT
Created attachment 149114 [details] the patch And now, with 32-bit support!
Geoffrey Garen
Comment 6 2012-06-22 15:22:15 PDT
Comment on attachment 149114 [details] the patch r=me
Filip Pizlo
Comment 7 2012-06-22 16:33:43 PDT
Note You need to log in before you can comment on or make changes to this bug.