remove #if 0 around arch_get_irn_ops, no idea why it was there...
[libfirm] / ir / be / bechordal.c
index 3246d43..09c03a7 100644 (file)
@@ -157,7 +157,7 @@ static INLINE border_t *border_add(be_chordal_env_t *env, struct list_head *head
        else {
                b = get_irn_link(irn);
 
-               assert(b && b->magic == BORDER_FOURCC && "Illegal border encountered");
+               DEBUG_ONLY(assert(b && b->magic == BORDER_FOURCC && "Illegal border encountered"));
        }
 
        b->pressure = pressure;
@@ -293,6 +293,11 @@ static ir_node *prepare_constr_insn(be_chordal_env_t *env, ir_node *irn)
                        if(a_op->carrier != op->carrier || !a_op->has_constraints)
                                continue;
 
+                       /* if the constraint is the same, no copy is necessary
+                        * TODO generalise unequal but overlapping constraints */
+                       if (a_op->req == op->req)
+                               continue;
+
                        if (be_is_Copy(get_irn_n(insn->irn, a_op->pos)))
                                continue;