WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109000
DFG::ByteCodeParser should do surgical constant folding to reduce load on the optimization fixpoint
https://bugs.webkit.org/show_bug.cgi?id=109000
Summary
DFG::ByteCodeParser should do surgical constant folding to reduce load on the...
Filip Pizlo
Reported
2013-02-05 19:31:00 PST
Currently our source parser's ASTBuilder does some surgical constant folding, but it doesn't cover some cases. It is particularly incapable of doing constant folding for cases where we do some minimal loop peeling in the bytecode generator - since it won't "see" those constants prior to the peeling. Example: for (var i = 0; i < 4; ++i) things; This will get peeled just a bit by the bytecode generator, so that the "i < 4" is duplicated both at the top of the loop and the bottom. This means that we have a constant comparison: "0 < 4", which the bytecode generator emits without any further thought. The DFG optimization fixpoint of course folds this and simplifies the CFG accordingly, but this incurs a compile-time cost. The purpose of this bug is to do some surgical constant folding in the DFG's bytecode parser, so that such constructs reduce load on the CFG simplifier and the optimization fixpoint. The goal is not to cover all cases, since the DFG CFA and CFG simplifier have a really powerful sparse conditional constant propagation that we can always fall back on. Instead the goal is to cover enough cases that for common small functions we don't have to perform such transformations, thereby reducing compile times.
Attachments
the patch
(38.67 KB, patch)
2013-02-05 19:36 PST
,
Filip Pizlo
oliver
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2013-02-05 19:36:03 PST
Created
attachment 186745
[details]
the patch
Filip Pizlo
Comment 2
2013-02-07 12:24:39 PST
Landed in
http://trac.webkit.org/changeset/142162
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug