Bug 89752 - DFG tier-up should happen in prologues, not epilogues
Summary: DFG tier-up should happen in prologues, not epilogues
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-22 02:22 PDT by Filip Pizlo
Modified: 2012-06-22 16:33 PDT (History)
0 users

See Also:


Attachments
the patch (21.71 KB, patch)
2012-06-22 02:29 PDT, Filip Pizlo
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
the patch (23.29 KB, patch)
2012-06-22 15:10 PDT, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 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).
Comment 1 Filip Pizlo 2012-06-22 02:29:19 PDT
Created attachment 148984 [details]
the patch
Comment 2 Early Warning System Bot 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
Comment 3 Build Bot 2012-06-22 02:57:04 PDT
Comment on attachment 148984 [details]
the patch

Attachment 148984 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13025353
Comment 4 Early Warning System Bot 2012-06-22 03:15:33 PDT
Comment on attachment 148984 [details]
the patch

Attachment 148984 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13027425
Comment 5 Filip Pizlo 2012-06-22 15:10:10 PDT
Created attachment 149114 [details]
the patch

And now, with 32-bit support!
Comment 6 Geoffrey Garen 2012-06-22 15:22:15 PDT
Comment on attachment 149114 [details]
the patch

r=me
Comment 7 Filip Pizlo 2012-06-22 16:33:43 PDT
Landed in http://trac.webkit.org/changeset/121073