• 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
..
DEPS Loading commit data...
OWNERS Loading commit data...
maglev-basic-block.h Loading commit data...
maglev-code-gen-state.h Loading commit data...
maglev-code-generator.cc Loading commit data...
maglev-code-generator.h Loading commit data...
maglev-compilation-info.cc Loading commit data...
maglev-compilation-info.h Loading commit data...
maglev-compilation-unit.cc Loading commit data...
maglev-compilation-unit.h Loading commit data...
maglev-compiler.cc Loading commit data...
maglev-compiler.h Loading commit data...
maglev-concurrent-dispatcher.cc Loading commit data...
maglev-concurrent-dispatcher.h Loading commit data...
maglev-graph-builder.cc Loading commit data...
maglev-graph-builder.h Loading commit data...
maglev-graph-labeller.h Loading commit data...
maglev-graph-printer.cc Loading commit data...
maglev-graph-printer.h Loading commit data...
maglev-graph-processor.h Loading commit data...
maglev-graph-verifier.h Loading commit data...
maglev-graph.h Loading commit data...
maglev-interpreter-frame-state.h Loading commit data...
maglev-ir.cc Loading commit data...
maglev-ir.h Loading commit data...
maglev-regalloc-data.h Loading commit data...
maglev-regalloc.cc Loading commit data...
maglev-regalloc.h Loading commit data...
maglev-register-frame-array.h Loading commit data...
maglev-vreg-allocator.h Loading commit data...
maglev.cc Loading commit data...
maglev.h Loading commit data...