Skip to content

Commit b82a911

Browse files
how759V8 LUCI CQ
authored andcommitted
[wasm][revec] Fix control level calculation of LoopExit node
LoopExit node is directly connected to the Loop node. In a BFS search this can make the control levels of the nodes after the loop smaller than the control levels of nodes inside loop body. This CL fixes it by ignoring this kind of edge. Bug: v8:12716 Change-Id: I7920f52d409a017e3726349098c36b3be4f4361c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4837464 Reviewed-by: Tobias Tebbi <[email protected]> Commit-Queue: Hao A Xu <[email protected]> Cr-Commit-Position: refs/heads/main@{#89779}
1 parent d15ef84 commit b82a911

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/compiler/linear-scheduler.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ void LinearScheduler::ComputeControlLevel() {
3232
for (Edge const edge : node->use_edges()) {
3333
if (!NodeProperties::IsControlEdge(edge)) continue;
3434
Node* use = edge.from();
35+
if (use->opcode() == IrOpcode::kLoopExit &&
36+
node->opcode() == IrOpcode::kLoop)
37+
continue;
3538
if (control_level_.find(use) == control_level_.end() &&
3639
use->opcode() != IrOpcode::kEnd) {
3740
SetControlLevel(use, level + 1);

0 commit comments

Comments
 (0)