fixed indent
[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 #include "bitset.h"
14
15 #include "be.h"
16 #include "bearch.h"
17 #include "beirgmod.h"
18 #include "be_dbgout.h"
19 #include "beirg_t.h"
20
21 #define DUMP_NONE       0
22 #define DUMP_INITIAL    (1 << 0)
23 #define DUMP_ABI        (1 << 1)
24 #define DUMP_SCHED      (1 << 2)
25 #define DUMP_PREPARED   (1 << 3)
26 #define DUMP_RA         (1 << 4)
27 #define DUMP_FINAL      (1 << 5)
28 #define DUMP_BE         (1 << 6)
29
30 enum {
31         BE_TIME_OFF,
32         BE_TIME_ON
33 };
34
35 enum {
36         BE_VRFY_OFF,
37         BE_VRFY_WARN,
38         BE_VRFY_ASSERT
39 };
40
41 enum {
42         BE_SCHED_LIST,
43         BE_SCHED_ILP
44 };
45
46 /** Backend options */
47 struct _be_options_t {
48         unsigned dump_flags;      /**< backend dumping flags */
49         int  timing;              /**< time the backend phases */
50         int  opt_profile;         /**< instrument code for profiling */
51         int  omit_fp;             /**< try to omit the frame pointer */
52         int  stabs_debug_support; /**< enable stabs debugging support */
53         int  vrfy_option;         /**< backend verify option */
54         int  scheduler;           /**< the scheduler */
55         char ilp_server[128];     /**< the ilp server name */
56         char ilp_solver[128];     /**< the ilp solver name */
57         char stat_file_name[256]; /**< name of the file where the statistics are put to */
58 };
59
60 struct _be_main_env_t {
61         struct obstack obst;
62         struct _be_node_factory_t *node_factory;
63         struct _arch_env_t *arch_env;
64         struct _be_options_t *options;
65         struct _arch_code_generator_t *cg;
66         struct _arch_irn_handler_t *phi_handler;
67         dbg_handle *db_handle;
68         DEBUG_ONLY(firm_dbg_module_t *dbg;)
69 };
70
71 /**
72 * Put the registers to be ignored in this IRG into a bitset.
73 * @param birg The backend IRG data structure.
74 * @param cls  The register class.
75 * @param bs   The bitset (may be NULL).
76 * @return The number of registers to be ignored.
77 */
78 int be_put_ignore_regs(const struct _be_irg_t *birg, const struct _arch_register_class_t *cls, bitset_t *bs);
79
80
81
82 #endif /* _BE_T_H */