- invalidate tr_outs because Calls might be removed
[libfirm] / ir / opt / opt_blocks.c
index 647f51d..d9771c7 100644 (file)
@@ -32,6 +32,7 @@
 #include "irgraph_t.h"
 #include "irnode_t.h"
 #include "iropt_t.h"
+#include "trouts.h"
 #include "set.h"
 #include "debug.h"
 
@@ -466,10 +467,13 @@ void propagate_blocks(partition_t *part, environment_t *env) {
 
                                if (block != bl->block) {
                                        p_node = create_node(pred, env);
-                                       p_node->is_input = 1;
                                        add_node(bl, p_node);
-                                       if (! is_Phi(irn))
-                                               add_pair(bl, irn, i, env);
+                                       /* do not threat Constants like live-ins */
+                                       if (! is_irn_constlike(irn)) {
+                                               p_node->is_input = 1;
+                                               if (! is_Phi(irn))
+                                                       add_pair(bl, irn, i, env);
+                                       }
                                } else if (! irn_visited_else_mark(pred)) {
                                        /* not yet visited, ok */
                                        p_node = create_node(pred, env);
@@ -693,6 +697,9 @@ found:
        set_irg_doms_inconsistent(irg);
        /* Hmm, only the root loop is inconsistent */
        set_irg_loopinfo_inconsistent(irg);
+
+       /* Calls might be removed. */
+       set_trouts_inconsistent();
 }  /* apply */
 
 /* Combines congruent end blocks into one. */