[Webkit-unassigned] [Bug 149713] New: DFG peephole does not have effect on CompareEq / CompareStrictEq because of MovHint

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 1 09:51:49 PDT 2015


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

            Bug ID: 149713
           Summary: DFG peephole does not have effect on CompareEq /
                    CompareStrictEq because of MovHint
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: utatane.tea at gmail.com

Currently, we have op_jless, op_jgreater etc. But we don't have op_jeq.
Instead we compile the following

function eq(a, b)
{
    if (a === b)
        return true;
    return false;
}

to

eq#CU1c7h:[0x7fb57e6dd268->0x7fb57e46c200, NoneFunctionCall, 17]: 17 m_instructions; 136 bytes; 3 parameter(s); 8 callee register(s); 6 variable(s)
[   0] enter             
[   1] get_scope         loc3
[   3] mov               loc4, loc3
[   6] eq                loc6, arg1, arg2
[  10] jfalse            loc6, 5(->15)
[  13] ret               True(const1)
[  15] ret               False(const2)

So, in DFG, between op_eq and op_jfalse, we have MovHint to store the result of op_eq.
As a result, detectPeepHoleBranch() never detects peep hole for that case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151001/1bb653ba/attachment.html>


More information about the webkit-unassigned mailing list