f567f28627a7d2355fbe4658acc7d46b1f606666
[libfirm] / ir / be / be_t.h
1 /**
2  * Internal backend global data structures.
3  * @author Sebastian Hack
4  * @date 8.12.2004
5  */
6
7 #ifndef _BE_T_H
8 #define _BE_T_H
9
10 #include "firm_types.h"
11 #include "obst.h"
12 #include "debug.h"
13
14 #include "be.h"
15 #include "bearch.h"
16 #include "beirgmod.h"
17
18 #define DUMP_NONE       0
19 #define DUMP_INITIAL    (1 << 0)
20 #define DUMP_ABI        (1 << 1)
21 #define DUMP_SCHED      (1 << 2)
22 #define DUMP_PREPARED   (1 << 3)
23 #define DUMP_RA         (1 << 4)
24 #define DUMP_FINAL      (1 << 5)
25 #define DUMP_BE         (1 << 6)
26
27 enum {
28         BE_TIME_OFF,
29         BE_TIME_ON
30 };
31
32 enum {
33         BE_VRFY_OFF,
34         BE_VRFY_WARN,
35         BE_VRFY_ASSERT
36 };
37
38 enum {
39         BE_SCHED_SELECT_ISA,
40         BE_SCHED_SELECT_HEUR
41 };
42
43 struct _be_options_t {
44         int  dump_flags;
45         int  timing;
46         int  sched_select;
47         int  mris;
48         char ilp_server[128];
49         char ilp_solver[128];
50 };
51
52 struct _be_main_env_t {
53   struct obstack obst;
54   struct _be_node_factory_t *node_factory;
55   struct _arch_env_t *arch_env;
56   struct _be_options_t *options;
57   struct _arch_code_generator_t *cg;
58   struct _arch_irn_handler_t *phi_handler;
59   DEBUG_ONLY(firm_dbg_module_t *dbg;)
60 };
61
62 struct _be_irg_t {
63         ir_graph                      *irg;
64         struct _be_main_env_t         *main_env;
65         struct _be_abi_irg_t          *abi;
66         struct _arch_code_generator_t *cg;
67 };
68
69 #endif /* _BE_T_H */