fix negated set pnc with float compare problem
[libfirm] / ir / be / beschednormal.c
index 0fc950e..aa8ad83 100644 (file)
@@ -20,7 +20,7 @@
 /**
  * @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"
@@ -34,6 +34,7 @@
 #include "beutil.h"
 #include "irtools.h"
 #include "irgwalk.h"
+#include "benode_t.h"
 
 
 // XXX there is no one time init for schedulers
@@ -105,6 +106,10 @@ static int count_result(const ir_node* irn)
 }
 
 
+/* TODO high cost for store trees
+ */
+
+
 static int normal_tree_cost(ir_node* irn)
 {
        flag_and_cost* fc    = get_irn_link(irn);
@@ -129,7 +134,7 @@ static int normal_tree_cost(ir_node* 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;
@@ -238,6 +243,8 @@ static ir_node** sched_node(ir_node** sched, ir_node* irn)
 
        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;