*/
typedef struct node_stat_t {
ir_node *irn;
- int new_color;
- int pinned_local :1;
+ int new_color;
+ unsigned pinned_local :1;
} node_stat_t;
/**
*/
typedef struct qnode_t {
struct list_head queue; /**< chaining of unit_t->queue */
- const unit_t *ou; /**< the opt unit this node belongs to */
int color; /**< target color */
set *conflicts; /**< contains conflict_t's. All internal conflicts */
int mis_costs; /**< costs of nodes/copies in the mis. */
bitset_copy(free_cols, allocatable_regs);
/* Exclude colors not assignable to the irn */
- if (arch_register_req_is(req, limited)) {
- bitset_t *limited = bitset_alloca(cls->n_regs);
- rbitset_copy_to_bitset(req->limited, limited);
- bitset_and(free_cols, limited);
- }
+ if (arch_register_req_is(req, limited))
+ rbitset_and(free_cols->data, req->limited, free_cols->size);
/* Exclude the color of the irn, because it must _change_ its color */
bitset_clear(free_cols, irn_col);
} else {
if (qnode_is_pinned_local(qn, confl_node)) {
/* changing test_node would change back a node of current ou */
- if (confl_node == qn->ou->nodes[0]) {
+ if (confl_node == qn->mis[0]) {
/* Adding a conflict edge between testnode and conflnode
* would introduce a root -- arg interference.
* So remove the arg of the qn */
static inline qnode_t *new_qnode(const unit_t *ou, int color)
{
qnode_t *qn = XMALLOC(qnode_t);
- qn->ou = ou;
qn->color = color;
qn->mis = XMALLOCN(ir_node*, ou->node_count);
qn->conflicts = new_set(set_cmp_conflict_t, SLOTS_CONFLICTS);