summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beprefalloc.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-06-19 07:15:54 +0200
committerMatthias Braun <matze@braunis.de>2015-06-19 07:17:53 +0200
commitf1d0154c8a329e88394f24c39093f6566714d493 (patch)
tree50ba2c4f3a8adf629d8f0f6cde17d37c23915f99 /ir/be/beprefalloc.c
parent89a5cac65f5e45b405217c7dc167eb2b27ed2206 (diff)
break arch_isa_if_t furhter apart by moving spilling related callbacks into an own struct
Diffstat (limited to 'ir/be/beprefalloc.c')
-rw-r--r--ir/be/beprefalloc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ir/be/beprefalloc.c b/ir/be/beprefalloc.c
index 70475b3..a0addca 100644
--- a/ir/be/beprefalloc.c
+++ b/ir/be/beprefalloc.c
@@ -1794,11 +1794,11 @@ static void be_pref_alloc_cls(void)
/**
* Run the spiller on the current graph.
*/
-static void spill(void)
+static void spill(const regalloc_if_t *regif)
{
/* spill */
be_timer_push(T_RA_SPILL);
- be_do_spill(irg, cls);
+ be_do_spill(irg, cls, regif);
be_timer_pop(T_RA_SPILL);
be_timer_push(T_RA_SPILL_APPLY);
@@ -1811,7 +1811,7 @@ static void spill(void)
/**
* The pref register allocator for a whole procedure.
*/
-static void be_pref_alloc(ir_graph *new_irg)
+static void be_pref_alloc(ir_graph *new_irg, const regalloc_if_t *regif)
{
/* disable optimization callbacks as we cannot deal with same-input phis
* getting optimized away. */
@@ -1838,7 +1838,7 @@ static void be_pref_alloc(ir_graph *new_irg)
normal_regs = rbitset_malloc(n_regs);
be_get_allocatable_regs(irg, cls, normal_regs);
- spill();
+ spill(regif);
/* verify schedule and register pressure */
if (be_options.do_verify) {
@@ -1871,7 +1871,6 @@ static void be_pref_alloc(ir_graph *new_irg)
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_pref_alloc)
void be_init_pref_alloc(void)
{
- static be_ra_t be_ra_pref = { be_pref_alloc };
- be_register_allocator("pref", &be_ra_pref);
+ be_register_allocator("pref", be_pref_alloc);
FIRM_DBG_REGISTER(dbg, "firm.be.prefalloc");
}