values may die at every use
[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 #include <libcore/lc_timing.h>
15 #endif
16
17 #include "firm_types.h"
18
19 #include "be.h"
20
21 typedef struct {
22         lc_timer_t *t_prolog;
23         lc_timer_t *t_epilog;
24         lc_timer_t *t_live;
25         lc_timer_t *t_spill;
26         lc_timer_t *t_color;
27         lc_timer_t *t_ifg;
28         lc_timer_t *t_copymin;
29         lc_timer_t *t_ssa;
30 } be_ra_timer_t;
31
32 typedef struct {
33 #ifdef WITH_LIBCORE
34         void (*register_options)(lc_opt_entry_t *grp);
35 #endif
36         be_ra_timer_t *(*allocate)(const be_irg_t *bi);
37 } be_ra_t;
38
39
40
41 /**
42  * Check, if two values interfere.
43  * @param a The first value.
44  * @param b The second value.
45  * @return 1, if @p a and @p b interfere, 0 if not.
46  */
47 int values_interfere(const ir_node *a, const ir_node *b);
48
49 /**
50  * Check, if a value dominates the other one.
51  * Note, that this function also considers the schedule and does thus
52  * more than block_dominates().
53  *
54  * @param a The first.
55  * @param b The second value.
56  * @return 1 if a dominates b, 0 else.
57  */
58 int value_dominates(const ir_node *a, const ir_node *b);
59
60 #endif /* _BERA_H */