From 4108c0705fd20d5ecc77ae92ab28a822053428ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Mon, 29 May 2006 14:04:22 +0000 Subject: [PATCH] switch off firm optimization setting for certain backend phases --- ir/be/bemain.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 67b0de214..fed45eaab 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -309,6 +309,7 @@ static void be_main_loop(FILE *file_handle) ir_graph *irg = get_irp_irg(i); const arch_code_generator_if_t *cg_if; be_irg_t birg; + int save_optimize, save_normalize; birg.irg = irg; birg.main_env = &env; @@ -368,6 +369,12 @@ static void be_main_loop(FILE *file_handle) be_do_stat_nodes(irg, "04 Schedule"); + /* we switch off optimizations here, because they might cause trouble */ + save_optimize = get_optimize(); + save_normalize = get_opt_normalize(); + set_optimize(0); + set_opt_normalize(0); + /* add Keeps for should_be_different constrained nodes */ /* beware: needs schedule due to usage of be_ssa_constr */ assure_constraints(&birg); @@ -403,7 +410,12 @@ static void be_main_loop(FILE *file_handle) be_do_stat_nodes(irg, "07 Final"); -// free_ir_graph(irg); + /* reset the optimizations */ + set_optimize(save_optimize); + set_opt_normalize(save_normalize); + + /* switched of due to statistics (statistic module needs all irgs) */ + // free_ir_graph(irg); } be_done_env(&env); } -- 2.20.1