From 3dceaf7b51dbe63c4588dc92e92f71ddbfe32e9c Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 1 Dec 2008 10:32:12 +0000 Subject: [PATCH] we can't guarantee that there won't be dead blocks, so remove them [r24175] --- ir/be/ia32/bearch_ia32.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 7bdbf2698..9cf6a0183 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -867,11 +867,18 @@ static void ia32_before_abi(void *self) { * Transforms the standard firm graph into * an ia32 firm graph */ -static void ia32_prepare_graph(void *self) { - ia32_code_gen_t *cg = self; +static void ia32_prepare_graph(void *self) +{ + ia32_code_gen_t *cg = self; + ir_graph *irg = cg->irg; /* do local optimizations */ - optimize_graph_df(cg->irg); + optimize_graph_df(irg); + + /* we have to do cfopt+remove_critical_edges as we can't have Bad-blocks + * or critical edges in the backend */ + optimize_cf(irg); + remove_critical_cf_edges(irg); /* TODO: we often have dead code reachable through out-edges here. So for * now we rebuild edges (as we need correct user count for code selection) -- 2.20.1