X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbechordal_main.c;h=0c9d4af49ba5a6e400ad420390477113f7b8a971;hb=3dc38f8f23569593c030b85e83ecd9174a95bc73;hp=df3957ef8db941e3569665fc352e28e5ccc3872f;hpb=3a9033bd742aa9ef8e3bb84052b23186021a9618;p=libfirm diff --git a/ir/be/bechordal_main.c b/ir/be/bechordal_main.c index df3957ef8..0c9d4af49 100644 --- a/ir/be/bechordal_main.c +++ b/ir/be/bechordal_main.c @@ -22,11 +22,9 @@ #include "iterator.h" #include "firm_config.h" -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #include "ircons_t.h" #include "irmode_t.h" @@ -82,9 +80,6 @@ static be_ra_chordal_opts_t options = { BE_CH_VRFY_WARN, }; -/** Enable extreme live range splitting. */ -static int be_elr_split = 0; - typedef struct _post_spill_env_t { be_chordal_env_t cenv; be_irg_t *birg; @@ -155,7 +150,6 @@ static const lc_opt_table_entry_t be_chordal_options[] = { LC_OPT_ENT_ENUM_PTR ("perm", "perm lowering options", &lower_perm_var), LC_OPT_ENT_ENUM_MASK("dump", "select dump phases", &dump_var), LC_OPT_ENT_ENUM_PTR ("vrfy", "verify options", &be_ch_vrfy_var), - LC_OPT_ENT_BOOL ("elrsplit", "enable extreme live range splitting", &be_elr_split), { NULL } }; @@ -316,7 +310,6 @@ static unsigned int count_insns(ir_graph *irg) return cnt; } -#ifdef WITH_LIBCORE /** * Initialize all timers. */ @@ -373,13 +366,6 @@ static void be_init_timer(be_options_t *main_opts) lc_timer_get_name(tmp), lc_timer_get_name(timer)); \ timer = tmp; \ } -#else - -#define BE_TIMER_INIT(main_opts) -#define BE_TIMER_PUSH(timer) -#define BE_TIMER_POP(timer) - -#endif /* WITH_LIBCORE */ /** * Perform things which need to be done per register class before spilling. @@ -415,6 +401,7 @@ static void pre_spill(const arch_isa_t *isa, int cls_idx, post_spill_env_t *pse) if (be_stat_ev_is_active()) { pse->pre_spill_cost = be_estimate_irg_costs(birg->irg, birg->main_env->arch_env, birg->exec_freq); + be_stat_ev_pop(); } #endif /* FIRM_STATISTICS */ } @@ -428,13 +415,15 @@ static void post_spill(post_spill_env_t *pse, int iteration) { ir_graph *irg = birg->irg; const be_main_env_t *main_env = birg->main_env; be_options_t *main_opts = main_env->options; - static int splitted = 0; node_stat_t node_stat; #ifdef FIRM_STATISTICS if (be_stat_ev_is_active()) { double spillcosts = be_estimate_irg_costs(irg, main_env->arch_env, birg->exec_freq) - pse->pre_spill_cost; + be_stat_tags[STAT_TAG_CLS] = pse->cls->name; + be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file); + be_stat_ev_l("spillcosts", (long) spillcosts); node_stats(birg, pse->cls, &node_stat); @@ -469,11 +458,6 @@ static void post_spill(post_spill_env_t *pse, int iteration) { } BE_TIMER_POP(ra_timer.t_verify); - if (be_elr_split && ! splitted) { - extreme_liverange_splitting(chordal_env); - splitted = 1; - } - /* Color the graph. */ BE_TIMER_PUSH(ra_timer.t_color); be_ra_chordal_color(chordal_env); @@ -590,8 +574,7 @@ static void be_ra_chordal_main(be_irg_t *birg) post_spill(&pse, 0); } - } - else { + } else { post_spill_env_t *pse; /* the backend has it's own spiller */ @@ -615,26 +598,7 @@ static void be_ra_chordal_main(be_irg_t *birg) } } - BE_TIMER_PUSH(ra_timer.t_spillslots); - - be_coalesce_spillslots(&chordal_env); - dump(BE_CH_DUMP_SPILLSLOTS, irg, NULL, "-spillslots", dump_ir_block_graph_sched); - - BE_TIMER_POP(ra_timer.t_spillslots); - - BE_TIMER_PUSH(ra_timer.t_verify); - /* verify spillslots */ - if (options.vrfy_option == BE_CH_VRFY_WARN) { - be_verify_spillslots(main_env->arch_env, irg); - } - else if (options.vrfy_option == BE_CH_VRFY_ASSERT) { - assert(be_verify_spillslots(main_env->arch_env, irg) && "Spillslot verification failed"); - } - BE_TIMER_POP(ra_timer.t_verify); - BE_TIMER_PUSH(ra_timer.t_epilog); - dump(BE_CH_DUMP_LOWER, irg, NULL, "-spilloff", dump_ir_block_graph_sched); - lower_nodes_after_ra(birg, options.lower_perm_opt & BE_CH_LOWER_PERM_COPY ? 1 : 0); dump(BE_CH_DUMP_LOWER, irg, NULL, "-belower-after-ra", dump_ir_block_graph_sched);