#include "xmalloc.h"
#include "beutil.h"
-#include "bearch.h"
+#include "bearch_t.h"
#include "bespillbelady.h"
#include "beuses_t.h"
#include "besched_t.h"
}
pressure = be_get_loop_pressure(env->loop_ana, env->cls, loop);
- assert(ARR_LEN(delayed) <= pressure);
+ assert(ARR_LEN(delayed) <= (signed)pressure);
free_slots = env->n_regs - ARR_LEN(starters);
free_pressure_slots = env->n_regs - (pressure - ARR_LEN(delayed));
free_slots = MIN(free_slots, free_pressure_slots);
}
}
-void be_spill_belady(be_irg_t *birg, const arch_register_class_t *cls) {
+/**
+ * Do spilling for a register class on a graph using the belady heuristic.
+ * In the transformed graph, the register pressure never exceeds the number
+ * of available registers.
+ *
+ * @param birg The backend graph
+ * @param cls The register class to spill
+ */
+static void be_spill_belady(be_irg_t *birg, const arch_register_class_t *cls) {
be_spill_belady_spill_env(birg, cls, NULL);
}