- Split bearch.h correctly into bearch.h and bearch_t.h
[libfirm] / ir / be / beirg_t.h
1 /**
2  * Author:      Matthias Braun
3  * Date:                05.05.2006
4  * Copyright:   (c) Universitaet Karlsruhe
5  * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
6  *
7  * Backend irg - a ir_graph with additional analysis information
8  */
9 #ifndef BEIRG_T_H
10 #define BEIRG_T_H
11
12 #include "beirg.h"
13 #include "be_t.h"
14
15 /**
16  * An ir_graph with additional analysis data about this irg. Also includes some
17  * backend structures
18  */
19 struct be_irg_t {
20         ir_graph               *irg;
21         be_main_env_t          *main_env;
22         be_abi_irg_t           *abi;
23         arch_code_generator_t  *cg;
24         ir_exec_freq           *exec_freq;
25         be_dom_front_info_t    *dom_front;
26         be_lv_t                *lv;
27 };
28
29 static INLINE be_lv_t *
30 _be_get_birg_liveness(const be_irg_t *birg) {
31         return birg->lv;
32 }
33
34 static INLINE ir_exec_freq *
35 _be_get_birg_exec_freq(const be_irg_t *birg) {
36         return birg->exec_freq;
37 }
38
39 static INLINE be_dom_front_info_t *
40 _be_get_birg_dom_front(const be_irg_t *birg) {
41         return birg->dom_front;
42 }
43
44 static INLINE ir_graph *
45 _be_get_birg_irg(const be_irg_t *birg) {
46         return birg->irg;
47 }
48
49 static INLINE const arch_env_t *
50 _be_get_birg_arch_env(const be_irg_t *birg) {
51         return birg->main_env->arch_env;
52 }
53
54 #define be_get_birg_exec_freq(birg)        _be_get_birg_exec_freq(birg)
55 #define be_get_birg_liveness(birg)         _be_get_birg_liveness(birg)
56 #define be_get_birg_dom_front(birg)        _be_get_birg_dom_front(birg)
57 #define be_get_birg_irg(birg)              _be_get_birg_irg(birg)
58
59 #endif