Commit b597c7fd authored by Michael Beck's avatar Michael Beck
Browse files

- Changed keep logic: all nodes can be keeped yet, thi is necessary to fix fehler152

[r21820]
parent 158c7c6b
......@@ -902,8 +902,12 @@ ir_node *get_End_keepalive(const ir_node *end, int pos) {
}
void add_End_keepalive(ir_node *end, ir_node *ka) {
ir_graph *irg = get_irn_irg(end);
assert(is_End(end));
assert((is_Phi(ka) || is_Proj(ka) || is_Block(ka) || is_irn_keep(ka)) && "Only Phi, Block or Keep nodes can be kept alive!");
if (get_irg_phase_state(irg) == phase_building) {
assert((is_Phi(ka) || is_Block(ka) || is_irn_keep(ka)) && "Only Phi, Block or Keep nodes can be kept alive!");
}
add_irn_n(end, ka);
}
......
......@@ -5316,9 +5316,7 @@ static ir_node *transform_node_End(ir_node *n) {
} else if (is_irn_pinned_in_irg(ka) && is_Block_dead(get_nodes_block(ka))) {
continue;
}
/* FIXME: beabi need to keep a Proj(M) */
if (is_Phi(ka) || is_irn_keep(ka) || is_Proj(ka))
in[j++] = ka;
in[j++] = ka;
}
if (j != n_keepalives)
set_End_keepalives(n, j, in);
......
......@@ -798,15 +798,11 @@ restart:
irg_block_walk(ka, optimize_blocks, remove_simple_blocks, &env.changed);
mark_irn_visited(ka);
in[j++] = ka;
} else if (op == op_Phi) {
} else {
mark_irn_visited(ka);
/* don't keep alive dead blocks */
if (! is_Block_dead(get_nodes_block(ka)))
in[j++] = ka;
} else if (is_op_keep(op)) {
mark_irn_visited(ka);
if (! is_Block_dead(get_nodes_block(ka)))
in[j++] = ka;
}
}
}
......
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