Bug 103849

Summary: DFG CSE should not keep alive things that aren't relevant to OSR
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch oliver: review+

Description Filip Pizlo 2012-12-02 18:05:35 PST
Currently when the CSE phase eliminates an operation, it inserts a Phantom node that keeps alive all of the eliminated node's children up to the point at which the eliminated node used to be.  This is necessary for OSR.

But this is too much - often nodes have children that contain values that are not relevant to OSR, like GetButterfly, most cases of SkipScope, or even most GetLocal nodes since the thing being GetLocal'd is already in the local anyway - so unless you have a GetLocal/SetLocal combo then OSR won't care about the GetLocal.

Instead, Phantoms should only contain references to those children of the eliminated node that had a SetLocal, since that is what makes them relevant to OSR.
Comment 1 Filip Pizlo 2012-12-02 18:08:43 PST
Created attachment 177169 [details]
the patch
Comment 2 Filip Pizlo 2012-12-02 19:13:10 PST
Landed in http://trac.webkit.org/changeset/136360