• Leszek Swirski's avatar
    [maglev] Fix ResumeGenerator reviving a dead SuspendGenerator · 2f41221f
    Leszek Swirski authored
    ResumeGenerator is semantically a successor of SuspendGenerator (for
    reasoning about liveness), but operationally it's a successor of
    SwitchOnGeneratorState. This means that the jump to ResumeGenerator will
    always create a new basic block, even if the SuspendGenerator was dead.
    
    This causes problems if we made other assumptions on liveness based on
    the semantics; in particular, we assume that JumpLoop is dead if the
    loop header is dead (thanks to loop irreducibility).
    SwitchOnGeneratorState breaks irreducibility, and this manifests as the
    JumpLoop being alive and trying to jump to a dead header.
    
    Since this is a special case, and loops are otherwise irreducible, we
    can also fix it with a special case; namely, MarkBytecodeDead now has a
    special case for SuspendGenerator which manually advances the iterator
    and kills the ResumeGenerator.
    
    Bug: v8:7700
    Change-Id: Ice162f061e7ba1dda7ceb4f6fe9234889655b417
    Fixed: v8:13250
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865556Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
    Commit-Queue: Victor Gomes <victorgomes@chromium.org>
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#82931}
    2f41221f
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-inl.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...