From c3bca446c415740a35b343ae9d23f0f431561cb8 Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Wed, 1 Jun 2011 15:48:29 +0200 Subject: [PATCH] remove bads in backend Like the comment says "we can't have Bad-blocks". However, optimize_cf does not remove them anymore. --- ir/be/bemain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ir/be/bemain.c b/ir/be/bemain.c index e64c25a7f..4a6d4628d 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -610,10 +610,11 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) dump(DUMP_ABI, irg, "abi"); } - /* we have to do cfopt+remove_critical_edges as we can't have Bad-blocks - * or critical edges in the backend */ - optimize_cf(irg); + /* We can't have Bad-blocks or critical edges in the backend. + * Before removing Bads, we remove unreachable code. */ + optimize_graph_df(irg); remove_critical_cf_edges(irg); + remove_bads(irg); /* We often have dead code reachable through out-edges here. So for * now we rebuild edges (as we need correct user count for code -- 2.20.1