X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemain.c;h=751c445e2f833904472478be1850ab8b9e8e4b97;hb=48f0393daa5d5a14ed7e3e32ee2b090759c9371e;hp=c3edadab23bb34d5de657e32f3d801a551e4b84e;hpb=631cafb4a394c528e70a399d286abb5b33ef365c;p=libfirm diff --git a/ir/be/bemain.c b/ir/be/bemain.c index c3edadab2..751c445e2 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -65,6 +65,7 @@ #include "bestat.h" #include "beverify.h" #include "beprofile.h" +#include "beblocksched.h" #include "be_dbgout.h" /* options visible for anyone */ @@ -155,7 +156,7 @@ static const lc_opt_table_entry_t be_main_options[] = { LC_OPT_ENT_ENUM_PTR ("isa", "the instruction set architecture", &isa_var), LC_OPT_ENT_NEGBOOL ("noomitfp", "do not omit frame pointer", &be_options.omit_fp), LC_OPT_ENT_BOOL ("stabs", "enable stabs debug support", &be_options.stabs_debug_support), - LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg (off, warn, assert)", &vrfy_var), + LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg", &vrfy_var), LC_OPT_ENT_BOOL ("time", "get backend timing statistics", &be_options.timing), LC_OPT_ENT_BOOL ("profile", "instrument the code for execution count profiling", &be_options.opt_profile), @@ -196,6 +197,8 @@ void be_opt_register(void) /* scheduler register options */ list_sched_register_options(be_grp_root); + + be_block_schedule_register_options(be_grp_root); } #endif /* WITH_LIBCORE */ } @@ -475,6 +478,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) optimization_state_t state; const arch_code_generator_if_t *cg_if; + /* set the current graph (this is important for several firm functions) */ + current_ir_graph = irg; + /* stop and reset timers */ BE_TIMER_ONLY( LC_STOP_AND_RESET_TIMER(t_abi); @@ -492,7 +498,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) /** * Create execution frequencies from profile data or estimate some */ - if(be_profile_has_data()) { + if (be_profile_has_data()) { birg->execfreqs = be_create_execfreqs_from_profile(irg); } else { birg->execfreqs = compute_execfreq(irg, 10); @@ -509,9 +515,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) /* some transformations need to be done before abi introduce */ arch_code_generator_before_abi(birg->cg); - /* set the current graph (this is important for several firm functions) */ - current_ir_graph = irg; - /* reset the phi handler. */ be_phi_handler_reset(env.phi_handler); @@ -534,7 +537,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) Since the code generator made a lot of new nodes and skipped a lot of old ones, we should do dead node elimination here. Note that this requires disabling the edges here. - */ + */ edges_deactivate(irg); //dead_node_elimination(irg); edges_activate(irg);