becopyheur: Remove the attribute ou from struct qnode_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 15:07:23 +0000 (16:07 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 21:05:19 +0000 (22:05 +0100)
The first node of the max independent set is always the root node.

ir/be/becopyheur.c

index 7243c8a..53ea6e8 100644 (file)
@@ -66,7 +66,6 @@ typedef struct 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. */
@@ -341,7 +340,7 @@ static int qnode_try_color(qnode_t const *const qn, bitset_t const *const alloca
                } 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 */
@@ -467,7 +466,6 @@ no_stable_set:
 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);