#include "bearch.h"
#include "beirg.h"
+/**
+ * Callback which rematerializes (=duplicates) a machine node.
+ */
typedef ir_node * (*func_rematerialize) (ir_node *node, ir_node *after);
+/**
+ * Callback function that checks wether a node modifies the flags
+ */
+typedef bool (*check_modifies_flags) (const ir_node *node);
+
/**
* Walks the schedule and ensures that flags aren't destroyed between producer
* and consumer of flags. It does so by moving down/rematerialising of the
* nodes. This does not work across blocks.
+ * The callback functions may be NULL if you want to use default
+ * implementations.
*/
-void be_sched_fix_flags(be_irg_t *birg, const arch_register_class_t *flag_cls,
- func_rematerialize remat_func);
+void be_sched_fix_flags(ir_graph *irg, const arch_register_class_t *flag_cls,
+ func_rematerialize remat_func,
+ check_modifies_flags check_modifies_flags_func);
#endif