• Leszek Swirski's avatar
    [maglev] Fix dead predecessors after EmitUnconditionalDeopt · f7cc70de
    Leszek Swirski authored
    Fixes the iteration after emitting an unconditional deopt to kill all
    Jumps along the way, not just ones preceeding a merge point. This fixes
    several issues:
    
      a) That Jump may be to a not yet created merge point, in which case we
         were getting a nullptr deref.
      b) Not-yet created merge points would not be detected as merge points,
         so we'd skip over them and miss killing the control node before
         them.
      c) We weren't reducing predecessor counts, so even after fixing the
         nullptr deref above, merge states created later would have the wrong
         predecessor count.
    
    Now, we check bytecode targets (including fallthrough for non-returning
    bytecodes) on for every bytecode, and skip over both not-yet created
    merges, and loop merges that have no predecessors other than the loop
    jump itself.
    
    As part of this, the dead predecessor merging is changed; instead of
    setting the predecessor to nullptr, we drop the predecessor count by
    one, and trim any Phis' input counts.
    
    Bug: v8:7700
    Change-Id: I904c82df7c5dd44d7637e07f6750b35e7e219284
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3599470Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#80083}
    f7cc70de
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
baseline Loading commit data...
bigint Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
maglev Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sandbox Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
temporal Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
web-snapshot Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...