wrapped debugging modules with DEBUG_ONLY
[libfirm] / ir / be / TEMPLATE / bearch_TEMPLATE_t.h
1 #ifndef _BEARCH_TEMPLATE_T_H_
2 #define _BEARCH_TEMPLATE_T_H_
3
4 #include "debug.h"
5 #include "bearch_TEMPLATE.h"
6 #include "TEMPLATE_nodes_attr.h"
7 #include "../be.h"
8
9 typedef struct _TEMPLATE_code_gen_t {
10         const arch_code_generator_if_t *impl;           /* implementation */
11         ir_graph                       *irg;            /* current irg */
12         FILE                           *out;            /* output file */
13         const arch_env_t               *arch_env;       /* the arch env */
14         set                            *reg_set;        /* set to memorize registers for FIRM nodes (e.g. phi) */
15         int                             emit_decls;     /* flag indicating if decls were already emitted */
16         const be_irg_t                 *birg;           /* The be-irg (contains additional information about the irg) */
17         DEBUG_ONLY(firm_dbg_module_t              *mod;)            /* debugging module */
18 } TEMPLATE_code_gen_t;
19
20
21 typedef struct _TEMPLATE_isa_t {
22         const arch_isa_if_t   *impl;
23         const arch_register_t *sp;            /** The stack pointer register. */
24         const arch_register_t *bp;            /** The base pointer register. */
25         const int              stack_dir;     /** -1 for decreasing, 1 for increasing. */
26         int                  num_codegens;
27 } TEMPLATE_isa_t;
28
29
30 typedef struct _TEMPLATE_irn_ops_t {
31         const arch_irn_ops_if_t *impl;
32         TEMPLATE_code_gen_t     *cg;
33 } TEMPLATE_irn_ops_t;
34
35
36 /* this is a struct to minimize the number of parameters
37    for transformation walker */
38 typedef struct _TEMPLATE_transform_env_t {
39         dbg_info          *dbg;      /**< The node debug info */
40         ir_graph          *irg;      /**< The irg, the node should be created in */
41         ir_node           *block;    /**< The block, the node should belong to */
42         ir_node           *irn;      /**< The irn, to be transformed */
43         ir_mode           *mode;     /**< The mode of the irn */
44         DEBUG_ONLY(firm_dbg_module_t *mod;)      /**< The firm debugger */
45 } TEMPLATE_transform_env_t;
46
47
48 #endif /* _BEARCH_TEMPLATE_T_H_ */