change unreachable code elmination to the simpler remove links into unreachable code...
[libfirm] / ir / be / bemain.c
index 47eceac..d02d543 100644 (file)
@@ -413,6 +413,10 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        /* set the current graph (this is important for several firm functions) */
        current_ir_graph = irg;
 
+       /* For code generation all unreachable code and Bad nodes should be gone */
+       remove_unreachable_code(irg);
+       remove_bads(irg);
+
        /* we do this before critical edge split. As this produces less returns,
           because sometimes (= 164.gzip) multiple returns are slower */
        normalize_n_returns(irg);