Bug 227159 - [DFG] Untyped branches should eliminate checks based on results from the AbstractInterpreter
Summary: [DFG] Untyped branches should eliminate checks based on results from the Abst...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-17 23:09 PDT by Robin Morisset
Modified: 2021-06-18 12:46 PDT (History)
8 users (show)

See Also:


Attachments
Patch (14.57 KB, patch)
2021-06-17 23:20 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2021-06-17 23:09:41 PDT
We currently emit a ton of code for Untyped branches, as we use branchIfTruthy which does not know anything about the abstract interpreter.
Even worse: we call branchIfTruthy after emitting some fast paths, and branchIfTruthy replicates these fast paths (Int32 and Booleans).
Comment 1 Robin Morisset 2021-06-17 23:20:34 PDT
Created attachment 431757 [details]
Patch
Comment 2 Filip Pizlo 2021-06-18 10:12:40 PDT
Comment on attachment 431757 [details]
Patch

Did the FTL have a similar problem?
Comment 3 EWS 2021-06-18 10:17:52 PDT
Committed r279041 (238961@main): <https://commits.webkit.org/238961@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431757 [details].
Comment 4 Radar WebKit Bug Importer 2021-06-18 10:18:27 PDT
<rdar://problem/79508395>
Comment 5 Robin Morisset 2021-06-18 12:46:51 PDT
(In reply to Filip Pizlo from comment #2)
> Comment on attachment 431757 [details]
> Patch
> 
> Did the FTL have a similar problem?

No, it calls boolify() which implements almost exactly the same logic as I added here to the DFG.