• Stephan Herhut's avatar
    [wasm] Improve register hinting for arguments · 7822145c
    Stephan Herhut authored
    When assigning a register to a value that is used as a function
    argument, we use a hint to suggest the corresponding register. However,
    if the argument is also used after the call, the register will not be
    free for the entire live range of the value. Hence we need to split the
    live range.
    To minimize the number of splits, we aim to choose a register with
    maxium availability. This heuristic was implemented based on lifetime
    positions with sub-instruction precision. In such a model, argument
    registers typically have a shorter available time, as they need to
    hold a value before a call, whereas all other registers are free until
    right after the call, where they have been overwritten by the called
    function. Hence, we typically chose a non-argument register, ignoring
    the hint and creating an extra move.
    This change moves the heuristic to instruction granularity, which
    gives argument and other registers the same free time. We also now
    prefer hinted registers if they have the same free time.
    
    Change-Id: Ia8dd73b6c086d28859a836c42ea9ff8afce4c371
    Reviewed-on: https://chromium-review.googlesource.com/1124852Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Commit-Queue: Stephan Herhut <herhut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54255}
    7822145c
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...
.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...
ChangeLog Loading commit data...
DEPS 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...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...