Bug 215286

Summary: DFG should always run CFG Simplification after Constant Folding.
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, fpizlo, mark.lam, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Keith Miller 2020-08-07 11:59:53 PDT
DFG should always run CFG Simplification after Constant Folding.
Comment 1 Keith Miller 2020-08-07 12:07:37 PDT
Created attachment 406199 [details]
Patch
Comment 2 Robin Morisset 2020-08-10 00:24:40 PDT
Comment on attachment 406199 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp:-52
> -        // FIXME: We should make this work in SSA. https://bugs.webkit.org/show_bug.cgi?id=148260

If this is no longer a FIXME, please close the corresponding bug on bugzilla.

> Source/JavaScriptCore/dfg/DFGValidate.cpp:-814
> -            bool didSeeExitOK = false;

Why did you remove this validation? Can you explain it in the Changelog if it is on purpose?
Comment 3 Keith Miller 2020-08-10 09:54:18 PDT
*** Bug 148260 has been marked as a duplicate of this bug. ***
Comment 4 Keith Miller 2020-08-10 09:56:18 PDT
Comment on attachment 406199 [details]
Patch

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

>> Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp:-52
>> -        // FIXME: We should make this work in SSA. https://bugs.webkit.org/show_bug.cgi?id=148260
> 
> If this is no longer a FIXME, please close the corresponding bug on bugzilla.

Done.

>> Source/JavaScriptCore/dfg/DFGValidate.cpp:-814
>> -            bool didSeeExitOK = false;
> 
> Why did you remove this validation? Can you explain it in the Changelog if it is on purpose?

Because it's unnecessary and fails when you merge two blocks where the latter block has a Phi. I'll add a comment to the ChangeLog.
Comment 5 Keith Miller 2020-08-10 10:37:35 PDT
Created attachment 406310 [details]
Patch
Comment 6 Radar WebKit Bug Importer 2020-08-14 12:00:21 PDT
<rdar://problem/67087402>
Comment 7 EWS 2020-08-24 21:32:17 PDT
Committed r266101: <https://trac.webkit.org/changeset/266101>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406310 [details].