From 87555a6159756a518614c43a91f3f8250fee128c Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 17 Oct 2007 12:07:06 +0000 Subject: [PATCH] In the RA constraint handler insert no copy when an operand is used more than once with constraints, but the constraints are equal (this is not optimal, but better than before and solves the test x, x case on x86). [r16244] --- ir/be/bechordal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index 3246d434c..6df799992 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -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; -- 2.20.1