Commit 79718dc9 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Use edges_reroute_except().

parent 6b9a779d
......@@ -70,15 +70,7 @@ static void peephole_be_IncSP(ir_node *node)
}
/* reattach IncSP users */
ir_node *last = node;
node = sched_next(first);
foreach_out_edge_safe(first, edge) {
ir_node *user = get_edge_src_irn(edge);
int pos = get_edge_src_pos(edge);
if (user == node)
continue;
set_irn_n(user, pos, last);
}
edges_reroute_except(first, node, sched_next(first));
}
/**
......
......@@ -444,16 +444,7 @@ static void peephole_IncSP_Store_to_push(ir_node *irn)
inc_ofs -= 4;
}
foreach_out_edge_safe(irn, edge) {
ir_node *const src = get_edge_src_irn(edge);
if (src == first_push)
continue;
const int pos = get_edge_src_pos(edge);
set_irn_n(src, pos, curr_sp);
}
edges_reroute_except(irn, curr_sp, first_push);
be_set_IncSP_offset(irn, inc_ofs);
}
......
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