Bug 108580 - DFG::CFGSimplificationPhase::keepOperandAlive() conflates liveness and availability
Summary: DFG::CFGSimplificationPhase::keepOperandAlive() conflates liveness and availa...
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
Depends on:
Reported: 2013-01-31 22:01 PST by Filip Pizlo
Modified: 2013-01-31 23:43 PST (History)
7 users (show)

See Also:

the patch (5.48 KB, patch)
2013-01-31 22:04 PST, Filip Pizlo
oliver: 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 2013-01-31 22:01:37 PST
This is a harmless bug in that it only results in us keeping a bit too many things for OSR.  But it's worth fixing so that the code is consistent.

keepOperandAlive() is called when block A has a branch to blocks B and C, but the A->B edge is proven to never be taken and we want to optimize the code to have A unconditionally jump to C.  In that case, for the purposes of OSR, we need to preserve the knowledge that the state that B expected to be live incoming from A ought still to be live up to the point of where the A->B,C branch used to be.  The way we keep things alive is by using the variablesAtTail of A (i.e., we use the knowledge of in what manner A made state available to B and C).  The way we choose which state should be kept alive ought to be chosen by the variablesAtHead of B (i.e. the things B says it needs from its predecessors, including A), except that keepOperandAlive() was previously just using variablesAtTail of A for this purpose.
Comment 1 Filip Pizlo 2013-01-31 22:04:35 PST
Created attachment 185943 [details]
the patch
Comment 2 Filip Pizlo 2013-01-31 23:43:28 PST
Landed in http://trac.webkit.org/changeset/141544