[Webkit-unassigned] [Bug 68593] New: DFG JIT should infer which uses of a variable are not aliased

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 23:21:38 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68593

           Summary: DFG JIT should infer which uses of a variable are not
                    aliased
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: fpizlo at apple.com


Say you write the following program:

var i;

for (i = 0; i < n; ++i) {
    array[i]++;
}

i = 0.5;

Currently, the DFG will assume that 'i' is always both Int and Double, which will cause the first loop to perform very poorly.  This problem is made worse by the bytecode generator's reuse of virtual registers for variables that are lexically unrelated.

The DFG should be fixed so that it does not get confused by this, particularly since a simple algorithm exists for fixing it.  Start by assuming that each GetLocal, SetLocal, and Phi operates on a distinct variable (even if it obviously doesn't).  Then for each GetLocal, SetLocal and Phi, union its variable with the variables of its children.

At the end, each union-find set will correspond to a disjoint live-range of a variable.  In many cases, it will correspond precisely (one-to-one) to a virtual register, while in other cases it will be many-to-one: for any virtual register, each distinct use will have a different "variable".

This implies that SetLocal/GetLocal will have two OpInfo slots: the virtual register (slot one, as it is now) and the variable number used for predictions and static analysis.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list