Commit ff4b9452 authored by Matthias Braun's avatar Matthias Braun
Browse files

- use foreach_out_edge_safe in remove_copies

parent 74dedcd3
......@@ -589,20 +589,15 @@ static void remove_copies(belady_env_t *bel) {
edges_activate(current_ir_graph);
foreach_pset(bel->copies, irn) {
ir_node *src;
const ir_edge_t *edge;
const ir_edge_t *edge, *ne;
assert(be_is_Copy(irn));
src = be_get_Copy_op(irn);
foreach_out_edge(irn, edge) {
foreach_out_edge_safe(irn, edge, ne) {
ir_node *user = get_edge_src_irn(edge);
int user_pos = get_edge_src_pos(edge);
#if 0
// is this normal?
if(user == NULL)
break;
#endif
set_irn_n(user, user_pos, src);
}
}
......
......@@ -109,8 +109,8 @@ static void verify_schedule_walker(ir_node *bl, void *data)
int delay_branches = 0;
/*
Make sure that all phi nodes are scheduled at the beginning of the block, and that there
is 1 or no control flow changing node scheduled as last operation
* Make sure that all phi nodes are scheduled at the beginning of the block, and that there
* is 1 or no control flow changing node scheduled and exactly delay_branches operations after it.
*/
sched_foreach(bl, irn) {
if (is_Phi(irn)) {
......
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