Bug 67343 - DFG graph has no way of distinguishing or reconciling between static and dynamic predictions
Summary: DFG graph has no way of distinguishing or reconciling between static and dyna...
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: 2011-08-31 17:04 PDT by Filip Pizlo
Modified: 2011-09-02 14:15 PDT (History)
3 users (show)

See Also:


Attachments
the patch (16.38 KB, patch)
2011-08-31 17:08 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch - fix style (16.38 KB, patch)
2011-08-31 17:13 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-08-31 17:04:26 PDT
The DFG graph has the ability to store predictions about program statements and variables.  It can even merge multiple different predictions; for example if one data point indicates that something is likely integer and another data point indicates that it is likely double, then the graph is smart enough to mark the prediction as "numeric", which indicates that can be either int or double but probably not anything else.  But what the graph cannot do is deal with a combination of dynamic and static predictions.  A dynamic prediction should always take precedence over a static one.  But if for some reason no dynamic prediction can be made (for example because we have not yet seen the relevant statement(s) execute) then a static prediction is probably better than no prediction.

The DFG graph should have a mechanism for tracking where a prediction came from (static guess or dynamic profiling) and be able to merge static predictions with dynamic ones, so that a dynamic prediction always takes precedence.
Comment 1 Filip Pizlo 2011-08-31 17:08:53 PDT
Created attachment 105865 [details]
the patch
Comment 2 WebKit Review Bot 2011-08-31 17:11:11 PDT
Attachment 105865 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/dfg/DFGNode.h:479:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Filip Pizlo 2011-08-31 17:13:53 PDT
Created attachment 105867 [details]
the patch - fix style
Comment 4 Filip Pizlo 2011-08-31 18:13:17 PDT
Comment on attachment 105867 [details]
the patch - fix style

Tests pass.
Comment 5 WebKit Review Bot 2011-09-02 14:15:33 PDT
Comment on attachment 105867 [details]
the patch - fix style

Clearing flags on attachment: 105867

Committed r94449: <http://trac.webkit.org/changeset/94449>
Comment 6 WebKit Review Bot 2011-09-02 14:15:37 PDT
All reviewed patches have been landed.  Closing bug.