Bug 144186 - Rationalize DFG DCE handling of nodes that perform checks that propagate through AI
Summary: Rationalize DFG DCE handling of nodes that perform checks that propagate thro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
: 144148 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-24 23:07 PDT by Filip Pizlo
Modified: 2015-04-27 11:49 PDT (History)
0 users

See Also:


Attachments
the patch (24.57 KB, patch)
2015-04-24 23:12 PDT, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-04-24 23:07:02 PDT
If I do ArithAdd(Int32Use, Int32Use, CheckOverflow) then AI will prove that this returns Int32. We may later perform code simplifications based on the proof that this is Int32, and we may kill all DFG users of this ArithAdd. Then we may prove that there is no exit site at which the ArithAdd is live. This is sufficient to then kill the ArithAdd - except that we still need the overflow check!

Currently we mishandle this:

- In places where we want the overflow check we need to use MustGenerate(@ArithAdd) as a hack to keep it alive. That's dirty and it's just indicative of a deeper issue.

- Our MovHint removal doesn't do Phantom canonicalization which essentially makes it powerless. This was sort of hiding the bug.

- Nodes that have checks that AI leverages should always be NodeMustGenerate. You can't kill something that you are relying on for subsequent simplifications.
Comment 1 Filip Pizlo 2015-04-24 23:12:59 PDT
Created attachment 251613 [details]
the patch
Comment 2 Filip Pizlo 2015-04-24 23:13:56 PDT
*** Bug 144148 has been marked as a duplicate of this bug. ***
Comment 3 Geoffrey Garen 2015-04-27 10:58:33 PDT
Comment on attachment 251613 [details]
the patch

r=me
Comment 4 Filip Pizlo 2015-04-27 11:49:42 PDT
Landed in http://trac.webkit.org/changeset/183401