be_get_IncSP_mem() added
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 06:05:46 +0000 (06:05 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 06:05:46 +0000 (06:05 +0000)
ir/be/benode.c
ir/be/benode_t.h

index 3b57b6b..ab74ed6 100644 (file)
@@ -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);
index e9d015e..51f2788 100644 (file)
@@ -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);