/* config file. */
static char config_file[256] = { 0 };
-/* register allocator to use. */
-//static const be_ra_t *ra = &be_ra_chordal_allocator;
-
/* back end instruction set architecture to use */
static const arch_isa_if_t *isa_if = &ia32_isa_if;
/* Do register allocation */
BE_TIMER_PUSH(t_regalloc);
- //ra_timer = ra->allocate(birg);
+ be_allocate_registers(birg);
BE_TIMER_POP(t_regalloc);
#ifdef FIRM_STATISTICS
entry->name = name;
entry->data = module;
entry->next = *list_head;
- *list_head = entry->next;
+ *list_head = entry;
}
void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,
be_add_module_to_list(®ister_allocators, name, allocator);
}
+void be_allocate_registers(be_irg_t *birg)
+{
+ assert(selected_allocator != NULL);
+ if(selected_allocator != NULL) {
+ selected_allocator->allocate(birg);
+ }
+}
+
void be_init_ra(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");