- fixed r22803
[libfirm] / ir / be / beuses.c
index f17775e..5f4557e 100644 (file)
@@ -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.
  *
@@ -24,9 +24,7 @@
  * @date        27.06.2005
  * @version     $Id$
  */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include <limits.h>
 #include <stdlib.h>
@@ -126,10 +124,12 @@ static int be_is_phi_argument(const ir_node *block, const ir_node *def)
        const ir_edge_t *edge;
        int arity, i;
 
-#if 0
-       if(get_irn_n_edges_kind(block, EDGE_KIND_BLOCK) > 1)
-               return 0;
+#if 1
+       if (get_irn_n_edges_kind(block, EDGE_KIND_BLOCK) < 1)
+#else
+       if (get_irn_n_edges_kind(block, EDGE_KIND_BLOCK) != 1)
 #endif
+               return 0;
 
        foreach_block_succ(block, edge) {
                succ_block = get_edge_src_irn(edge);
@@ -368,15 +368,13 @@ void set_sched_step_walker(ir_node *block, void *data)
                set_irn_link(node, INT_TO_PTR(step));
                if(is_Phi(node))
                        continue;
-               if(is_Proj(node))
-                       continue;
                ++step;
        }
 }
 
 be_uses_t *be_begin_uses(ir_graph *irg, const be_lv_t *lv)
 {
-       be_uses_t *env = xmalloc(sizeof(env[0]));
+       be_uses_t *env = XMALLOC(be_uses_t);
 
        edges_assure(irg);