};
static const lc_opt_enum_int_items_t dump_items[] = {
+ { "none", BE_CH_DUMP_NONE },
{ "spill", BE_CH_DUMP_SPILL },
{ "live", BE_CH_DUMP_LIVE },
{ "color", BE_CH_DUMP_COLOR },
/**
* Perform things which need to be done per register class after spilling.
*/
-static void post_spill(post_spill_env_t *pse) {
+static void post_spill(post_spill_env_t *pse, int iteration) {
be_chordal_env_t *chordal_env = &pse->cenv;
be_irg_t *birg = pse->birg;
ir_graph *irg = birg->irg;
}
#endif /* FIRM_STATISTICS */
- check_for_memory_operands(chordal_env);
-
- be_abi_fix_stack_nodes(birg->abi, birg->lv);
+ /*
+ If we have a backend provided spiller, post spill is
+ called in a loop after spilling for each register class.
+ But we only need to fix stack nodes once in this case.
+ */
+ if (iteration == 0) {
+ check_for_memory_operands(chordal_env);
+ be_abi_fix_stack_nodes(birg->abi, birg->lv);
+ }
BE_TIMER_PUSH(ra_timer.t_verify);
pre_spill(isa, j, &pse);
BE_TIMER_PUSH(ra_timer.t_spill);
- be_do_spill(&pse.cenv);
+ be_do_spill(birg, pse.cls);
BE_TIMER_POP(ra_timer.t_spill);
dump(BE_CH_DUMP_SPILL, irg, pse.cls, "-spill", dump_ir_block_graph_sched);
- post_spill(&pse);
+ post_spill(&pse, 0);
}
}
else {
dump(BE_CH_DUMP_SPILL, irg, NULL, "-spill", dump_ir_block_graph_sched);
for (j = 0; j < m; ++j) {
- post_spill(&pse[j]);
+ post_spill(&pse[j], j);
}
}