X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbechordal.c;h=a32d509b6991ec6fad35538f1cf5ce7d016a8038;hb=d0d5cc041a1bdc5a62aab757dbf7d3069796c63a;hp=54a9e1f6260ae3edd522e381556461ca606301bf;hpb=ea75e9d38674b468f602a0699fb64b9c01254797;p=libfirm diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index 54a9e1f62..a32d509b6 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -84,25 +84,6 @@ typedef struct _be_chordal_alloc_env_t { int colors_n; /**< The number of colors. */ } be_chordal_alloc_env_t; -#if 0 -static void check_border_list(struct list_head *head) -{ - border_t *x; - list_for_each_entry(border_t, x, head, list) { - assert(x->magic == BORDER_FOURCC); - } -} - -static void check_heads(be_chordal_env_t *env) -{ - pmap_entry *ent; - for (ent = pmap_first(env->border_heads); ent; ent = pmap_next(env->border_heads)) { - /* ir_printf("checking border list of block %+F\n", ent->key); */ - check_border_list(ent->value); - } -} -#endif - static int get_next_free_reg(const be_chordal_alloc_env_t *alloc_env, bitset_t *colors) { bitset_t *tmp = alloc_env->tmp_colors; @@ -167,7 +148,7 @@ static void pair_up_operands(const be_chordal_alloc_env_t *alloc_env, be_insn_t bitset_clear_all(bs); bitset_copy(bs, op->regs); bitset_and(bs, out_op->regs); - n_total = bitset_popcnt(op->regs) + bitset_popcnt(out_op->regs); + n_total = bitset_popcount(op->regs) + bitset_popcount(out_op->regs); if (!bitset_is_empty(bs) && n_total < smallest_n_regs) { smallest = i; @@ -198,7 +179,7 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, int *assignment; pmap *partners; int i, n_alloc; - bitset_pos_t col; + unsigned col; const ir_edge_t *edge; ir_node *perm = NULL; //int match_res, cost; @@ -351,6 +332,7 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, match_res = hungarian_solve(bp, assignment, &cost, 1); assert(match_res == 0 && "matching failed"); #else + /*bipartite_dump_f(stderr, bp);*/ bipartite_matching(bp, assignment); #endif @@ -359,7 +341,7 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, const arch_register_t *reg; ir_node *irn; - assert(assignment[i] >= 0 && "there must have been a register assigned"); + assert(assignment[i] >= 0 && "there must have been a register assigned (node not register pressure faithful?)"); reg = arch_register_for_index(env->cls, assignment[i]); assert(! (reg->type & arch_register_type_ignore));