• Benedikt Meurer's avatar
    [turbofan] Properly optimize literals in inlined functions. · 855b88ae
    Benedikt Meurer authored
    When inlining based on SharedFunctionInfo rather than based on concrete
    JSFunction, we weren't able to properly optimize array, object and
    regexp literals inside the inlinee, because we didn't know the concrete
    FeedbackVector for the inlinee inside JSCreateLowering. This was because
    JSCreateLowering wasn't properly updated after the literals moved to the
    FeedbackVector. Now with this CL we also have the VectorSlotPair on the
    literal creation operators, just like we do for property accesses and
    calls, and are thus able to always access the appropriate FeedbackVector
    and optimize the literal creation.
    
    The impact is illustrated by the micro-benchmark on the tracking bug,
    which goes from
    
      createEmptyArrayLiteral: 1846 ms.
      createShallowArrayLiteral: 1868 ms.
      createShallowObjectLiteral: 2246 ms.
    
    to
    
      createEmptyArrayLiteral: 1175 ms.
      createShallowArrayLiteral: 1187 ms.
      createShallowObjectLiteral: 1195 ms.
    
    with this CL, so up to 2x faster now.
    
    Drive-by-fix: Also remove the unused CreateEmptyObjectLiteral builtin
    and cleanup the names of the other builtins to be consistent with the
    names of the TurboFan operators and Ignition bytecodes.
    
    Bug: v8:6856
    Change-Id: I453828d019b27c9aa1344edac0dd84e91a457097
    Reviewed-on: https://chromium-review.googlesource.com/680656
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48140}
    855b88ae
builtins-definitions.h 91.4 KB