becopyheur4: Clean up co_mst_irn_init().
[libfirm] / ir / be / beflags.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       modifies schedule so flags dependencies are respected.
9  * @author      Matthias Braun, Christoph Mallon
10  */
11 #ifndef FIRM_BE_BEFLAGS_H
12 #define FIRM_BE_BEFLAGS_H
13
14 #include "bearch.h"
15
16 /**
17  * Callback which rematerializes (=duplicates) a machine node.
18  */
19 typedef ir_node * (*func_rematerialize) (ir_node *node, ir_node *after);
20
21 /**
22  * Callback function that checks whether a node modifies the flags
23  */
24 typedef bool (*check_modifies_flags) (const ir_node *node);
25
26 /**
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
31  * implementations.
32  */
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);
36
37 #endif