} else if (get_nodes_block(pred) != block) {
cost = 1;
} else {
+ flag_and_cost* pred_fc;
+
cost = normal_tree_cost(pred);
- flag_and_cost* pred_fc = get_irn_link(pred);
+ pred_fc = get_irn_link(pred);
pred_fc->no_root = 1;
#if defined NORMAL_DBG
ir_fprintf(stderr, "%+F says that %+F is no root\n", irn, pred);
int arity = get_irn_arity(irn);
int i;
+ if (irn_visited(irn)) return sched;
+
if (!is_Phi(irn)) {
for (i = 0; i < arity; ++i) {
ir_node* pred = get_irn_n(irn, i);
}
}
+ mark_irn_visited(irn);
ARR_APP1(ir_node*, sched, irn);
return sched;
}
irg_walk_graph(irg, normal_cost_walker, NULL, NULL);
irg_walk_graph(irg, collect_roots, NULL, NULL);
+ inc_irg_visited(irg);
irg_block_walk_graph(irg, normal_sched_block, NULL, NULL);
return NULL;
}
-static const list_sched_selector_t normal_selector_struct = {
+const list_sched_selector_t normal_selector = {
normal_init_graph,
normal_init_block,
normal_select,
NULL, /* finish_block */
NULL /* finish_graph */
};
-
-const list_sched_selector_t *normal_selector = &normal_selector_struct;