Bug 182959 - DFG::VarargsForwardingPhase should eliminate getting argument length
Summary: DFG::VarargsForwardingPhase should eliminate getting argument length
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-20 01:10 PST by Saam Barati
Modified: 2018-02-20 22:56 PST (History)
13 users (show)

See Also:


Attachments
WIP (4.08 KB, patch)
2018-02-20 01:21 PST, Saam Barati
no flags Details | Formatted Diff | Diff
WIP (4.08 KB, patch)
2018-02-20 01:21 PST, Saam Barati
no flags Details | Formatted Diff | Diff
patch (17.09 KB, patch)
2018-02-20 14:19 PST, Saam Barati
keith_miller: review+
Details | Formatted Diff | Diff
patch for landing (17.09 KB, patch)
2018-02-20 20:27 PST, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-02-20 01:10:00 PST
I'm measuring around a 1-3% speedup on ARES's ML test by doing this.
Comment 1 Saam Barati 2018-02-20 01:21:10 PST
Created attachment 334251 [details]
WIP
Comment 2 Saam Barati 2018-02-20 01:21:47 PST
Created attachment 334252 [details]
WIP
Comment 3 Saam Barati 2018-02-20 14:19:46 PST
Created attachment 334302 [details]
patch
Comment 4 Radar WebKit Bug Importer 2018-02-20 15:04:00 PST
<rdar://problem/37723649>
Comment 5 Keith Miller 2018-02-20 20:09:58 PST
Comment on attachment 334302 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334302&action=review

r=me.

> Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp:202
> +                if (node->child1()->op() == GetButterfly
> +                    && candidateButterflies.contains(node->child1().node())
> +                    && node->child2() == candidate
> +                    && node->storageAccessData().offset == clonedArgumentsLengthPropertyOffset) {
> +                    ASSERT(node->child1()->child1() == candidate);

Might be worth a static_assert that clonedArgumentsLengthPropertyOffset is out of line.
Comment 6 Saam Barati 2018-02-20 20:23:24 PST
Comment on attachment 334302 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334302&action=review

>> Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp:202
>> +                    ASSERT(node->child1()->child1() == candidate);
> 
> Might be worth a static_assert that clonedArgumentsLengthPropertyOffset is out of line.

I'll add a debug assert. Unfortunately, isOutOfLineOffset isn't constexpr.
Comment 7 Saam Barati 2018-02-20 20:27:52 PST
Created attachment 334338 [details]
patch for landing
Comment 8 WebKit Commit Bot 2018-02-20 22:56:16 PST
Comment on attachment 334338 [details]
patch for landing

Clearing flags on attachment: 334338

Committed r228860: <https://trac.webkit.org/changeset/228860>
Comment 9 WebKit Commit Bot 2018-02-20 22:56:17 PST
All reviewed patches have been landed.  Closing bug.