- const be_irg_t *birg = env->birg;
- be_lv_t *lv = birg->lv;
+ const ir_graph *irg = env->irg;
+ be_irg_t *birg = be_birg_from_irg(irg);
+ be_lv_t *lv = be_get_irg_liveness(irg);
* (typical example: stack pointer as input to copyb)
* TODO: This really just checks precolored registers at the moment and
* (typical example: stack pointer as input to copyb)
* TODO: This really just checks precolored registers at the moment and
- ir_node *op = get_irn_n(node, i);
- ir_node *copy;
- const arch_register_t *reg;
- const arch_register_req_t *req;
+ ir_node *op = get_irn_n(node, i);
+ const arch_register_req_t *req = arch_get_register_req(node, i);
+ const arch_register_t *reg;
+ ir_node *copy;
- if (arch_register_type_is(reg, joker)
- || !arch_register_type_is(reg, ignore))
+ if ((reg->type & arch_register_type_joker) ||
+ rbitset_is_set(birg->allocatable_regs, reg->global_index))
stat_ev_int("constr_copy", 1);
sched_add_before(node, copy);
set_irn_n(node, i, copy);
stat_ev_int("constr_copy", 1);
sched_add_before(node, copy);
set_irn_n(node, i, copy);
- DBG((dbg, LEVEL_3, "inserting ignore arg copy %+F for %+F pos %d\n", copy, node, i));
+ DBG((dbg, LEVEL_3, "inserting ignore arg copy %+F for %+F pos %d\n",
+ copy, node, i));
/* if the constraint is the same, no copy is necessary
* TODO generalise unequal but overlapping constraints */
/* if the constraint is the same, no copy is necessary
* TODO generalise unequal but overlapping constraints */
copy = be_new_Copy(cls, block, in);
stat_ev_int("constr_copy", 1);
copy = be_new_Copy(cls, block, in);
stat_ev_int("constr_copy", 1);
ir_node *node;
sched_foreach(block, node) {
prepare_constr_insn(env, node);
}
}
ir_node *node;
sched_foreach(block, node) {
prepare_constr_insn(env, node);
}
}
irg_block_walk_graph(irg, pre_spill_prepare_constr_walker, NULL, &env);
}
irg_block_walk_graph(irg, pre_spill_prepare_constr_walker, NULL, &env);
}
void be_init_spilloptions(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
lc_opt_entry_t *spill_grp = lc_opt_get_grp(be_grp, "spill");
lc_opt_add_table(spill_grp, be_spill_options);
void be_init_spilloptions(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
lc_opt_entry_t *spill_grp = lc_opt_get_grp(be_grp, "spill");
lc_opt_add_table(spill_grp, be_spill_options);
- be_add_module_list_opt(spill_grp, "spiller", "spill algorithm",
+ be_add_module_list_opt(be_grp, "spiller", "spill algorithm",
&spillers, (void**) &selected_spiller);
FIRM_DBG_REGISTER(dbg, "firm.be.spillprepare");
}
&spillers, (void**) &selected_spiller);
FIRM_DBG_REGISTER(dbg, "firm.be.spillprepare");
}