X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeilpsched.c;h=b507a5a39f96eb9756f9cbce50d2c60b51584f10;hb=156465e36d6104585cfabe492e20d53f12555efa;hp=fab9262bcb21dd122d866aca641baee6c08517e1;hpb=a39875e8317d248b8d75669b3e19d2ce356b0f90;p=libfirm diff --git a/ir/be/beilpsched.c b/ir/be/beilpsched.c index fab9262bc..b507a5a39 100644 --- a/ir/be/beilpsched.c +++ b/ir/be/beilpsched.c @@ -31,6 +31,7 @@ #include "irtools.h" #include "irdump.h" #include "plist.h" +#include "irprintf.h" #include #include @@ -44,6 +45,7 @@ #include "besched_t.h" #include "beilpsched.h" #include "beutil.h" +#include "bestat.h" typedef struct _ilpsched_options_t { unsigned regpress; @@ -1915,10 +1917,30 @@ static void create_ilp(ir_node *block, void *walk_env) { } /* apply solution */ - if (need_heur) +#ifdef FIRM_STATISTICS + if (be_stat_ev_is_active()) { + be_stat_ev("nodes", ba->block_last_idx); + } +#endif /* FIRM_STATISTICS */ + if (need_heur) { +#ifdef FIRM_STATISTICS + if (be_stat_ev_is_active()) { + be_stat_ev("time", -1); + } +#endif /* FIRM_STATISTICS */ list_sched_single_block(env->birg, block, env->be_opts); - else + } + else { +#ifdef FIRM_STATISTICS + if (be_stat_ev_is_active()) { + if (lpp) + be_stat_ev_dbl("time", lpp->sol_time); + else + be_stat_ev("time", 0); + } +#endif /* FIRM_STATISTICS */ apply_solution(env, lpp, block); + } if (lpp) free_lpp(lpp); @@ -1938,6 +1960,13 @@ void be_ilp_sched(const be_irg_t *birg, be_options_t *be_opts) { FIRM_DBG_REGISTER(env.dbg, "firm.be.sched.ilp"); +#ifdef FIRM_STATISTICS + if (be_stat_ev_is_active()) { + be_stat_tags[STAT_TAG_CLS] = "ilpsched"; + be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file); + } +#endif /* FIRM_STATISTICS */ + // firm_dbg_set_mask(env.dbg, 1); env.irg_env = be_ilp_sched_init_irg_ilp_schedule(sel, birg->irg); @@ -1992,6 +2021,12 @@ void be_ilp_sched(const be_irg_t *birg, be_options_t *be_opts) { /* notify backend */ be_ilp_sched_finish_irg_ilp_schedule(sel, birg->irg, env.irg_env); + +#ifdef FIRM_STATISTICS + if (be_stat_ev_is_active()) { + be_stat_ev_pop(); + } +#endif /* FIRM_STATISTICS */ } /**