summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beflags.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-07-27 19:57:55 +0200
committerMatthias Braun <matze@braunis.de>2010-07-27 19:57:55 +0200
commite07d8cc4c40976bebaf73f77f3bfba7461dd491e (patch)
treed9f0710dbca49ee79a00e4f04f61714be18990e6 /ir/be/beflags.h
parent5a5b0a8806277f92f5950cfedd8a231f4d00a306 (diff)
beflags: transform modifies_flags property into a callback, use default rematerialisation callback in backends where necessary
[r27821]
Diffstat (limited to 'ir/be/beflags.h')
-rw-r--r--ir/be/beflags.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ir/be/beflags.h b/ir/be/beflags.h
index 04a12ce..c0ce0fc 100644
--- a/ir/be/beflags.h
+++ b/ir/be/beflags.h
@@ -29,14 +29,25 @@
#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(ir_graph *irg, const arch_register_class_t *flag_cls,
- func_rematerialize remat_func);
+ func_rematerialize remat_func,
+ check_modifies_flags check_modifies_flags_func);
#endif