perm_type_t type; /**< type (CHAIN or CYCLE) */
} perm_cycle_t;
-static void kill_node(ir_node *irn, int kill_block) {
- int i, arity = get_irn_arity(irn);
- ir_graph *irg = get_irn_irg(irn);
-
- for (i = -1; i < arity; ++i) {
- set_irn_n(irn, i, new_r_Bad(irg));
- }
-}
-
/* Compare the two operands */
static int cmp_op_copy_assoc(const void *a, const void *b) {
const op_copy_assoc_t *op1 = a;
sched_remove(pairs[i].out_node);
/* reroute the edges from the proj to the argument */
- edges_reroute(pairs[i].out_node, pairs[i].in_node, env->birg->irg);
- set_irn_n(pairs[i].out_node, 0, new_Bad());
+ exchange(pairs[i].out_node, pairs[i].in_node);
+ //edges_reroute(pairs[i].out_node, pairs[i].in_node, env->birg->irg);
+ //set_irn_n(pairs[i].out_node, 0, new_Bad());
pairs[i].checked = 1;
}
/* remove the perm from schedule */
if (! keep_perm) {
- kill_node(irn, 0);
sched_remove(irn);
+ be_kill_node(irn);
}
}
if (is_Block(irn))
return;
- if (mode_is_datab(get_irn_mode(irn)))
+ if (sched_is_scheduled(irn) && mode_is_datab(get_irn_mode(irn)))
assure_different_constraints(irn, walk_env);
return;
/* now, we can kill the melted keep, except the */
/* ref one, we still need some information */
if (melt_arr[j] != ref)
- kill_node(melt_arr[j], 0);
+ be_kill_node(melt_arr[j]);
}
#ifdef KEEP_ALIVE_COPYKEEP_HACK
DBG((cenv->dbg, LEVEL_1, "created %+F, scheduled before %+F\n", new_ck, sched_pt));
/* finally: kill the reference copykeep */
- kill_node(ref, 0);
+ be_kill_node(ref);
}
}
sched_add_before(cp, keep);
/* Set all ins (including the block) of the CopyKeep BAD to keep the verifier happy. */
- kill_node(cp, 1);
sched_remove(cp);
+ be_kill_node(cp);
}
}