-
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: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#80083}
f7cc70de