2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief modifies schedule so flags dependencies are respected.
9 * @author Matthias Braun, Christoph Mallon
11 #ifndef FIRM_BE_BEFLAGS_H
12 #define FIRM_BE_BEFLAGS_H
17 * Callback which rematerializes (=duplicates) a machine node.
19 typedef ir_node * (*func_rematerialize) (ir_node *node, ir_node *after);
22 * Callback function that checks whether a node modifies the flags
24 typedef bool (*check_modifies_flags) (const ir_node *node);
27 * Walks the schedule and ensures that flags aren't destroyed between producer
28 * and consumer of flags. It does so by moving down/rematerialising of the
29 * nodes. This does not work across blocks.
30 * The callback functions may be NULL if you want to use default
33 void be_sched_fix_flags(ir_graph *irg, const arch_register_class_t *flag_cls,
34 func_rematerialize remat_func,
35 check_modifies_flags check_modifies_flags_func);