• Benedikt Meurer's avatar
    [turbofan] Reduce overhead of megamorphic property accesses. · a15ad0d3
    Benedikt Meurer authored
    We had an optimization in Crankshaft where we would call into the
    megamorphic handler stub directly if an inline cache was already
    found to be megamorphic when it hit the optimizing compiler. This
    way we could avoid the dispatch overhead when we know that there's
    no point in checking for the other states anyways. However we somehow
    missed to port this optimization to TurboFan.
    
    Now this change introduces support to call into LoadIC_Megamorphic and
    KeyedLoadIC_Megamorphic directly (plus the trampoline versions), which
    saves quite a lot of overhead for the cases where the map/name pair is
    found in the megamorphic stub cache, and it's quite a simple change. We
    can later extend this to also handle the StoreIC and KeyedStoreIC cases
    if that turns out to be beneficial.
    
    This improves the score on the Octane/TypeScript test by around ~2%
    and the TypeScript test in the web-tooling-benchmark by around ~4%. On
    the ARES-6 Air test the steady state mean improves by 2-4%, and on the
    ARES-6 ML test the steady state mean seems to also improve by 1-2%, but
    that might be within noise.
    
    On a micro-benchmark that just runs `o.x` in a hot loop on a set of 9
    different objects, which all have `x` as the first property and are
    all in fast mode, we improve by around ~30%, and are now almost on par
    with JavaScriptCore.
    
    Bug: v8:6344, v8:6936
    Change-Id: Iaa4c6e34c37e78da217ee75f32f6acc95a834250
    Reviewed-on: https://chromium-review.googlesource.com/1215623Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55803}
    a15ad0d3
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
regalloc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
branch-elimination-unittest.cc Loading commit data...
bytecode-analysis-unittest.cc Loading commit data...
checkpoint-elimination-unittest.cc Loading commit data...
code-assembler-unittest.cc Loading commit data...
code-assembler-unittest.h Loading commit data...
common-operator-reducer-unittest.cc Loading commit data...
common-operator-unittest.cc Loading commit data...
compiler-test-utils.h Loading commit data...
constant-folding-reducer-unittest.cc Loading commit data...
control-equivalence-unittest.cc Loading commit data...
control-flow-optimizer-unittest.cc Loading commit data...
dead-code-elimination-unittest.cc Loading commit data...
diamond-unittest.cc Loading commit data...
effect-control-linearizer-unittest.cc Loading commit data...
graph-reducer-unittest.cc Loading commit data...
graph-reducer-unittest.h Loading commit data...
graph-trimmer-unittest.cc Loading commit data...
graph-unittest.cc Loading commit data...
graph-unittest.h Loading commit data...
instruction-selector-unittest.cc Loading commit data...
instruction-selector-unittest.h Loading commit data...
instruction-sequence-unittest.cc Loading commit data...
instruction-sequence-unittest.h Loading commit data...
instruction-unittest.cc Loading commit data...
int64-lowering-unittest.cc Loading commit data...
js-call-reducer-unittest.cc Loading commit data...
js-create-lowering-unittest.cc Loading commit data...
js-intrinsic-lowering-unittest.cc Loading commit data...
js-operator-unittest.cc Loading commit data...
js-typed-lowering-unittest.cc Loading commit data...
linkage-tail-call-unittest.cc Loading commit data...
live-range-builder.h Loading commit data...
load-elimination-unittest.cc Loading commit data...
loop-peeling-unittest.cc Loading commit data...
machine-operator-reducer-unittest.cc Loading commit data...
machine-operator-unittest.cc Loading commit data...
node-cache-unittest.cc Loading commit data...
node-matchers-unittest.cc Loading commit data...
node-properties-unittest.cc Loading commit data...
node-test-utils.cc Loading commit data...
node-test-utils.h Loading commit data...
node-unittest.cc Loading commit data...
opcodes-unittest.cc Loading commit data...
persistent-unittest.cc Loading commit data...
schedule-unittest.cc Loading commit data...
scheduler-rpo-unittest.cc Loading commit data...
scheduler-unittest.cc Loading commit data...
simplified-lowering-unittest.cc Loading commit data...
simplified-operator-reducer-unittest.cc Loading commit data...
simplified-operator-unittest.cc Loading commit data...
state-values-utils-unittest.cc Loading commit data...
typed-optimization-unittest.cc Loading commit data...
typer-unittest.cc Loading commit data...
value-numbering-reducer-unittest.cc Loading commit data...
zone-stats-unittest.cc Loading commit data...