• Mike Stanton's avatar
    [TurboFan] Serializing context information · 386ff6e5
    Mike Stanton authored
    In TurboFan, context specialization is an optimization that tries to
    either replace the load of a value from the context with a constant,
    or if that can't be achieved, at least reduce the hops up the
    context chain by starting a walk to the required depth from the
    first constant context that it can reach.
    
    Currently, this optimization is performed by looking into the
    heap during a reducer pass. With fully concurrent TurboFan, we
    need to instead gather information about contexts we may want
    to perform this optimization on during serialization.
    
    This CL adds functionality to the serializer to recognize and
    model operations that affect the context register. We add to the
    hinting structure already used by the serializer. There is
    a new type of hint: a VirtualContext. This is a tuple consisting
    of a handle to a Context, and a distance field that indicates how
    far away in a to-be-realized chain this VirtualContext sits from
    the context in the handle. For example:
    
    bytecode stream:
    ...
    CreateBlockContext
    ...
    
    After a block context is created, the accumulator now contains
    a VirtualContext Hint with a distance of 1 from any context hints
    that we are keeping track of in the current context register.
    
    More details in the design doc here:
    https://docs.google.com/document/d/1Y0LKKCEenLWyAZTetoAIpKTZRCxaNdkYV8X1GaCax2A/edit?usp=sharing
    
    Change-Id: I63732ebd106cc138fb1e9789d0676ece63e15d27
    Bug: v8:7790
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605941
    Commit-Queue: Michael Stanton <mvstanton@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62370}
    386ff6e5
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...