X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyheur4.c;h=7654c69c7f4563f60afb4e711484297b18b79878;hb=cbe8608ae6f9a523d007919691104b444c92d004;hp=ece1314fd904606b2c0eefbf7fd02727aa558adf;hpb=ea75e9d38674b468f602a0699fb64b9c01254797;p=libfirm diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c index ece1314fd..7654c69c7 100644 --- a/ir/be/becopyheur4.c +++ b/ir/be/becopyheur4.c @@ -171,10 +171,10 @@ static void dbg_aff_chunk(const co_mst_env_t *env, const aff_chunk_t *c) */ static void dbg_admissible_colors(const co_mst_env_t *env, const co_mst_irn_t *node) { - bitset_pos_t idx; + unsigned idx; (void) env; - if (bitset_popcnt(node->adm_colors) < 1) + if (bitset_popcount(node->adm_colors) < 1) fprintf(stderr, "no admissible colors?!?"); else { bitset_foreach(node->adm_colors, idx) { @@ -405,7 +405,7 @@ static void *co_mst_irn_init(ir_phase *ph, const ir_node *irn, void *old) bitset_andnot(res->adm_colors, env->ignore_regs); /* compute the constraint factor */ - res->constr_factor = (real_t) (1 + env->n_regs - bitset_popcnt(res->adm_colors)) / env->n_regs; + res->constr_factor = (real_t) (1 + env->n_regs - bitset_popcount(res->adm_colors)) / env->n_regs; /* set the number of interfering affinity neighbours to -1, they are calculated later */ res->int_aff_neigh = -1; @@ -566,7 +566,7 @@ static void aff_chunk_assure_weight(co_mst_env_t *env, aff_chunk_t *c) node->chunk = c; if (node->constr_factor > REAL(0.0)) { - bitset_pos_t col; + unsigned col; bitset_foreach (node->adm_colors, col) c->color_affinity[col].cost += node->constr_factor; } @@ -588,7 +588,7 @@ static void aff_chunk_assure_weight(co_mst_env_t *env, aff_chunk_t *c) c->color_affinity[i].cost *= (REAL(1.0) / ARR_LEN(c->n)); c->weight = w; - // c->weight = bitset_popcnt(c->nodes); + // c->weight = bitset_popcount(c->nodes); c->weight_consistent = 1; } } @@ -1425,7 +1425,8 @@ static int co_solve_heuristic_mst(copy_opt_t *co) stat_ev_tim_push(); /* init phase */ - phase_init(&mst_env.ph, "co_mst", co->irg, PHASE_DEFAULT_GROWTH, co_mst_irn_init, &mst_env); + phase_init(&mst_env.ph, co->irg, co_mst_irn_init); + phase_set_private(&mst_env.ph, &mst_env); k = be_put_ignore_regs(co->cenv->birg, co->cls, ignore_regs); k = n_regs - k; @@ -1491,7 +1492,7 @@ static int co_solve_heuristic_mst(copy_opt_t *co) /* free allocated memory */ del_pqueue(mst_env.chunks); - phase_free(&mst_env.ph); + phase_deinit(&mst_env.ph); del_pset(mst_env.chunkset); stat_ev_tim_pop("heur4_total");