summaryrefslogtreecommitdiffhomepage
path: root/ir/be/TEMPLATE
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-02-21 08:53:26 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2018-02-26 14:02:40 +0100
commite3fa1ebd7a23409799ec92a617ed1b59135b05f3 (patch)
treebece90d28803425e2a5b538fc3adfc7a5e8c123e /ir/be/TEMPLATE
parente914dc9ccfc77ebfeedfeb631d99eec37a8e9557 (diff)
be: Remove the redundant parameter 'sp' from be_new_IncSP().
It only needs the register class, not the specific stack pointer register. So simply get the register class from the parameter 'old_sp'.
Diffstat (limited to 'ir/be/TEMPLATE')
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_bearch.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ir/be/TEMPLATE/TEMPLATE_bearch.c b/ir/be/TEMPLATE/TEMPLATE_bearch.c
index 74aef25..f02c417 100644
--- a/ir/be/TEMPLATE/TEMPLATE_bearch.c
+++ b/ir/be/TEMPLATE/TEMPLATE_bearch.c
@@ -64,14 +64,12 @@ static const regalloc_if_t TEMPLATE_regalloc_if = {
static void introduce_prologue(ir_graph *const irg)
{
- arch_register_t const *const sp = &TEMPLATE_registers[REG_SP];
- ir_node *const start = get_irg_start(irg);
- ir_node *const block = get_nodes_block(start);
- ir_node *const initial_sp = be_get_Start_proj(irg, sp);
- ir_type *const frame_type = get_irg_frame_type(irg);
- unsigned const frame_size = get_type_size(frame_type);
- ir_node *const incsp
- = be_new_IncSP(sp, block, initial_sp, frame_size, false);
+ ir_node *const start = get_irg_start(irg);
+ ir_node *const block = get_nodes_block(start);
+ ir_node *const initial_sp = be_get_Start_proj(irg, &TEMPLATE_registers[REG_SP]);
+ ir_type *const frame_type = get_irg_frame_type(irg);
+ unsigned const frame_size = get_type_size(frame_type);
+ ir_node *const incsp = be_new_IncSP(block, initial_sp, frame_size, false);
edges_reroute_except(initial_sp, incsp, incsp);
sched_add_after(start, incsp);
}