X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeifg.c;h=f7f173c4e20d8d4c6f5db0701ae1f264a05e6b38;hb=f2c2e45eb4e677fef5bf6a8e418b2a22441172d5;hp=8d126b411c1e4a207b05af1f1c04f16006ee02ba;hpb=5616060f856b038d9e3383da4e5ddf35a22df4ef;p=libfirm diff --git a/ir/be/beifg.c b/ir/be/beifg.c index 8d126b411..f7f173c4e 100644 --- a/ir/be/beifg.c +++ b/ir/be/beifg.c @@ -24,9 +24,7 @@ * @date 18.11.2005 * @version $Id$ */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include @@ -106,12 +104,12 @@ static void restore_irn_color(ir_node *irn, void *c) arch_set_irn_register(irn, reg); } -void coloring_save(coloring_t *c) +static void coloring_save(coloring_t *c) { irg_walk_graph(c->irg, NULL, get_irn_color, c); } -void coloring_restore(coloring_t *c) +static void coloring_restore(coloring_t *c) { irg_walk_graph(c->irg, NULL, restore_irn_color, c); } @@ -644,10 +642,14 @@ static void int_comp_rec(be_ifg_t *ifg, ir_node *n, bitset_t *seen) ir_node *m; be_ifg_foreach_neighbour(ifg, neigh_it, n, m) { - if (!bitset_contains_irn(seen, m) && !arch_irn_is(m, ignore)) { - bitset_add_irn(seen, m); - int_comp_rec(ifg, m, seen); - } + if (bitset_contains_irn(seen, m)) + continue; + + if (arch_get_register_req_out(m)->type & arch_register_req_type_ignore) + continue; + + bitset_add_irn(seen, m); + int_comp_rec(ifg, m, seen); } } @@ -661,11 +663,15 @@ static int int_component_stat(be_irg_t *birg, be_ifg_t *ifg) ir_node *n; be_ifg_foreach_node(ifg, nodes_it, n) { - if (!bitset_contains_irn(seen, n) && !arch_irn_is(n, ignore)) { - ++n_comp; - bitset_add_irn(seen, n); - int_comp_rec(ifg, n, seen); - } + if (bitset_contains_irn(seen, n)) + continue; + + if (arch_get_register_req_out(n)->type & arch_register_req_type_ignore) + continue; + + ++n_comp; + bitset_add_irn(seen, n); + int_comp_rec(ifg, n, seen); } free(seen);