Commit 6b8d825a authored by Matthias Braun's avatar Matthias Braun
Browse files

make sure projs of projs are moved in part_block_edges

parent 28aac01c
......@@ -189,6 +189,22 @@ static void move(ir_node *node, ir_node *from_bl, ir_node *to_bl)
}
}
static void move_projs(const ir_node *node, ir_node *to_bl)
{
const ir_edge_t *edge;
if (get_irn_mode(node) != mode_T)
return;
foreach_out_edge(node, edge) {
ir_node *proj = get_edge_src_irn(edge);
if (!is_Proj(proj))
continue;
set_nodes_block(proj, to_bl);
move_projs(proj, to_bl);
}
}
/**
* Moves node and all predecessors of node from from_bl to to_bl.
* Does not move predecessors of Phi nodes (or block nodes).
......@@ -201,13 +217,7 @@ static void move_edges(ir_node *node, ir_node *from_bl, ir_node *to_bl)
set_nodes_block(node, to_bl);
/* move its Projs */
if (get_irn_mode(node) == mode_T) {
const ir_edge_t *edge;
foreach_out_edge(node, edge) {
ir_node *proj = get_edge_src_irn(edge);
set_nodes_block(proj, to_bl);
}
}
move_projs(node, to_bl);
/* We must not move predecessors of Phi nodes, even if they are in
* from_bl. (because these are values from an earlier loop iteration
......
Markdown is supported
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