adapted (some parts) to abi changes
[libfirm] / ir / be / beuses.c
index fec0eea..0da731f 100644 (file)
@@ -33,6 +33,8 @@
 #include "bearch.h"
 #include "beuses_t.h"
 
+#define DBG_LEVEL SET_LEVEL_0
+
 typedef struct _be_use_t {
        const ir_node *bl;
        const ir_node *irn;
@@ -129,7 +131,7 @@ unsigned be_get_next_use(be_uses_t *uses,
        next_use = USES_INFINITY;
        foreach_block_succ(bl, succ_edge) {
                const ir_node *succ_bl = succ_edge->src;
-               if(is_live_in(succ_bl, def)) {
+               if(is_live_in(succ_bl, def) || (get_irn_arity(succ_bl) > 1 && is_live_end(bl, def))) {
                        unsigned next = get_next_use_bl(uses, succ_bl, def);
 
                        DBG((uses->dbg, LEVEL_2, "\t\tnext use in succ %+F: %d\n", succ_bl, next));
@@ -153,7 +155,7 @@ be_uses_t *be_begin_uses(
   uses->arch_env = arch_env;
   uses->uses     = new_set(cmp_use, 512);
   uses->dbg      = firm_dbg_register("be.uses");
-  firm_dbg_set_mask(uses->dbg, SET_LEVEL_0);
+  firm_dbg_set_mask(uses->dbg, DBG_LEVEL);
 
   return uses;
 }