summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bera.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/bera.c
parent89a5cac65f5e45b405217c7dc167eb2b27ed2206 (diff)
break arch_isa_if_t furhter apart by moving spilling related callbacks into an own struct
Diffstat (limited to 'ir/be/bera.c')
-rw-r--r--ir/be/bera.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ir/be/bera.c b/ir/be/bera.c
index 7df5611..ecf98c6 100644
--- a/ir/be/bera.c
+++ b/ir/be/bera.c
@@ -28,21 +28,18 @@
/** The list of register allocators */
static be_module_list_entry_t *register_allocators;
-static be_ra_t *selected_allocator;
+static allocate_func selected_allocator;
-void be_register_allocator(const char *name, be_ra_t *allocator)
+void be_register_allocator(const char *name, allocate_func allocator)
{
if (selected_allocator == NULL)
selected_allocator = allocator;
be_add_module_to_list(&register_allocators, name, allocator);
}
-void be_allocate_registers(ir_graph *irg)
+void be_allocate_registers(ir_graph *irg, const regalloc_if_t *regif)
{
- assert(selected_allocator != NULL);
- if (selected_allocator != NULL) {
- selected_allocator->allocate(irg);
- }
+ selected_allocator(irg, regif);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_ra)