bescripts: Remove unused execution unit specification.
[libfirm] / ir / be / bepeephole.h
index fca32e9..757fe4b 100644 (file)
  * @file
  * @brief       peephole optimisation framework
  * @author      Matthias Braun
- * @version     $Id$
  */
 #ifndef BEPEEPHOLE_H
 #define BEPEEPHOLE_H
 
-#include "beirg.h"
 #include "bearch.h"
 
 extern ir_node **register_values;
@@ -73,6 +71,20 @@ ir_node *be_peephole_IncSP_IncSP(ir_node *node);
 
 bool be_has_only_one_user(ir_node *node);
 
+/**
+ * In a scheduled program with registers assigned,
+ * checks wether @p node can be moved before @p before without changing program
+ * semantics.
+ *
+ * Note: It is allowed to use this function without being in a peephole
+ * optimization phase.
+ */
+bool be_can_move_down(ir_heights_t *heights, const ir_node *node,
+                      const ir_node *before);
+
+bool be_can_move_up(ir_heights_t *heights, const ir_node *node,
+                    const ir_node *after);
+
 /**
  * Do peephole optimisations. It traverses the schedule of all blocks in
  * backward direction. The register_values variable indicates which (live)