summaryrefslogtreecommitdiffhomepage
path: root/ir/be/benode.c
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/benode.c
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/benode.c')
-rw-r--r--ir/be/benode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ir/be/benode.c b/ir/be/benode.c
index 5daeae2..76920e6 100644
--- a/ir/be/benode.c
+++ b/ir/be/benode.c
@@ -240,12 +240,12 @@ ir_node *be_new_Keep_one(ir_node *const kept)
return be_new_Keep(block, ARRAY_SIZE(in), in);
}
-ir_node *be_new_IncSP(const arch_register_t *sp, ir_node *bl,
- ir_node *old_sp, int offset, bool no_align)
+ir_node *be_new_IncSP(ir_node *bl, ir_node *old_sp, int offset, bool no_align)
{
+ arch_register_class_t const *const cls = arch_get_irn_register_req(old_sp)->cls;
ir_graph *irg = get_irn_irg(bl);
ir_node *in[] = { old_sp };
- ir_node *irn = new_ir_node(NULL, irg, bl, op_be_IncSP, sp->cls->mode,
+ ir_node *irn = new_ir_node(NULL, irg, bl, op_be_IncSP, cls->mode,
ARRAY_SIZE(in), in);
init_node_attr(irn, 1, arch_irn_flags_none);
be_incsp_attr_t *a = (be_incsp_attr_t*)get_irn_generic_attr(irn);
@@ -253,7 +253,7 @@ ir_node *be_new_IncSP(const arch_register_t *sp, ir_node *bl,
a->no_align = no_align;
/* Set output constraint to stack register. */
- be_node_set_register_req_in(irn, 0, sp->cls->class_req);
+ be_node_set_register_req_in(irn, 0, cls->class_req);
arch_copy_irn_out_info(irn, 0, old_sp);
return irn;
}