X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespill.c;h=86bbb178fefdeb6966836e28dbc98ddbd1e8b406;hb=d07cec1341e61a5321ec44d93455bbbac312be75;hp=9d8385c8acb25b8899b258277a507c75951f31fc;hpb=91e2f8d41e5c7d8079427df20d52be05c90deeeb;p=libfirm diff --git a/ir/be/bespill.c b/ir/be/bespill.c index 9d8385c8a..86bbb178f 100644 --- a/ir/be/bespill.c +++ b/ir/be/bespill.c @@ -116,6 +116,8 @@ int cmp_spillinfo(const void *x, const void *y, size_t size) { const spill_info_t *xx = x; const spill_info_t *yy = y; + (void) size; + return xx->to_spill != yy->to_spill; } @@ -687,15 +689,27 @@ ir_node *do_remat(spill_env_t *env, ir_node *spilled, ir_node *reloader) get_irn_arity(spilled), ins); copy_node_attr(spilled, res); new_backedge_info(res); - sched_reset(res); DBG((dbg, LEVEL_1, "Insert remat %+F of %+F before reloader %+F\n", res, spilled, reloader)); +#ifdef SCHEDULE_PROJS /* insert in schedule */ + sched_reset(res); sched_add_before(reloader, res); #ifdef FIRM_STATISTICS - env->remat_count++; + if (! is_Proj(res)) + env->remat_count++; +#endif +#else + if (! is_Proj(res)) { + /* insert in schedule */ + sched_reset(res); + sched_add_before(reloader, res); +#ifdef FIRM_STATISTICS + env->remat_count++; #endif + } +#endif /* SCHEDULE_PROJS */ return res; } @@ -704,6 +718,7 @@ double be_get_spill_costs(spill_env_t *env, ir_node *to_spill, ir_node *after) { ir_node *block = get_nodes_block(after); double freq = get_block_execfreq(env->exec_freq, block); + (void) to_spill; return env->spill_cost * freq; } @@ -880,19 +895,16 @@ void be_insert_spills_reloads(spill_env_t *env) si->reloaders = NULL; } -#ifdef FIRM_STATISTICS - if (be_stat_ev_is_active()) { - be_stat_ev("spill_spills", env->spill_count); - be_stat_ev("spill_reloads", env->reload_count); - be_stat_ev("spill_remats", env->remat_count); - be_stat_ev("spill_spilled_phis", env->spilled_phi_count); - } -#endif + stat_ev_dbl("spill_spills", env->spill_count); + stat_ev_dbl("spill_reloads", env->reload_count); + stat_ev_dbl("spill_remats", env->remat_count); + stat_ev_dbl("spill_spilled_phis", env->spilled_phi_count); - be_remove_dead_nodes_from_schedule(env->irg); /* Matze: In theory be_ssa_construction should take care of the liveness... * try to disable this again in the future */ - be_invalidate_liveness(env->birg); + be_liveness_invalidate(env->birg->lv); + + be_remove_dead_nodes_from_schedule(env->birg); } void be_init_spill(void)