Remove the unused parameter const arch_env_t *env from arch_irn_get_flags(), arch_irn...
[libfirm] / ir / be / bepeephole.h
index 1e1f268..a7f36fc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -52,17 +52,32 @@ static INLINE ir_node *be_peephole_get_reg_value(const arch_register_t *reg)
 typedef void (*peephole_opt_func) (ir_node *node);
 
 /**
- * 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 it's 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
  */
-void be_peephole_node_replaced(const ir_node *old_node, ir_node *new_node);
+ir_node *be_peephole_IncSP_IncSP(ir_node *node);
 
 /**
  * Do peephole optimisations. It traverses the schedule of all blocks in
  * backward direction. The register_values variable indicates which (live)
  * values are stored in which register.
  * The generic op handler is called for each node if it exists. That's where
- * backedn specific optimisations should be performed based on the
+ * backend specific optimisations should be performed based on the
  * register-liveness information.
  */
 void be_peephole_opt(be_irg_t *birg);