cb0f5880937ba5c667d8c630113242b078544a55
[libfirm] / ir / be / bera.h
1 /**
2  * Register allocation functions.
3  * @author Sebastian Hack
4  * @date 13.1.2005
5  */
6
7 #ifndef _BERA_H
8 #define _BERA_H
9
10 #include "firm_config.h"
11
12 #ifdef WITH_LIBCORE
13 #include <libcore/lc_opts.h>
14 #endif
15
16 #include "firm_types.h"
17
18 #include "be.h"
19
20 typedef struct {
21 #ifdef WITH_LIBCORE
22         void (*register_options)(lc_opt_entry_t *grp);
23 #endif
24         void (*allocate)(const be_irg_t *bi);
25 } be_ra_t;
26
27
28
29 /**
30  * Check, if two values interfere.
31  * @param a The first value.
32  * @param b The second value.
33  * @return 1, if @p a and @p b interfere, 0 if not.
34  */
35 int values_interfere(const ir_node *a, const ir_node *b);
36
37 /**
38  * Check, if a value dominates the other one.
39  * Note, that this function also considers the schedule and does thus
40  * more than block_dominates().
41  *
42  * @param a The first.
43  * @param b The second value.
44  * @return 1 if a dominates b, 0 else.
45  */
46 int value_dominates(const ir_node *a, const ir_node *b);
47
48 #endif /* _BERA_H */