X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgopt.c;h=256296c8b31cf288f77055d4a9a461ffc6acb03c;hb=eb47aca33f2f8c414409f3695e73277b47442334;hp=fc27fb53a057d69cae013b07a09e8331521580c8;hpb=a8c690b3d1079f286aae78f5a1ee8d246a39048d;p=libfirm diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index fc27fb53a..256296c8b 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -181,22 +181,22 @@ int optimize_graph_df(ir_graph *irg) current_ir_graph = irg; state = edges_assure(irg); + assure_doms(irg); /* Clean the value_table in irg for the CSE. */ new_identities(irg); if (get_opt_global_cse()) { set_irg_pinned(irg, op_pin_state_floats); - } else { - /* The following enables unreachable code elimination (=Blocks may be - * Bad). We cannot enable it in global_cse nodes since we can't - * determine a nodes block there and therefore can't remove all code - * in unreachable blocks */ - set_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK); - if (get_irg_dom_state(irg) == dom_consistent) - irg_block_walk_graph(irg, NULL, kill_dead_blocks, NULL); } + /* The following enables unreachable code elimination (=Blocks may be + * Bad). We cannot enable it in global_cse nodes since we can't + * determine a nodes block there and therefore can't remove all code + * in unreachable blocks */ + set_irg_state(irg, IR_GRAPH_STATE_BAD_BLOCK); + irg_block_walk_graph(irg, NULL, kill_dead_blocks, NULL); + /* invalidate info */ set_irg_outs_inconsistent(irg); set_irg_doms_inconsistent(irg);