X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fberaextern.c;h=74a2b54a8e3101310760642456b8defe269eae10;hb=89dc24503c04139bb05504059b291d6d89f99661;hp=6f66ad02369c5e72731a5305c93382c8d51a54bb;hpb=3c2f7c0c9e0bff5d97a973bc224579922bb7df81;p=libfirm diff --git a/ir/be/beraextern.c b/ir/be/beraextern.c index 6f66ad023..74a2b54a8 100644 --- a/ir/be/beraextern.c +++ b/ir/be/beraextern.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. * @@ -78,8 +78,8 @@ alloc ::= node-nr reg-nr . #include #include #include -#include -#include +#include "lc_opts.h" +#include "lc_opts_enum.h" #include "set.h" #include "pset.h" @@ -427,13 +427,18 @@ static void dump_affinities_walker(ir_node *irn, void *env) { /* should_be_equal constraints are affinites */ for (pos = 0, max = get_irn_arity(irn); posaenv, irn, pos); - if (arch_register_req_is(req, should_be_same)) { - ir_node *other = get_irn_n(skip_Proj(irn), req->other_same); - if(arch_irn_is(raenv->aenv, other, ignore)) { - vi2 = be_get_var_info(other); + const int* i; + for (i = req->other_same; i != ENDOF(req->other_same); ++i) { + ir_node *other; + + if (*i == -1) break; - fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn)); + other = get_irn_n(skip_Proj(irn), *i); + if(arch_irn_is(raenv->aenv, other, ignore)) { + vi2 = be_get_var_info(other); + fprintf(raenv->f, "(%d, %d, %d)\n", vi1->var_nr, vi2->var_nr, get_affinity_weight(irn)); + } } } }