Bug 21803 - Fuse op_jfalse with op_eq_null and op_neq_null
Summary: Fuse op_jfalse with op_eq_null and op_neq_null
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Cameron Zwarich (cpst)
URL:
Keywords:
Depends on:
Blocks: 20813
  Show dependency treegraph
 
Reported: 2008-10-22 10:50 PDT by Cameron Zwarich (cpst)
Modified: 2008-10-22 14:07 PDT (History)
0 users

See Also:


Attachments
Proposed patch (9.12 KB, patch)
2008-10-22 13:24 PDT, Cameron Zwarich (cpst)
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Zwarich (cpst) 2008-10-22 10:50:27 PDT
Branches of the form

if (a == null) ...

and

if (a != null) ...

are common on the V8 Richards benchmark. We should create new opcodes that fuse these instructions.
Comment 1 Cameron Zwarich (cpst) 2008-10-22 13:24:17 PDT
Created attachment 24568 [details]
Proposed patch
Comment 2 Geoffrey Garen 2008-10-22 13:55:13 PDT
Comment on attachment 24568 [details]
Proposed patch

 3054         /* jneq_null cond(r) target(offset)
 3036         /* jeq_null cond(r) target(offset)

Let's call "cond" "src", like you suggested.

Seems like we might get a little speedup out of experimenting with the asm a little, but this looks good.

r=me
Comment 3 Cameron Zwarich (cpst) 2008-10-22 14:07:01 PDT
Landed in r37789.