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

be: Move 'ignore' check into 'be_create_reg_req()'.

parent acad1b05
......@@ -160,6 +160,9 @@ int be_default_is_valid_clobber(char const *const clobber)
arch_register_req_t const *be_create_reg_req(ir_graph *const irg, arch_register_t const *const reg, bool const ignore)
{
if (!ignore)
return reg->single_req;
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);
......
......@@ -515,10 +515,9 @@ ir_node *be_new_Start(ir_graph *const irg, be_start_out const *const outs)
arch_register_t const *const regs = isa_if->registers;
for (unsigned i = 0; i != n_regs; ++i) {
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(irg, reg, true)
: reg->single_req;
arch_register_t const *const reg = &regs[i];
bool const ignore = outs[i] == BE_START_IGNORE;
arch_register_req_t const *const req = be_create_reg_req(irg, reg, ignore);
arch_set_irn_register_req_out(start, l, req);
arch_set_irn_register_out( start, l, reg);
++l;
......
......@@ -195,13 +195,9 @@ static void collect_stack_nodes_walker(ir_node *node, void *data)
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)) {
sp_req = be_create_reg_req(irg, sp, true);
} else {
sp_req = sp->single_req;
}
be_irg_t *const birg = be_birg_from_irg(irg);
bool const ignore = !rbitset_is_set(birg->allocatable_regs, sp->global_index);
arch_register_req_t const *const sp_req = be_create_reg_req(irg, sp, ignore);
fix_stack_walker_env_t walker_env;
walker_env.sp = sp;
......
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