Bug 64659 - DFG JIT does not optimize equal-null comparisons and branches
Summary: DFG JIT does not optimize equal-null comparisons and branches
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-07-16 16:20 PDT by Filip Pizlo
Modified: 2011-07-18 14:05 PDT (History)
3 users (show)

See Also:

the patch (10.07 KB, patch)
2011-07-18 10:29 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-07-16 16:20:13 PDT
The DFG JIT bytecode parser converts equal-null compare/branch opcodes into a tree of JSConstant(null), an equality comparison, and a branch.  The backend never special-cases the equal-to-null case, and treats it as a normal equality comparison; this means that equal-null always takes slow path.  The DFG JIT backend should have a peephole optimization for this case.
Comment 1 Filip Pizlo 2011-07-18 10:29:42 PDT
Created attachment 101170 [details]
the patch
Comment 2 WebKit Review Bot 2011-07-18 14:05:03 PDT
Comment on attachment 101170 [details]
the patch

Clearing flags on attachment: 101170

Committed r91208: <http://trac.webkit.org/changeset/91208>
Comment 3 WebKit Review Bot 2011-07-18 14:05:07 PDT
All reviewed patches have been landed.  Closing bug.