X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbelower.c;h=ea016785dd8bb14a5a8f6182815b6ed2fa7e61a5;hb=89dc24503c04139bb05504059b291d6d89f99661;hp=2a9ade8d5caa18568d7ce6a194e7cc3969251a8c;hpb=ebac8f806aaeb2555633a77fa78c1bb160790102;p=libfirm diff --git a/ir/be/belower.c b/ir/be/belower.c index 2a9ade8d5..ea016785d 100644 --- a/ir/be/belower.c +++ b/ir/be/belower.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -45,7 +45,6 @@ #include "besched_t.h" #include "bestat.h" #include "bessaconstr.h" -#include "benodesets.h" #include "beintlive_t.h" #undef KEEP_ALIVE_COPYKEEP_HACK @@ -599,8 +598,8 @@ static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different, sched_add_after(irn, keep); /* insert the other different and it's copies into the set */ - key.op = other_different; - entry = pset_find(op_set, &key, nodeset_hash(other_different)); + key.op = other_different; + entry = pset_find(op_set, &key, hash_irn(other_different)); if (! entry) { entry = obstack_alloc(&env->obst, sizeof(*entry)); @@ -617,7 +616,7 @@ static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different, ir_nodeset_insert(&entry->copies, keep); } - pset_insert(op_set, entry, nodeset_hash(other_different)); + pset_insert(op_set, entry, hash_irn(other_different)); } /** @@ -631,12 +630,14 @@ static void assure_different_constraints(ir_node *irn, constraint_env_t *env) { req = arch_get_register_req(arch_env, irn, -1); if (arch_register_req_is(req, should_be_different)) { - ir_node *different_from = get_irn_n(belower_skip_proj(irn), req->other_different); - gen_assure_different_pattern(irn, different_from, env); - } else if (arch_register_req_is(req, should_be_different_from_all)) { - int i, n = get_irn_arity(belower_skip_proj(irn)); - for (i = 0; i < n; i++) { - gen_assure_different_pattern(irn, get_irn_n(belower_skip_proj(irn), i), env); + const unsigned other = req->other_different; + int i; + + for (i = 0; 1U << i <= other; ++i) { + if (other & (1U << i)) { + ir_node *different_from = get_irn_n(belower_skip_proj(irn), i); + gen_assure_different_pattern(irn, different_from, env); + } } } }