Commit 908b8128 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove keep-edge hacks for endless loop.

It is the job of the frontend to keep loops.
These hacks here only worked for some, but not all cases.
In particular a more clever SSA-construction algorithm might not place redundant PhiMs, which would render memory before memory-less loops unkept.
parent d5178a70
......@@ -3346,8 +3346,6 @@ static ir_node *transform_node_Cond(ir_node *n)
set_Tuple_pred(n, pn_Cond_false, jmp);
set_Tuple_pred(n, pn_Cond_true, new_r_Bad(irg, mode_X));
/* We might generate an endless loop, so keep it alive. */
add_End_keepalive(get_irg_end(irg), blk);
clear_irg_properties(irg, IR_GRAPH_PROPERTY_NO_UNREACHABLE_CODE);
return n;
......@@ -777,11 +777,6 @@ class Phi:
attr_struct = "phi_attr"
init = '''
res->attr.phi.u.backedge = new_backedge_arr(irg->obst, arity);'''
init_after_opt = '''
/* Memory Phis in endless loops must be kept alive.
As we can't distinguish these easily we keep all of them alive. */
if (is_Phi(res) && mode == mode_M)
add_End_keepalive(get_irg_end(irg), res);'''
customSerializer = True
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