- * must be called from peephole optimisations when they replace a node,
- * so bepeephole can update it's internal state.
+ * Notify the peephole phase about a newly added node, so it can update its
+ * internal state. This is not needed for the new node, when
+ * be_peephole_exchange() is used. */
+void be_peephole_new_node(ir_node *nw);
+
+/**
+ * When doing peephole optimisation use this function instead of plain
+ * exchange(), so it can update its internal state. */
+void be_peephole_exchange(ir_node *old, ir_node *nw);
+
+/**
+ * Tries to optimize a beIncSp node with its previous IncSP node.
+ * Must be run from a be_peephole_opt() context.
+ *
+ * @param node a be_IncSP node
+ *
+ * @return the new IncSP node or node itself