while (lowest_desc) {
mris_irn_t *lowest_mi = get_mris_irn(env, lowest_desc);
mris_irn_t *highest_mi = get_mris_irn(env, highest_node);
- int highest_is_tuple = get_irn_mode(highest_node) == mode_T;
int n_desc;
DBG((dbg, LEVEL_2, "\tlowest descendant %+F height %d\n", lowest_desc, get_irn_height(env->heights, lowest_desc)));
/* count the number of all descendants which are not the lowest descendant */
- for (n_desc = 0; in[n_desc]; ++n_desc);
+ for (n_desc = 0; in[n_desc]; ++n_desc) {
+ }
/*
we insert a CopyKeep node to express the artificial dependencies from the lowest
int i, n;
for (i = 0, n = get_irn_ins_or_deps(lowest_desc); i < n; ++i) {
- ir_node *cmp;
-
- op = get_irn_in_or_dep(lowest_desc, i);
- cmp = highest_is_tuple ? skip_Projs(op) : op;
-
- // if (cmp == highest_node)
+ op = get_irn_in_or_dep(lowest_desc, i);
if (op == highest_node)
break;
}
return 0;
if (get_irn_mode(last) == mode_T) {
- const ir_edge_t *edge;
- foreach_out_edge(last, edge) {
- last = get_edge_src_irn(edge);
- break;
- }
+ const ir_edge_t *edge = get_irn_out_edge_first(last);
+ last = get_edge_src_irn(edge);
}
/* irn now points to the last node in lineage u; mi has the info for the node _before_ the terminator of the lineage. */
mris_env_t *env = XMALLOC(mris_env_t);
ir_graph *irg = be_get_birg_irg(birg);
- phase_init(&env->ph, "mris", irg, 2 * PHASE_DEFAULT_GROWTH, mris_irn_data_init, NULL);
+ phase_init(&env->ph, irg, mris_irn_data_init);
env->irg = irg;
env->visited = 0;
env->heights = heights_new(irg);
void be_sched_mris_free(mris_env_t *env)
{
- phase_free(&env->ph);
+ phase_deinit(&env->ph);
heights_free(env->heights);
free(env);
}