*/
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) {
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;
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;
}
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;
}
}
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;
/* 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");