Commit acad1b05 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Pass an 'irg' instead of an 'obst' to 'be_create_reg_req()'.

parent 8162ac73
......@@ -158,8 +158,9 @@ int be_default_is_valid_clobber(char const *const clobber)
return false;
}
arch_register_req_t const *be_create_reg_req(struct obstack *const obst, arch_register_t const *const reg, bool const ignore)
arch_register_req_t const *be_create_reg_req(ir_graph *const irg, arch_register_t const *const reg, bool const ignore)
{
struct obstack *const obst = be_get_be_obst(irg);
arch_register_class_t const *const cls = reg->cls;
unsigned *const limited = rbitset_obstack_alloc(obst, cls->n_regs);
rbitset_set(limited, reg->index);
......
......@@ -388,6 +388,6 @@ void arch_copy_irn_out_info(ir_node *dst, unsigned dst_pos, ir_node const *src);
int be_default_is_valid_clobber(char const *clobber);
arch_register_req_t const *be_create_reg_req(struct obstack *obst, arch_register_t const *reg, bool ignore);
arch_register_req_t const *be_create_reg_req(ir_graph *irg, arch_register_t const *reg, bool ignore);
#endif
......@@ -517,7 +517,7 @@ ir_node *be_new_Start(ir_graph *const irg, be_start_out const *const outs)
if (outs[i] != BE_START_NO) {
arch_register_t const *const reg = &regs[i];
arch_register_req_t const *const req = outs[i] == BE_START_IGNORE
? be_create_reg_req(be_get_be_obst(irg), reg, true)
? be_create_reg_req(irg, reg, true)
: reg->single_req;
arch_set_irn_register_req_out(start, l, req);
arch_set_irn_register_out( start, l, reg);
......
......@@ -198,8 +198,7 @@ void be_fix_stack_nodes(ir_graph *const irg, arch_register_t const *const sp)
be_irg_t *const birg = be_birg_from_irg(irg);
const arch_register_req_t *sp_req;
if (!rbitset_is_set(birg->allocatable_regs, sp->global_index)) {
struct obstack *const obst = be_get_be_obst(irg);
sp_req = be_create_reg_req(obst, sp, true);
sp_req = be_create_reg_req(irg, sp, true);
} else {
sp_req = sp->single_req;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment