register slots are now automatically allocated together with the $ARCH_attribute
[libfirm] / ir / be / belistsched.c
index bffc885..47b510a 100644 (file)
@@ -28,6 +28,7 @@
 #include "irprintf_t.h"
 #include "array.h"
 #include "debug.h"
+#include "irtools.h"
 
 #include "besched_t.h"
 #include "beutil.h"
@@ -37,9 +38,6 @@
 #include "bearch.h"
 #include "bestat.h"
 
-#define MAX(x,y) ((x) > (y) ? (x) : (y))
-#define MIN(x,y) ((x) < (y) ? (x) : (y))
-
 /**
  * All scheduling info needed per node.
  */
@@ -698,6 +696,9 @@ static int is_root(ir_node *root, ir_node *block) {
 
                if (is_Block(succ))
                        continue;
+               /* Phi nodes are always in "another block */
+               if (is_Phi(succ))
+                       continue;
                if (get_nodes_block(succ) == block)
                        return 0;
        }