Fixed initialization of option tables
[libfirm] / ir / opt / condeval.c
index c26d906..c7c6683 100644 (file)
 #include "config.h"
 #endif
 
+#include "iroptimize.h"
+
 #include <assert.h>
 #include "array.h"
-#include "condeval.h"
 #include "debug.h"
 #include "ircons.h"
 #include "irgmod.h"
@@ -210,7 +211,7 @@ static void copy_and_fix(ir_node *block, ir_node *copy_block, int j, const conde
                ir_mode *mode = get_irn_mode(node);
 
                /* ignore control flow */
-               if (mode == mode_X)
+               if (mode == mode_X || is_Cond(node))
                        continue;
                /* we may not copy mode_b nodes, because this could produce phi with mode_bs which can't
                   be handled in all backends. Instead we duplicate the node and move it to it's users */
@@ -269,7 +270,7 @@ static void copy_and_fix(ir_node *block, ir_node *copy_block, int j, const conde
                ir_node *node = get_edge_src_irn(edge);
                ir_mode *mode = get_irn_mode(node);
 
-               if (mode == mode_X)
+               if (mode == mode_X || is_Cond(node))
                        continue;
                if (mode == mode_b)
                        continue;
@@ -512,6 +513,7 @@ void opt_cond_eval(ir_graph* irg)
 
        if (changed) {
                /* control flow changed, some blocks may become dead */
+               set_irg_outs_inconsistent(irg);
                set_irg_doms_inconsistent(irg);
                set_irg_extblk_inconsistent(irg);
                set_irg_loopinfo_inconsistent(irg);