From f65e985f9544870ff270c240dcbf37b4435a813a Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 4 Apr 2006 06:05:46 +0000 Subject: [PATCH] be_get_IncSP_mem() added --- ir/be/benode.c | 5 +++++ ir/be/benode_t.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ir/be/benode.c b/ir/be/benode.c index 3b57b6bfb..ab74ed6df 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -714,6 +714,11 @@ ir_node *be_get_IncSP_pred(ir_node *irn) { return get_irn_n(irn, 0); } +ir_node *be_get_IncSP_mem(ir_node *irn) { + assert(be_is_IncSP(irn)); + return get_irn_n(irn, 1); +} + void be_set_IncSP_offset(ir_node *irn, unsigned offset) { be_stack_attr_t *a = get_irn_attr(irn); diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index e9d015e5a..51f278886 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -157,6 +157,9 @@ ir_node *be_new_IncSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_ /** Returns the previous node that computes the stack pointer. */ ir_node *be_get_IncSP_pred(ir_node *incsp); +/** Returns the memory input of the IncSP. */ +ir_node *be_get_IncSP_mem(ir_node *irn); + /** Sets a new offset to a IncSP node. */ void be_set_IncSP_offset(ir_node *irn, unsigned offset); -- 2.20.1