X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=driver%2Ffirm_opt.c;h=f0cddebb24add56f498c31a07426aa25ef10ea9f;hb=8b02727be2ef5bf846b3efdaa9a7b34b68cf45e9;hp=d2c976276fdf7580912aa6297976a5c2ea6f27c8;hpb=99fd093374df15b5aaf15f48a900d1a9a012dbd4;p=cparser diff --git a/driver/firm_opt.c b/driver/firm_opt.c index d2c9762..f0cddeb 100644 --- a/driver/firm_opt.c +++ b/driver/firm_opt.c @@ -20,6 +20,10 @@ #include "firm_cmdline.h" #include "firm_timing.h" +#ifdef _WIN32 +#define snprintf _snprintf +#endif + #if defined(_DEBUG) || defined(FIRM_DEBUG) #define DBG(x) dbg_printf x #else @@ -288,6 +292,7 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi ir_graph *irg; unsigned aa_opt; + /* FIXME: cloning might ADD new graphs. */ irg_dump_no = calloc(get_irp_last_idx(), sizeof(*irg_dump_no)); set_opt_strength_red(firm_opt.strength_red); @@ -337,7 +342,7 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi if (firm_opt.func_calls) { timer_push(TV_REAL_FUNC_CALL); - optimize_funccalls(firm_const_exists); + optimize_funccalls(firm_const_exists, NULL); timer_pop(); DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "func_call"); CHECK_ALL(firm_opt.check_all); @@ -351,6 +356,9 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi CHECK_ALL(firm_opt.check_all); } + /* do lowering on the const code irg */ + lower_const_code(); + for (i = 0; i < get_irp_n_irgs(); i++) { irg = current_ir_graph = get_irp_irg(i); @@ -425,6 +433,7 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi if (firm_opt.luffig) { opt_ldst2(irg); DUMP_ONE_C(firm_dump.ir_graph && firm_dump.all_phases, irg, "ldst2"); + CHECK_ONE(firm_opt.check_all, irg); } timer_push(TV_CF_OPT); @@ -519,7 +528,7 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi } timer_push(TV_OSR); - opt_osr(current_ir_graph, osr_flag_default /*| osr_flag_ignore_x86_shift*/); + opt_osr(current_ir_graph, osr_flag_default | osr_flag_keep_reg_pressure | osr_flag_ignore_x86_shift); timer_pop(); DUMP_ONE_C(firm_dump.ir_graph && firm_dump.all_phases, irg, "stred"); CHECK_ONE(firm_opt.check_all, irg); @@ -541,6 +550,7 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi if (firm_opt.cloning) { proc_cloning((float)firm_opt.clone_threshold); DUMP_ALL_C(firm_dump.ir_graph && firm_dump.all_phases, "clone"); + CHECK_ALL(firm_opt.check_all); } if (firm_dump.ir_graph) {