From: Matthias Braun Date: Tue, 25 Aug 2009 11:03:22 +0000 (+0000) Subject: addendum to the should_be_same fix: we also have to use the same rule for the dynamic... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=51c4b7a7a61a8dea605628cd5e46a8b7f8200295;p=libfirm addendum to the should_be_same fix: we also have to use the same rule for the dynamic boni [r26422] --- diff --git a/ir/be/benewalloc.c b/ir/be/benewalloc.c index 19ed9a605..dd2ebd244 100644 --- a/ir/be/benewalloc.c +++ b/ir/be/benewalloc.c @@ -321,9 +321,8 @@ static void check_defs(const ir_nodeset_t *live_nodes, float weight, /* if we the value at the should_be_same input doesn't die at the * node, then it is no use to propagate the constraints (since a * copy will emerge anyway) */ - if (ir_nodeset_contains(live_nodes, op)) { + if (ir_nodeset_contains(live_nodes, op)) continue; - } op_info = get_allocation_info(op); for (r = 0; r < n_regs; ++r) { @@ -559,6 +558,12 @@ static void assign_reg(const ir_node *block, ir_node *node, reg = arch_get_irn_register(in); assert(reg != NULL); r = arch_register_get_index(reg); + + /* if the value didn't die here then we should not propagate the + * should_be_same info */ + if (assignments[r].value == in) + continue; + info->prefs[r] += weight * AFF_SHOULD_BE_SAME; } }