Changeset 261595 in webkit


Ignore:
Timestamp:
May 12, 2020 8:04:58 PM (4 years ago)
Author:
sbarati@apple.com
Message:

handling of Check in VarargsForwardingPhase is too pessimistic
https://bugs.webkit.org/show_bug.cgi?id=211810

Reviewed by Keith Miller and Filip Pizlo.

JSTests:

  • microbenchmarks/forward-varargs-check-shouldnt-escape.js: Added.

(g):
(foo):

Source/JavaScriptCore:

We were treating a check, even if it wasn't on the sink candidate,
as if it could escape the candidate. That's wrong. Only checks on the
candidate have the escaping ability.

  • dfg/DFGVarargsForwardingPhase.cpp:
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r261589 r261595  
     12020-05-12  Saam Barati  <sbarati@apple.com>
     2
     3        handling of Check in VarargsForwardingPhase is too pessimistic
     4        https://bugs.webkit.org/show_bug.cgi?id=211810
     5
     6        Reviewed by Keith Miller and Filip Pizlo.
     7
     8        * microbenchmarks/forward-varargs-check-shouldnt-escape.js: Added.
     9        (g):
     10        (foo):
     11
    1122020-05-12  Keith Miller  <keith_miller@apple.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r261589 r261595  
     12020-05-12  Saam Barati  <sbarati@apple.com>
     2
     3        handling of Check in VarargsForwardingPhase is too pessimistic
     4        https://bugs.webkit.org/show_bug.cgi?id=211810
     5
     6        Reviewed by Keith Miller and Filip Pizlo.
     7
     8        We were treating a check, even if it wasn't on the sink candidate,
     9        as if it could escape the candidate. That's wrong. Only checks on the
     10        candidate have the escaping ability.
     11
     12        * dfg/DFGVarargsForwardingPhase.cpp:
     13
    1142020-05-12  Keith Miller  <keith_miller@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGVarargsForwardingPhase.cpp

    r259583 r261595  
    128128                    node,
    129129                    [&] (Edge edge) {
    130                         if (edge == candidate)
     130                        if (edge == candidate) {
    131131                            lastUserIndex = nodeIndex;
    132                        
    133                         if (edge.willNotHaveCheck())
    134                             return;
    135                        
    136                         if (alreadyChecked(edge.useKind(), SpecObject))
    137                             return;
    138                        
    139                         sawEscape = true;
     132
     133                            if (edge.willNotHaveCheck())
     134                                return;
     135
     136                            if (alreadyChecked(edge.useKind(), SpecObject))
     137                                return;
     138
     139                            sawEscape = true;
     140                        }
    140141                    });
    141142                if (sawEscape) {
Note: See TracChangeset for help on using the changeset viewer.