{ NULL, 0 }
};
-static const lc_opt_enum_int_items_t lower_perm_stat_items[] = {
- { NULL, 0 }
-};
-
static const lc_opt_enum_int_items_t dump_items[] = {
{ "none", BE_CH_DUMP_NONE },
{ "spill", BE_CH_DUMP_SPILL },
}
/**
- * Checks for every reload if its user can perform the load on itself.
+ * Post-Walker: Checks for the given reload if has only one user that can perform the
+ * reload as part of its address mode.
+ * Fold the reload into the user it that is possible.
*/
static void memory_operand_walker(ir_node *irn, void *env)
{
}
}
- /* kill the Reload */
+ /* kill the Reload if it was folded */
if (get_irn_n_edges(irn) == 0) {
ir_graph *irg = get_irn_irg(irn);
+ ir_mode *frame_mode = get_irn_mode(get_irn_n(irn, n_be_Reload_frame));
sched_remove(irn);
- set_irn_n(irn, n_be_Reload_mem, new_r_Bad(irg));
- set_irn_n(irn, n_be_Reload_frame, new_r_Bad(irg));
+ set_irn_n(irn, n_be_Reload_mem, new_r_Bad(irg, mode_X));
+ set_irn_n(irn, n_be_Reload_frame, new_r_Bad(irg, frame_mode));
}
}
be_assure_liveness(irg);
be_liveness_assure_chk(be_get_irg_liveness(irg));
- stat_ev_do(pse->pre_spill_cost = be_estimate_irg_costs(irg, exec_freq));
+ if (stat_ev_enabled) {
+ pse->pre_spill_cost = be_estimate_irg_costs(irg, exec_freq);
+ }
/* put all ignore registers into the ignore register set. */
be_put_allocatable_regs(irg, pse->cls, chordal_env->allocatable_regs);
chordal_env->ifg = be_create_ifg(chordal_env);
be_timer_pop(T_RA_IFG);
- stat_ev_if {
+ if (stat_ev_enabled) {
be_ifg_stat_t stat;
be_node_stats_t node_stats;
be_timer_pop(T_RA_PROLOG);
- stat_ev_if {
+ if (stat_ev_enabled) {
be_collect_node_stats(&last_node_stats, irg);
}
stat_ev_ctx_push_str("bechordal_cls", cls->name);
- stat_ev_if {
+ if (stat_ev_enabled) {
be_do_stat_reg_pressure(irg, cls);
}
- memcpy(&pse.cenv, &chordal_env, sizeof(chordal_env));
+ pse.cenv = chordal_env;
pse.irg = irg;
pre_spill(&pse, cls);
post_spill(&pse, 0);
- stat_ev_if {
+ if (stat_ev_enabled) {
be_node_stats_t node_stats;
be_collect_node_stats(&node_stats, irg);