/**
* @brief Use the strong normal form theorem (though it does not hold)
* @author Christoph Mallon
- * @version $Id: beschedrand.c 14604 2007-06-18 14:07:07Z matze $
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "beutil.h"
#include "irtools.h"
#include "irgwalk.h"
+#include "benode_t.h"
// XXX there is no one time init for schedulers
}
+/* TODO high cost for store trees
+ */
+
+
static int normal_tree_cost(ir_node* irn)
{
flag_and_cost* fc = get_irn_link(irn);
ir_node* pred = get_irn_n(irn, i);
int cost;
- if (is_Phi(irn) || get_irn_mode(pred) == mode_M) {
+ if (is_Phi(irn) || get_irn_mode(pred) == mode_M || is_Block(pred)) {
cost = 0;
} else if (get_nodes_block(pred) != block) {
cost = 1;
if (irn_visited(irn)) return sched;
+ if (is_End(irn)) return sched;
+
if (!is_Phi(irn)) {
for (i = 0; i < arity; ++i) {
ir_node* pred = irns[i].irn;