summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespill.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-07-02 18:58:17 +0200
committerMatthias Braun <matze@braunis.de>2010-07-02 18:58:17 +0200
commit18814151f8c0ea17b2a7bf84c82ee3c2e66d6a6b (patch)
tree6cff8b83ad82376aa997841e70c0174cc8735ac2 /ir/be/bespill.c
parent69849fc8fe452350bfbd2ad67f1898147fc906b4 (diff)
change spiller and related interface to use ir_graph* instead of be_irg_t*
[r27691]
Diffstat (limited to 'ir/be/bespill.c')
-rw-r--r--ir/be/bespill.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/ir/be/bespill.c b/ir/be/bespill.c
index 0bbb445..de71ea8 100644
--- a/ir/be/bespill.c
+++ b/ir/be/bespill.c
@@ -50,7 +50,7 @@
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
typedef struct be_pre_spill_env_t {
- be_irg_t *birg;
+ ir_graph *irg;
const arch_register_class_t *cls;
} be_pre_spill_env_t;
@@ -58,8 +58,8 @@ static void prepare_constr_insn(be_pre_spill_env_t *env, ir_node *node)
{
const arch_register_class_t *cls = env->cls;
ir_node *block = get_nodes_block(node);
- const be_irg_t *birg = env->birg;
- be_lv_t *lv = birg->lv;
+ const ir_graph *irg = env->irg;
+ be_lv_t *lv = be_get_irg_liveness(irg);
unsigned *tmp = NULL;
unsigned *def_constr = NULL;
int arity = get_irn_arity(node);
@@ -239,14 +239,13 @@ static void pre_spill_prepare_constr_walker(ir_node *block, void *data)
}
}
-void be_pre_spill_prepare_constr(be_irg_t *birg,
+void be_pre_spill_prepare_constr(ir_graph *irg,
const arch_register_class_t *cls)
{
- ir_graph *irg = birg->irg;
be_pre_spill_env_t env;
memset(&env, 0, sizeof(env));
- env.birg = birg;
- env.cls = cls;
+ env.irg = irg;
+ env.cls = cls;
be_assure_liveness(irg);
@@ -274,11 +273,11 @@ void be_register_spiller(const char *name, be_spiller_t *spiller)
be_add_module_to_list(&spillers, name, spiller);
}
-void be_do_spill(be_irg_t *birg, const arch_register_class_t *cls)
+void be_do_spill(ir_graph *irg, const arch_register_class_t *cls)
{
assert(selected_spiller != NULL);
- selected_spiller->spill(birg, cls);
+ selected_spiller->spill(irg, cls);
}
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions);