Commit 9dc222a8 authored by Moritz Kroll's avatar Moritz Kroll
Browse files

Reroute End-keep edges when creating critical edges during block scheduling...

Reroute End-keep edges when creating critical edges during block scheduling (i.e. the removed block is the End-kept block of an endless loop).

[r20924]
parent 47e54f59
......@@ -193,7 +193,7 @@ static void remove_empty_block(ir_node *block)
}
/* there can be some non-scheduled Pin nodes left in the block, move them
* to the succ block */
* to the succ block (Pin) or pred block (Sync) */
foreach_out_edge_safe(block, edge, next) {
node = get_edge_src_irn(edge);
......@@ -213,6 +213,11 @@ static void remove_empty_block(ir_node *block)
set_nodes_block(node, get_nodes_block(pred));
continue;
}
if (is_End(node)) { /* End-keep, reroute it to the successor */
int pos = get_edge_src_pos(edge);
set_irn_n(node, pos, succ_block);
continue;
}
panic("Unexpected node %+F in block %+F with empty schedule", node, block);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment