summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestack.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-03-21 14:10:10 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-03-21 14:10:55 +0100
commit35093541d98be38944c77818bfa2663d590e0968 (patch)
tree70cb63e72a14b857a7993a0a2a3423d65d9d58aa /ir/be/bestack.c
parentacad1b054639456ae36364d9c84827d3d9eef2e5 (diff)
be: Move 'ignore' check into 'be_create_reg_req()'.
Diffstat (limited to 'ir/be/bestack.c')
-rw-r--r--ir/be/bestack.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ir/be/bestack.c b/ir/be/bestack.c
index 398efcd..de72419 100644
--- a/ir/be/bestack.c
+++ b/ir/be/bestack.c
@@ -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;