[maglev] Fix ResumeGenerator reviving a dead SuspendGenerator
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: Victor 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}
Showing
Please
register
or
sign in
to comment