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;
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;
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;
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
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));