X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeloopana.c;h=9d2f81260751eb4fed8a9dea3158e93533c5c86f;hb=c6571686bfbfb3c87ae24ae1dc568e685d6cd49a;hp=8c9b613915be45135a41e0a8f16a6f2e57356d65;hpb=7d5b331123bd8399f5f1d057e90797faa3300b66;p=libfirm diff --git a/ir/be/beloopana.c b/ir/be/beloopana.c index 8c9b61391..9d2f81260 100644 --- a/ir/be/beloopana.c +++ b/ir/be/beloopana.c @@ -22,14 +22,13 @@ * @brief Compute register pressure in loops. * @author Christian Wuerdig * @date 19.02.2007 - * @version $Id$ */ #include "config.h" #include "set.h" #include "pset.h" #include "irnode.h" -#include "irtools.h" +#include "util.h" #include "irloop_t.h" #include "error.h" #include "debug.h" @@ -42,7 +41,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;) -#define HASH_LOOP_INFO(info) (HASH_PTR((info)->loop) ^ HASH_PTR((info)->cls)) +#define HASH_LOOP_INFO(info) (hash_ptr((info)->loop) ^ hash_ptr((info)->cls)) typedef struct be_loop_info_t { ir_loop *loop; @@ -166,10 +165,7 @@ be_loopana_t *be_new_loop_pressure_cls(ir_graph *irg, DBG((dbg, LEVEL_1, " Computing register pressure for class %s:\n", cls->name)); DBG((dbg, LEVEL_1, "=====================================================\n", cls->name)); - /* construct control flow loop tree */ - if (! (get_irg_loopinfo_state(irg) & loopinfo_cf_consistent)) { - construct_cf_backedges(irg); - } + assure_loopinfo(irg); be_compute_loop_pressure(loop_ana, get_irg_loop(irg), cls); @@ -192,10 +188,7 @@ be_loopana_t *be_new_loop_pressure(ir_graph *irg, loop_ana->data = new_set(cmp_loop_info, 16); loop_ana->irg = irg; - /* construct control flow loop tree */ - if (! (get_irg_loopinfo_state(irg) & loopinfo_cf_consistent)) { - construct_cf_backedges(irg); - } + assure_loopinfo(irg); if (cls != NULL) { be_compute_loop_pressure(loop_ana, irg_loop, cls);