added function to set be_IncSP pred
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 14:44:26 +0000 (14:44 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 14:44:26 +0000 (14:44 +0000)
ir/be/benode.c
ir/be/benode_t.h

index ab74ed6..9846b1c 100644 (file)
@@ -714,6 +714,11 @@ ir_node *be_get_IncSP_pred(ir_node *irn) {
        return get_irn_n(irn, 0);
 }
 
+void *be_set_IncSP_pred(ir_node *incsp, ir_node *pred) {
+       assert(be_is_IncSP(incsp));
+       set_irn_n(incsp, 0, pred);
+}
+
 ir_node *be_get_IncSP_mem(ir_node *irn) {
        assert(be_is_IncSP(irn));
        return get_irn_n(irn, 1);
index 51f2788..8a43289 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);
 
+/** Sets the previous node that computes the stack pointer. */
+void *be_set_IncSP_pred(ir_node *incsp, ir_node *pred);
+
 /** Returns the memory input of the IncSP. */
 ir_node *be_get_IncSP_mem(ir_node *irn);