Bug 169596 - [JSC][FTL] FTL should support Arrayify
Summary: [JSC][FTL] FTL should support Arrayify
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-14 01:01 PDT by Yusuke Suzuki
Modified: 2017-04-20 19:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (11.56 KB, patch)
2017-04-20 06:29 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (10.97 KB, patch)
2017-04-20 06:34 PDT, Yusuke Suzuki
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-03-14 01:01:44 PDT
https://arewefastyet.com/#machine=29&view=single&suite=six-speed&subtest=map-set-es5
Performance regression is shown due to FTL rejection for Arrayify node.
I guess some recent change makes Arrayify in the above benchmark marked-reachable, and then FTL rejects it.
Comment 1 Yusuke Suzuki 2017-03-14 01:06:08 PDT
But anyway, supporting Arrayify in FTL is nice because ArrayifyToStructure is already done in FTL.

Maybe, I think recent checkArray fixup for `in` operation allows us to emit Arrayify in the above benchmark. Then, FTL rejects it.
Comment 2 Yusuke Suzuki 2017-04-20 06:29:38 PDT
Created attachment 307591 [details]
Patch
Comment 3 Yusuke Suzuki 2017-04-20 06:34:39 PDT
Created attachment 307592 [details]
Patch
Comment 4 Saam Barati 2017-04-20 12:58:40 PDT
Comment on attachment 307592 [details]
Patch

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

r=me

> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:2761
> +        auto isUnexpectedArray = [&](LValue cell) {

style: I think we put a space between "]" and "("
Comment 5 Yusuke Suzuki 2017-04-20 19:05:53 PDT
Comment on attachment 307592 [details]
Patch

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

Thanks!

>> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:2761
>> +        auto isUnexpectedArray = [&](LValue cell) {
> 
> style: I think we put a space between "]" and "("

Fixed.
Comment 6 Yusuke Suzuki 2017-04-20 19:08:34 PDT
Committed r215600: <http://trac.webkit.org/changeset/215600>