X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeflags.h;h=a7af4fd146afcce7cd15a22b6b964ecec879dc40;hb=5474a1c188c9d59eea2c915515980cd9cbab58d8;hp=818eaa4d84ed18002f4ac3ea9381abba52ed9652;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/be/beflags.h b/ir/be/beflags.h index 818eaa4d8..a7af4fd14 100644 --- a/ir/be/beflags.h +++ b/ir/be/beflags.h @@ -21,7 +21,6 @@ * @file * @brief modifies schedule so flags dependencies are respected. * @author Matthias Braun, Christoph Mallon - * @version $Id: besched.h 14693 2007-06-21 15:35:49Z beck $ */ #ifndef FIRM_BE_BEFLAGS_H #define FIRM_BE_BEFLAGS_H @@ -29,14 +28,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 whether 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