Reverted r27079. Seems to be wrong.
[libfirm] / ir / be / beirgmod.c
index 0181e04..5c69c2f 100644 (file)
 
 #include "be_t.h"
 #include "bechordal_t.h"
-#include "bearch_t.h"
-#include "besched_t.h"
+#include "bearch.h"
+#include "besched.h"
 #include "belive_t.h"
-#include "benode_t.h"
+#include "benode.h"
 #include "beutil.h"
 #include "beinsn_t.h"
 #include "bessaconstr.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beirgmod.h"
 #include "bemodule.h"
 
@@ -85,7 +85,6 @@ ir_node *insert_Perm_after(be_irg_t *birg,
 {
        be_lv_t *lv     = birg->lv;
        ir_node *bl     = is_Block(pos) ? pos : get_nodes_block(pos);
-       ir_graph *irg   = get_irn_irg(bl);
        ir_nodeset_t          live;
        ir_nodeset_iterator_t iter;
 
@@ -165,7 +164,8 @@ static void remove_empty_block(ir_node *block)
                goto check_preds;
 
        sched_foreach(block, node) {
-               if (! is_Jmp(node))
+               if (! is_Jmp(node)
+                               && !(arch_irn_get_flags(node) & arch_irn_flags_simple_jump))
                        goto check_preds;
                if (jump != NULL) {
                        /* we should never have 2 jumps in a block */
@@ -215,8 +215,8 @@ static void remove_empty_block(ir_node *block)
                        continue;
                }
                /* we simply kill Pins, because there are some strange interactions
-                * between condeval, which produce PhiMs with Pins, we simply kill
-                * the pins here, everything is scheduled anyway */
+                * between jump threading, which produce PhiMs with Pins, we simply
+                * kill the pins here, everything is scheduled anyway */
                if (is_Pin(node)) {
                        exchange(node, get_Pin_op(node));
                        continue;