X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemain.c;h=28f6c39606f071852beac9abec8cd4a8c1a4640b;hb=1db02a4692443f95545ede1cabff8c828e33442b;hp=f85257a5b618d1464f2ce227dec3a4eb886d5528;hpb=fb346164b23726c2d46268b47ebe0fccd924b8d5;p=libfirm diff --git a/ir/be/bemain.c b/ir/be/bemain.c index f85257a5b..28f6c3960 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -413,10 +413,6 @@ 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_blocks(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); @@ -424,6 +420,10 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env) /* Remove critical edges */ remove_critical_cf_edges_ex(irg, /*ignore_exception_edges=*/0); + /* For code generation all unreachable code and Bad nodes should be gone */ + remove_unreachable_code(irg); + remove_bads(irg); + /* Ensure, that the ir_edges are computed. */ edges_assure(irg);