cleanup: Remove unnecessary #include "beirg.h".
[libfirm] / ir / be / beflags.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief       modifies schedule so flags dependencies are respected.
23  * @author      Matthias Braun, Christoph Mallon
24  */
25 #ifndef FIRM_BE_BEFLAGS_H
26 #define FIRM_BE_BEFLAGS_H
27
28 #include "bearch.h"
29
30 /**
31  * Callback which rematerializes (=duplicates) a machine node.
32  */
33 typedef ir_node * (*func_rematerialize) (ir_node *node, ir_node *after);
34
35 /**
36  * Callback function that checks whether a node modifies the flags
37  */
38 typedef bool (*check_modifies_flags) (const ir_node *node);
39
40 /**
41  * Walks the schedule and ensures that flags aren't destroyed between producer
42  * and consumer of flags. It does so by moving down/rematerialising of the
43  * nodes. This does not work across blocks.
44  * The callback functions may be NULL if you want to use default
45  * implementations.
46  */
47 void be_sched_fix_flags(ir_graph *irg, const arch_register_class_t *flag_cls,
48                         func_rematerialize remat_func,
49                         check_modifies_flags check_modifies_flags_func);
50
51 #endif