+ irg_walk_graph(irg, rescue_used_reloads, NULL, bel->reloads);
+ for(irn = pset_first(bel->reloads); irn; irn = pset_next(bel->reloads)) {
+ ir_node *spill;
+ DBG((dbg, DBG_SPILL, "Removing %+F before %+F in %+F\n", irn, sched_next(irn), get_nodes_block(irn)));
+
+ spill = get_irn_n(irn, 0);
+
+ /* remove reload */
+ set_irn_n(irn, 0, new_Bad());
+ sched_remove(irn);
+
+ /* if spill not used anymore, remove it too
+ * test of regclass is necessary since spill may be a phi-M */
+ if (get_irn_n_edges(spill) == 0 && bel->cls == arch_get_irn_reg_class(bel->arch, spill, -1)) {
+ set_irn_n(spill, 0, new_Bad());
+ sched_remove(spill);
+ }
+ }
+}
+
+void be_spill_belady(const be_chordal_env_t *chordal_env) {
+ belady_env_t bel;
+