- co_mst_irn_t *neigh;
- int col, col_cnt;
- ir_node *int_neigh;
-
- int_neigh = node->int_neighs[i];
-
- assert(!arch_irn_is(env->aenv, int_neigh, ignore));
-
- neigh = get_co_mst_irn(env, int_neigh);
- col = get_mst_irn_col(neigh);
- col_cnt = bitset_popcnt(neigh->adm_colors);
-
- if (!is_loose(neigh)) {
- /* colors of fixed interfering neighbours are infeasible */
- costs[col].cost = COL_COST_INFEASIBLE;
- }
- else if (col_cnt < env->k) {
- /* calculate costs for constrained interfering neighbours */
- double ratio = 1.0 - ((double)col_cnt / (double)env->k);
-
- bitset_foreach_clear(neigh->adm_colors, idx) {
- /* check only explicitly forbidden colors (skip global forbidden ones) */
- if (! bitset_is_set(env->ignore_regs, idx)) {
- costs[col].cost += ratio * NEIGHBOUR_CONSTR_COSTS;
- }
- }
- }
-
- DB((dbg, LEVEL_4, "\tneigh %+F, loose: %d, color: %d\n", int_neigh, is_loose(neigh), col));
+ co_mst_irn_t *n = get_co_mst_irn(env, node->int_neighs[i]);
+ int col = get_mst_irn_col(n);
+ if (is_loose(n)) {
+ ++n_loose;
+ ++neigh_cols[col];
+ } else
+ costs[col].cost = REAL(0.0);