• Andreas Haas's avatar
    Reland "[wasm][liftoff] Cache the memory start register" · 274aaaaf
    Andreas Haas authored
    On a loop back edge both the cached instance and the cached memory
    start have to get restored for the next loop iteration. In the original
    CL we did not consider the case that by restoring the instance we may
    overwrite the currently cached memory start.
    
    Original description:
    
    WebAssembly functions often have subsequent memory accesses, and each of
    these memory accesses need the start address of the memory in a register.
    With this CL the register with the memory start address is cached, so
    only the first memory access has to load the memory start address into a
    register, subsequent memory accesses can just reuse the register.
    
    In first measurements with the epic benchmark this reduces the size of
    the generated Liftoff code by a bit more than 5%.
    
    R=clemensb@chromium.org
    
    Bug: v8:11862
    Change-Id: I884c0da24be8bc6b10f2c6bf5437b9a279819538
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960220Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#75183}
    274aaaaf
liftoff-assembler.h 77.2 KB