{
const spill_info_t *xx = x;
const spill_info_t *yy = y;
+ (void) size;
+
return xx->to_spill != yy->to_spill;
}
#endif
}
+ assert(!is_Proj(before) && !be_is_Keep(before));
+
/* put reload into list */
rel = obstack_alloc(&env->obst, sizeof(rel[0]));
rel->next = info->reloaders;
void sched_add_after_insn(ir_node *sched_after, ir_node *node)
{
ir_node *next = sched_next(sched_after);
- while(is_Proj(next) || is_Phi(next)) {
+ while(is_Proj(next) || is_Phi(next) || be_is_Keep(next)) {
next = sched_next(next);
}
assert(next != NULL);
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));
- /* insert in schedule */
- sched_add_before(reloader, res);
+ if (! is_Proj(res)) {
+ /* insert in schedule */
+ sched_reset(res);
+ sched_add_before(reloader, res);
#ifdef FIRM_STATISTICS
- env->remat_count++;
+ env->remat_count++;
#endif
+ }
return res;
}
{
ir_node *block = get_nodes_block(after);
double freq = get_block_execfreq(env->exec_freq, block);
+ (void) to_spill;
return env->spill_cost * freq;
}
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)