#include "irprintf_t.h"
#include "array.h"
#include "debug.h"
+#include "irtools.h"
#include "besched_t.h"
#include "beutil.h"
#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.
*/
assert(get_irn_mode(irn) == mode_T && "Mode of node must be tuple");
+ if(is_Bad(irn))
+ return;
+
foreach_out_edge(irn, edge) {
ir_node *out = edge->src;
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;
}