Bug 194053 - BBQ-Air: Emit better code for switch
Summary: BBQ-Air: Emit better code for switch
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: 2019-01-30 14:54 PST by Saam Barati
Modified: 2019-02-10 19:27 PST (History)
14 users (show)

See Also:


Attachments
patch (4.12 KB, patch)
2019-02-09 16:55 PST, Saam Barati
no flags Details | Formatted Diff | Diff
patch (4.13 KB, patch)
2019-02-09 17:03 PST, Saam Barati
ysuzuki: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2019-01-30 14:54:13 PST
...
Comment 1 Saam Barati 2019-02-09 16:55:14 PST
Created attachment 361615 [details]
patch
Comment 2 EWS Watchlist 2019-02-09 17:00:12 PST
Attachment 361615 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:36:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Saam Barati 2019-02-09 17:03:24 PST
Created attachment 361616 [details]
patch
Comment 4 Yusuke Suzuki 2019-02-09 23:18:03 PST
Comment on attachment 361616 [details]
patch

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

r=me

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1528
>          unifyValuesWithBlock(expressionStack, targets[i]->resultForBranch());

Use `for (const ControlData& target : targets)` instead.

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1539
> +    for (size_t i = 0; i < targets.size(); ++i)

Ditto.

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1574
> +        params.addLatePath([=] (CCallHelpers& jit) {

Is WTFMove(caseJumps) & WTFMove(successorLabels) better?
Comment 5 Saam Barati 2019-02-10 19:26:24 PST
Thanks for the review. I addressed your comments.

landed in:
https://trac.webkit.org/changeset/241254/webkit
Comment 6 Radar WebKit Bug Importer 2019-02-10 19:27:28 PST
<rdar://problem/47953543>