From 11dc8fe45cc32f2646ad356c608fe9f3b5265d70 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 6 Aug 2010 17:14:46 +0000 Subject: [PATCH] Remove a loop invariant summand from finding a minimum. [r27881] --- ir/be/bechordal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index 9f1780941..d84e6e23a 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -132,7 +132,7 @@ static void pair_up_operands(const be_chordal_alloc_env_t *alloc_env, be_insn_t */ for (j = 0; j < insn->use_start; ++j) { int smallest = -1; - int smallest_n_regs = 2 * env->cls->n_regs + 1; + int smallest_n_regs = env->cls->n_regs + 1; be_operand_t *out_op = &insn->ops[j]; /* Try to find an in operand which has ... */ @@ -150,7 +150,7 @@ static void pair_up_operands(const be_chordal_alloc_env_t *alloc_env, be_insn_t bitset_clear_all(bs); bitset_copy(bs, op->regs); bitset_and(bs, out_op->regs); - n_total = bitset_popcount(op->regs) + bitset_popcount(out_op->regs); + n_total = bitset_popcount(op->regs); if (!bitset_is_empty(bs) && n_total < smallest_n_regs) { smallest = i; -- 2.20.1