summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespill.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-11-07 18:31:12 +0100
committerMatthias Braun <matze@braunis.de>2013-11-12 13:14:31 +0100
commit093d930a734d80e7171994df607ee4ca166ae26c (patch)
tree6e0b598cc783c430ee42e646908d31de9fd8a7da /ir/be/bespill.c
parent8bf06a8b0a137d04a8084c6b99f3ad7d1d129c6b (diff)
get rid of unnecessary be_spiller_t struct
Diffstat (limited to 'ir/be/bespill.c')
-rw-r--r--ir/be/bespill.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ir/be/bespill.c b/ir/be/bespill.c
index 80f5137..9662d71 100644
--- a/ir/be/bespill.c
+++ b/ir/be/bespill.c
@@ -206,10 +206,10 @@ static const lc_opt_table_entry_t be_spill_options[] = {
LC_OPT_LAST
};
-static be_module_list_entry_t *spillers = NULL;
-static const be_spiller_t *selected_spiller = NULL;
+static be_module_list_entry_t *spillers;
+static be_spill_func selected_spiller;
-void be_register_spiller(const char *name, be_spiller_t *spiller)
+void be_register_spiller(const char *name, be_spill_func spiller)
{
if (selected_spiller == NULL)
selected_spiller = spiller;
@@ -219,8 +219,7 @@ void be_register_spiller(const char *name, be_spiller_t *spiller)
void be_do_spill(ir_graph *irg, const arch_register_class_t *cls)
{
assert(selected_spiller != NULL);
-
- selected_spiller->spill(irg, cls);
+ selected_spiller(irg, cls);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions)