wrapped debugging modules with DEBUG_ONLY
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Thu, 30 Mar 2006 15:39:41 +0000 (15:39 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Thu, 30 Mar 2006 15:39:41 +0000 (15:39 +0000)
41 files changed:
ir/be/TEMPLATE/TEMPLATE_emitter.c
ir/be/TEMPLATE/TEMPLATE_emitter.h
ir/be/TEMPLATE/bearch_TEMPLATE_t.h
ir/be/arm/arm_emitter.c
ir/be/arm/arm_emitter.h
ir/be/arm/arm_transform.c
ir/be/arm/bearch_arm_t.h
ir/be/be_t.h
ir/be/beabi.c
ir/be/bechordal.c
ir/be/bechordal_main.c
ir/be/bechordal_t.h
ir/be/becopyheur.c
ir/be/becopyilp2.c
ir/be/becopyopt.c
ir/be/becopystat.c
ir/be/belistsched.c
ir/be/belower.c
ir/be/beraextern.c
ir/be/bespill.c
ir/be/bespill.h
ir/be/bespillbelady.c
ir/be/bespillilp.c
ir/be/bessadestr.c
ir/be/beuses.c
ir/be/ia32/bearch_ia32.c
ir/be/ia32/bearch_ia32_t.h
ir/be/ia32/ia32_emitter.c
ir/be/ia32/ia32_emitter.h
ir/be/ia32/ia32_optimize.c
ir/be/ia32/ia32_transform.c
ir/be/ia32/ia32_x87.c
ir/be/mips/bearch_mips_t.h
ir/be/mips/mips_emitter.c
ir/be/mips/mips_emitter.h
ir/be/mips/mips_transform.c
ir/be/ppc32/bearch_ppc32_t.h
ir/be/ppc32/ppc32_emitter.c
ir/be/ppc32/ppc32_emitter.h
ir/be/ppc32/ppc32_transform.c
ir/be/ppc32/ppc32_transform_conv.c

index 03f23de..29544ce 100644 (file)
@@ -297,9 +297,9 @@ static void TEMPLATE_register_emitters(void) {
  */
 void TEMPLATE_emit_node(ir_node *irn, void *env) {
        emit_env_t        *emit_env = env;
  */
 void TEMPLATE_emit_node(ir_node *irn, void *env) {
        emit_env_t        *emit_env = env;
-       firm_dbg_module_t *mod      = emit_env->mod;
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
+       DEBUG_ONLY(firm_dbg_module_t *mod      = emit_env->mod;)
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
index d211d1f..06ca14a 100644 (file)
 #include "bearch_TEMPLATE_t.h"
 
 typedef struct _emit_env_t {
 #include "bearch_TEMPLATE_t.h"
 
 typedef struct _emit_env_t {
-       firm_dbg_module_t         *mod;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const TEMPLATE_code_gen_t *cg;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const TEMPLATE_code_gen_t *cg;
+       DEBUG_ONLY(firm_dbg_module_t *mod;)
 } emit_env_t;
 
 const lc_arg_env_t *TEMPLATE_get_arg_env(void);
 } emit_env_t;
 
 const lc_arg_env_t *TEMPLATE_get_arg_env(void);
index a707afd..dd06d04 100644 (file)
@@ -12,9 +12,9 @@ typedef struct _TEMPLATE_code_gen_t {
        FILE                           *out;            /* output file */
        const arch_env_t               *arch_env;       /* the arch env */
        set                            *reg_set;        /* set to memorize registers for FIRM nodes (e.g. phi) */
        FILE                           *out;            /* output file */
        const arch_env_t               *arch_env;       /* the arch env */
        set                            *reg_set;        /* set to memorize registers for FIRM nodes (e.g. phi) */
-       firm_dbg_module_t              *mod;            /* debugging module */
        int                             emit_decls;     /* flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /* The be-irg (contains additional information about the irg) */
        int                             emit_decls;     /* flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /* The be-irg (contains additional information about the irg) */
+       DEBUG_ONLY(firm_dbg_module_t              *mod;)            /* debugging module */
 } TEMPLATE_code_gen_t;
 
 
 } TEMPLATE_code_gen_t;
 
 
@@ -36,12 +36,12 @@ typedef struct _TEMPLATE_irn_ops_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _TEMPLATE_transform_env_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _TEMPLATE_transform_env_t {
-       firm_dbg_module_t *mod;      /**< The firm debugger */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
+       DEBUG_ONLY(firm_dbg_module_t *mod;)      /**< The firm debugger */
 } TEMPLATE_transform_env_t;
 
 
 } TEMPLATE_transform_env_t;
 
 
index 206d249..8fb8fef 100644 (file)
@@ -754,9 +754,9 @@ static void arm_register_emitters(void) {
  */
 static void arm_emit_node(const ir_node *irn, void *env) {
        arm_emit_env_t        *emit_env = env;
  */
 static void arm_emit_node(const ir_node *irn, void *env) {
        arm_emit_env_t        *emit_env = env;
-       firm_dbg_module_t *mod      = emit_env->mod;
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
+       DEBUG_ONLY(firm_dbg_module_t *mod      = emit_env->mod;)
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
index 787a7d4..282979f 100644 (file)
 #include "bearch_arm_t.h"
 
 typedef struct _arm_emit_env_t {
 #include "bearch_arm_t.h"
 
 typedef struct _arm_emit_env_t {
-       firm_dbg_module_t         *mod;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const arm_code_gen_t *cg;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const arm_code_gen_t *cg;
+       DEBUG_ONLY(firm_dbg_module_t         *mod;)
 } arm_emit_env_t;
 
 const lc_arg_env_t *arm_get_arg_env(void);
 } arm_emit_env_t;
 
 const lc_arg_env_t *arm_get_arg_env(void);
index 256da5c..0e744d0 100644 (file)
@@ -821,7 +821,7 @@ static ir_node *gen_CopyB(arm_transform_env_t *env) {
        const_env.dbg      = dbg;
        const_env.irg      = irg;
        const_env.irn      = node;
        const_env.dbg      = dbg;
        const_env.irg      = irg;
        const_env.irn      = node;
-       const_env.mod      = env->mod;
+       DEBUG_ONLY(const_env.mod      = env->mod;)
        const_env.mode     = mode_Iu;
 
        src_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_general_purpose], irg, block, src);
        const_env.mode     = mode_Iu;
 
        src_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_general_purpose], irg, block, src);
@@ -874,7 +874,7 @@ void arm_move_consts(ir_node *node, void *env) {
                                tenv.dbg      = get_irn_dbg_info(pred);
                                tenv.irg      = current_ir_graph;
                                tenv.irn      = pred;
                                tenv.dbg      = get_irn_dbg_info(pred);
                                tenv.irg      = current_ir_graph;
                                tenv.irn      = pred;
-                               tenv.mod      = cgenv->mod;
+                               DEBUG_ONLY(tenv.mod      = cgenv->mod;)
                                tenv.mode     = get_irn_mode(pred);
                                const_graph = create_const_graph(&tenv);
                                set_irn_n(node, i, const_graph);
                                tenv.mode     = get_irn_mode(pred);
                                const_graph = create_const_graph(&tenv);
                                set_irn_n(node, i, const_graph);
@@ -899,7 +899,7 @@ void arm_move_consts(ir_node *node, void *env) {
                        tenv.dbg      = get_irn_dbg_info(pred);
                        tenv.irg      = current_ir_graph;
                        tenv.irn      = pred;
                        tenv.dbg      = get_irn_dbg_info(pred);
                        tenv.irg      = current_ir_graph;
                        tenv.irn      = pred;
-                       tenv.mod      = cgenv->mod;
+                       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
                        tenv.mode     = get_irn_mode(pred);
                        const_graph = create_const_graph(&tenv);
                        set_irn_n(node, i, const_graph);
                        tenv.mode     = get_irn_mode(pred);
                        const_graph = create_const_graph(&tenv);
                        set_irn_n(node, i, const_graph);
@@ -962,7 +962,7 @@ void arm_transform_node(ir_node *node, void *env) {
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
        tenv.mode     = get_irn_mode(node);
 
 #define UNOP(a)        case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break
        tenv.mode     = get_irn_mode(node);
 
 #define UNOP(a)        case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break
index e24d2bb..7f59bfe 100644 (file)
@@ -14,10 +14,10 @@ typedef struct _arm_code_gen_t {
        FILE                           *out;            /**< output file */
        const arch_env_t               *arch_env;       /**< the arch env */
        set                            *reg_set;        /**< set to memorize registers for FIRM nodes (e.g. phi) */
        FILE                           *out;            /**< output file */
        const arch_env_t               *arch_env;       /**< the arch env */
        set                            *reg_set;        /**< set to memorize registers for FIRM nodes (e.g. phi) */
-       firm_dbg_module_t              *mod;            /**< debugging module */
        int                             emit_decls;     /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /**< The be-irg (contains additional information about the irg) */
        ir_type                        *int_tp;         /**< the int type, needed for Call conversion */
        int                             emit_decls;     /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /**< The be-irg (contains additional information about the irg) */
        ir_type                        *int_tp;         /**< the int type, needed for Call conversion */
+       DEBUG_ONLY(firm_dbg_module_t              *mod;)            /**< debugging module */
 } arm_code_gen_t;
 
 
 } arm_code_gen_t;
 
 
@@ -39,13 +39,12 @@ typedef struct _arm_irn_ops_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _arm_transform_env_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _arm_transform_env_t {
-       firm_dbg_module_t *mod;      /**< The firm debugger */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
-//     arm_code_gen_t    *cg;       /**< The code generator */
+       DEBUG_ONLY(firm_dbg_module_t *mod;)      /**< The firm debugger */
 } arm_transform_env_t;
 
 
 } arm_transform_env_t;
 
 
index ca29612..bed907c 100644 (file)
@@ -28,7 +28,7 @@ struct _be_main_env_t {
   struct _be_options_t *options;
   struct _arch_code_generator_t *cg;
   struct _arch_irn_handler_t *phi_handler;
   struct _be_options_t *options;
   struct _arch_code_generator_t *cg;
   struct _arch_irn_handler_t *phi_handler;
-  firm_dbg_module_t *dbg;
+  DEBUG_ONLY(firm_dbg_module_t *dbg;)
 };
 
 struct _be_irg_t {
 };
 
 struct _be_irg_t {
index a8e030a..d5d29b3 100644 (file)
@@ -74,7 +74,6 @@ struct _be_stack_slot_t {
 
 struct _be_abi_irg_t {
        struct obstack       obst;
 
 struct _be_abi_irg_t {
        struct obstack       obst;
-       firm_dbg_module_t    *dbg;          /**< The debugging module. */
        be_stack_frame_t     *frame;        /**< The stack frame model. */
        const be_irg_t       *birg;         /**< The back end IRG. */
        const arch_isa_t     *isa;          /**< The isa. */
        be_stack_frame_t     *frame;        /**< The stack frame model. */
        const be_irg_t       *birg;         /**< The back end IRG. */
        const arch_isa_t     *isa;          /**< The isa. */
@@ -99,6 +98,7 @@ struct _be_abi_irg_t {
 
        arch_irn_handler_t irn_handler;
        arch_irn_ops_t     irn_ops;
 
        arch_irn_handler_t irn_handler;
        arch_irn_ops_t     irn_ops;
+       DEBUG_ONLY(firm_dbg_module_t    *dbg;)          /**< The debugging module. */
 };
 
 #define get_abi_from_handler(ptr) firm_container_of(ptr, be_abi_irg_t, irn_handler)
 };
 
 #define get_abi_from_handler(ptr) firm_container_of(ptr, be_abi_irg_t, irn_handler)
@@ -1134,7 +1134,6 @@ static void create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pmap *
  */
 static void modify_irg(be_abi_irg_t *env)
 {
  */
 static void modify_irg(be_abi_irg_t *env)
 {
-       firm_dbg_module_t *dbg    = env->dbg;
        be_abi_call_t *call       = env->call;
        const arch_isa_t *isa     = env->birg->main_env->arch_env->isa;
        const arch_register_t *sp = arch_isa_sp(isa);
        be_abi_call_t *call       = env->call;
        const arch_isa_t *isa     = env->birg->main_env->arch_env->isa;
        const arch_register_t *sp = arch_isa_sp(isa);
@@ -1148,6 +1147,7 @@ static void modify_irg(be_abi_irg_t *env)
        pset *dont_save           = pset_new_ptr(8);
        int n_params              = get_method_n_params(method_type);
        int max_arg               = 0;
        pset *dont_save           = pset_new_ptr(8);
        int n_params              = get_method_n_params(method_type);
        int max_arg               = 0;
+       DEBUG_ONLY(firm_dbg_module_t *dbg    = env->dbg;)
 
        int i, j, n;
 
 
        int i, j, n;
 
index a83c52a..bcad994 100644 (file)
@@ -63,7 +63,6 @@
 typedef struct _be_chordal_alloc_env_t {
        be_chordal_env_t *chordal_env;
 
 typedef struct _be_chordal_alloc_env_t {
        be_chordal_env_t *chordal_env;
 
-       firm_dbg_module_t *constr_dbg;  /**< Debug output for the constraint handler. */
        pset *pre_colored;              /**< Set of precolored nodes. */
        bitset_t *live;                             /**< A liveness bitset. */
        bitset_t *tmp_colors;           /**< An auxiliary bitset which is as long as the number of colors in the class. */
        pset *pre_colored;              /**< Set of precolored nodes. */
        bitset_t *live;                             /**< A liveness bitset. */
        bitset_t *tmp_colors;           /**< An auxiliary bitset which is as long as the number of colors in the class. */
@@ -71,6 +70,7 @@ typedef struct _be_chordal_alloc_env_t {
        bitset_t *in_colors;            /**< Colors used by live in values. */
        bitset_t *ignore_regs;          /**< A bitset of all ignore registers in the current class. */
        int colors_n;                   /**< The number of colors. */
        bitset_t *in_colors;            /**< Colors used by live in values. */
        bitset_t *ignore_regs;          /**< A bitset of all ignore registers in the current class. */
        int colors_n;                   /**< The number of colors. */
+       DEBUG_ONLY(firm_dbg_module_t *constr_dbg;)  /**< Debug output for the constraint handler. */
 } be_chordal_alloc_env_t;
 
 #include "fourcc.h"
 } be_chordal_alloc_env_t;
 
 #include "fourcc.h"
@@ -380,13 +380,13 @@ static ir_node *pre_process_constraints(be_chordal_alloc_env_t *alloc_env, insn_
 {
        be_chordal_env_t *env       = alloc_env->chordal_env;
        const arch_env_t *aenv      = env->birg->main_env->arch_env;
 {
        be_chordal_env_t *env       = alloc_env->chordal_env;
        const arch_env_t *aenv      = env->birg->main_env->arch_env;
-       firm_dbg_module_t *dbg      = alloc_env->constr_dbg;
        insn_t *insn                = *the_insn;
        ir_node *bl                 = get_nodes_block(insn->irn);
        ir_node *copy               = NULL;
        ir_node *perm               = NULL;
        bitset_t *out_constr        = bitset_alloca(env->cls->n_regs);
        bitset_t *bs                = bitset_alloca(env->cls->n_regs);
        insn_t *insn                = *the_insn;
        ir_node *bl                 = get_nodes_block(insn->irn);
        ir_node *copy               = NULL;
        ir_node *perm               = NULL;
        bitset_t *out_constr        = bitset_alloca(env->cls->n_regs);
        bitset_t *bs                = bitset_alloca(env->cls->n_regs);
+       DEBUG_ONLY(firm_dbg_module_t *dbg      = alloc_env->constr_dbg;)
 
        int i;
 
 
        int i;
 
@@ -504,7 +504,6 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, ir_node *i
                correctly precolored. These Perms arise during the ABI handling phase.
        */
        if(insn->has_constraints) {
                correctly precolored. These Perms arise during the ABI handling phase.
        */
        if(insn->has_constraints) {
-               firm_dbg_module_t *dbg = alloc_env->constr_dbg;
                const arch_env_t *aenv = env->birg->main_env->arch_env;
                int n_regs             = env->cls->n_regs;
                bitset_t *bs           = bitset_alloca(n_regs);
                const arch_env_t *aenv = env->birg->main_env->arch_env;
                int n_regs             = env->cls->n_regs;
                bitset_t *bs           = bitset_alloca(n_regs);
@@ -512,6 +511,7 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, ir_node *i
                bipartite_t *bp        = bipartite_new(n_regs, n_regs);
                int *assignment        = alloca(n_regs * sizeof(assignment[0]));
                pmap *partners         = pmap_create();
                bipartite_t *bp        = bipartite_new(n_regs, n_regs);
                int *assignment        = alloca(n_regs * sizeof(assignment[0]));
                pmap *partners         = pmap_create();
+               DEBUG_ONLY(firm_dbg_module_t *dbg = alloc_env->constr_dbg;)
 
                int i, n_alloc;
                long col;
 
                int i, n_alloc;
                long col;
@@ -699,8 +699,8 @@ static void pressure(ir_node *block, void *env_ptr)
        be_chordal_alloc_env_t *alloc_env = env_ptr;
        be_chordal_env_t *env             = alloc_env->chordal_env;
        bitset_t *live                    = alloc_env->live;
        be_chordal_alloc_env_t *alloc_env = env_ptr;
        be_chordal_env_t *env             = alloc_env->chordal_env;
        bitset_t *live                    = alloc_env->live;
-       firm_dbg_module_t *dbg            = env->dbg;
        ir_node *irn;
        ir_node *irn;
+       DEBUG_ONLY(firm_dbg_module_t *dbg            = env->dbg;)
 
        int i, n;
        unsigned step = 0;
 
        int i, n;
        unsigned step = 0;
@@ -795,11 +795,11 @@ static void assign(ir_node *block, void *env_ptr)
 {
        be_chordal_alloc_env_t *alloc_env = env_ptr;
        be_chordal_env_t *env       = alloc_env->chordal_env;
 {
        be_chordal_alloc_env_t *alloc_env = env_ptr;
        be_chordal_env_t *env       = alloc_env->chordal_env;
-       firm_dbg_module_t *dbg      = env->dbg;
        bitset_t *live              = alloc_env->live;
        bitset_t *colors            = alloc_env->colors;
        bitset_t *in_colors         = alloc_env->in_colors;
        const arch_env_t *arch_env  = env->birg->main_env->arch_env;
        bitset_t *live              = alloc_env->live;
        bitset_t *colors            = alloc_env->colors;
        bitset_t *in_colors         = alloc_env->in_colors;
        const arch_env_t *arch_env  = env->birg->main_env->arch_env;
+       DEBUG_ONLY(firm_dbg_module_t *dbg      = env->dbg;)
 
        const ir_node *irn;
        border_t *b;
 
        const ir_node *irn;
        border_t *b;
index 0e5df3e..7cada80 100644 (file)
 
 
 void be_ra_chordal_check(be_chordal_env_t *chordal_env) {
 
 
 void be_ra_chordal_check(be_chordal_env_t *chordal_env) {
-       firm_dbg_module_t *dbg = chordal_env->dbg;
        const arch_env_t *arch_env = chordal_env->birg->main_env->arch_env;
        struct obstack ob;
        pmap_entry *pme;
        ir_node **nodes, *n1, *n2;
        int i, o;
        const arch_env_t *arch_env = chordal_env->birg->main_env->arch_env;
        struct obstack ob;
        pmap_entry *pme;
        ir_node **nodes, *n1, *n2;
        int i, o;
+       DEBUG_ONLY(firm_dbg_module_t *dbg = chordal_env->dbg;)
 
        /* Collect all irns */
        obstack_init(&ob);
 
        /* Collect all irns */
        obstack_init(&ob);
@@ -98,13 +98,13 @@ void be_ra_chordal_check(be_chordal_env_t *chordal_env) {
 static void check_pressure_walker(ir_node *bl, void *data)
 {
        be_chordal_env_t *env = data;
 static void check_pressure_walker(ir_node *bl, void *data)
 {
        be_chordal_env_t *env = data;
-       firm_dbg_module_t *dbg = env->dbg;
        int n_regs = arch_register_class_n_regs(env->cls);
 
        pset *live = pset_new_ptr_default();
        int step = 0;
        ir_node *irn;
        irn_live_t *li;
        int n_regs = arch_register_class_n_regs(env->cls);
 
        pset *live = pset_new_ptr_default();
        int step = 0;
        ir_node *irn;
        irn_live_t *li;
+       DEBUG_ONLY(firm_dbg_module_t *dbg = env->dbg;)
 
        live_foreach(bl, li) {
                if(live_is_end(li) && chordal_has_class(env, li->irn)) {
 
        live_foreach(bl, li) {
                if(live_is_end(li) && chordal_has_class(env, li->irn)) {
index c8d632c..dbf7e8d 100644 (file)
@@ -54,7 +54,6 @@ typedef struct _border_t {
 struct _be_chordal_env_t {
        struct obstack obst;              /**< An obstack for temporary storage. */
        be_ra_chordal_opts_t *opts;       /**< A pointer to the chordal ra options. */
 struct _be_chordal_env_t {
        struct obstack obst;              /**< An obstack for temporary storage. */
        be_ra_chordal_opts_t *opts;       /**< A pointer to the chordal ra options. */
-       firm_dbg_module_t *dbg;           /**< Debug module for the chordal register allocator. */
        const be_irg_t *birg;             /**< Back-end IRG session. */
        dom_front_info_t *dom_front;      /**< Dominance frontiers. */
        ir_graph *irg;                    /**< The graph under examination. */
        const be_irg_t *birg;             /**< Back-end IRG session. */
        dom_front_info_t *dom_front;      /**< Dominance frontiers. */
        ir_graph *irg;                    /**< The graph under examination. */
@@ -62,6 +61,7 @@ struct _be_chordal_env_t {
        pmap *border_heads;               /**< Maps blocks to border heads. */
        be_ifg_t *ifg;                    /**< The interference graph. */
        void *data;                       /**< Some pointer, to which different phases can attach data to. */
        pmap *border_heads;               /**< Maps blocks to border heads. */
        be_ifg_t *ifg;                    /**< The interference graph. */
        void *data;                       /**< Some pointer, to which different phases can attach data to. */
+       DEBUG_ONLY(firm_dbg_module_t *dbg;) /**< Debug module for the chordal register allocator. */
 };
 
 static INLINE struct list_head *_get_block_border_head(const be_chordal_env_t *inf, ir_node *bl) {
 };
 
 static INLINE struct list_head *_get_block_border_head(const be_chordal_env_t *inf, ir_node *bl) {
index 7b16fe1..2bda705 100644 (file)
@@ -29,7 +29,7 @@
 #include "becopystat.h"
 #include "bitset.h"
 
 #include "becopystat.h"
 #include "bitset.h"
 
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 #define SEARCH_FREE_COLORS
 
 
 #define SEARCH_FREE_COLORS
 
index 584fa15..773decd 100644 (file)
 #define DEBUG_LVL 1
 
 typedef struct _local_env_t {
 #define DEBUG_LVL 1
 
 typedef struct _local_env_t {
-       firm_dbg_module_t *dbg;
        double time_limit;
        int first_x_var, last_x_var;
        pmap *nr_2_irn;
        double time_limit;
        int first_x_var, last_x_var;
        pmap *nr_2_irn;
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 } local_env_t;
 
 static void build_coloring_cstr(ilp_env_t *ienv) {
 } local_env_t;
 
 static void build_coloring_cstr(ilp_env_t *ienv) {
index 1d86d6a..8b0f6d0 100644 (file)
@@ -43,7 +43,7 @@
 
  ******************************************************************************/
 
 
  ******************************************************************************/
 
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 void be_copy_opt_init(void) {
 }
 
 void be_copy_opt_init(void) {
 }
index ec83cb4..15d1a25 100644 (file)
@@ -29,7 +29,7 @@
 #define DO_ILP2
 
 #define DEBUG_LVL SET_LEVEL_1
 #define DO_ILP2
 
 #define DEBUG_LVL SET_LEVEL_1
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 #define MAX_ARITY 20
 #define MAX_CLS_SIZE 20
 
 #define MAX_ARITY 20
 #define MAX_CLS_SIZE 20
index 5510084..dcf012f 100644 (file)
@@ -403,9 +403,9 @@ typedef struct _block_sched_env_t {
        pset *ready_set;
        pset *already_scheduled;
        ir_node *block;
        pset *ready_set;
        pset *already_scheduled;
        ir_node *block;
-       firm_dbg_module_t *dbg;
        const list_sched_selector_t *selector;
        void *selector_block_env;
        const list_sched_selector_t *selector;
        void *selector_block_env;
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 } block_sched_env_t;
 
 /**
 } block_sched_env_t;
 
 /**
index 4378dc7..ae3db13 100644 (file)
@@ -43,7 +43,7 @@
 typedef struct _lower_env_t {
        be_chordal_env_t  *chord_env;
        int                do_copy;
 typedef struct _lower_env_t {
        be_chordal_env_t  *chord_env;
        int                do_copy;
-       firm_dbg_module_t *dbg_module;
+       DEBUG_ONLY(firm_dbg_module_t *dbg_module;)
 } lower_env_t;
 
 /* holds a perm register pair */
 } lower_env_t;
 
 /* holds a perm register pair */
@@ -248,7 +248,6 @@ static perm_cycle_t *get_perm_cycle(perm_cycle_t *cycle, reg_pair_t *pairs, int
 static void lower_perm_node(ir_node *irn, void *walk_env) {
        const arch_register_class_t *reg_class;
        const arch_env_t            *arch_env;
 static void lower_perm_node(ir_node *irn, void *walk_env) {
        const arch_register_class_t *reg_class;
        const arch_env_t            *arch_env;
-       firm_dbg_module_t           *mod;
        lower_env_t     *env = walk_env;
        reg_pair_t      *pairs;
        const ir_edge_t *edge;
        lower_env_t     *env = walk_env;
        reg_pair_t      *pairs;
        const ir_edge_t *edge;
@@ -257,10 +256,11 @@ static void lower_perm_node(ir_node *irn, void *walk_env) {
        ir_node         *sched_point, *block, *in[2];
        ir_node         *arg1, *arg2, *res1, *res2;
        ir_node         *cpyxchg = NULL;
        ir_node         *sched_point, *block, *in[2];
        ir_node         *arg1, *arg2, *res1, *res2;
        ir_node         *cpyxchg = NULL;
+       DEBUG_ONLY(firm_dbg_module_t *mod;)
 
        arch_env = env->chord_env->birg->main_env->arch_env;
        do_copy  = env->do_copy;
 
        arch_env = env->chord_env->birg->main_env->arch_env;
        do_copy  = env->do_copy;
-       mod      = env->dbg_module;
+       DEBUG_ONLY(mod = env->dbg_module;)
        block    = get_nodes_block(irn);
 
        /*
        block    = get_nodes_block(irn);
 
        /*
index 557d0ca..903b629 100644 (file)
@@ -103,7 +103,6 @@ typedef struct _var_info_t var_info_t;
  * Environment with all the needed stuff
  */
 typedef struct _be_raext_env_t {
  * Environment with all the needed stuff
  */
 typedef struct _be_raext_env_t {
-       firm_dbg_module_t *dbg;
        arch_env_t *aenv;
        const arch_register_class_t *cls;
        ir_graph *irg;
        arch_env_t *aenv;
        const arch_register_class_t *cls;
        ir_graph *irg;
@@ -113,6 +112,7 @@ typedef struct _be_raext_env_t {
        set *vars;                              /**< contains all var_info_t */
        int n_cls_vars;                 /**< length of the array cls_vars */
        var_info_t **cls_vars;  /**< only the var_infos for current cls. needed for double iterating */
        set *vars;                              /**< contains all var_info_t */
        int n_cls_vars;                 /**< length of the array cls_vars */
        var_info_t **cls_vars;  /**< only the var_infos for current cls. needed for double iterating */
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 } be_raext_env_t;
 
 
 } be_raext_env_t;
 
 
index 23d2a0a..55c5076 100644 (file)
@@ -51,7 +51,6 @@ typedef struct _spill_ctx_t {
 } spill_ctx_t;
 
 struct _spill_env_t {
 } spill_ctx_t;
 
 struct _spill_env_t {
-       firm_dbg_module_t *dbg;
        const arch_register_class_t *cls;
        const be_chordal_env_t *chordal_env;
        struct obstack obst;
        const arch_register_class_t *cls;
        const be_chordal_env_t *chordal_env;
        struct obstack obst;
@@ -60,6 +59,7 @@ struct _spill_env_t {
        pset *mem_phis;                         /**< set of all special spilled phis. allocated and freed seperately */
        decide_irn_t is_mem_phi;        /**< callback func to decide if a phi needs special spilling */
        void *data;                                     /**< data passed to all callbacks */
        pset *mem_phis;                         /**< set of all special spilled phis. allocated and freed seperately */
        decide_irn_t is_mem_phi;        /**< callback func to decide if a phi needs special spilling */
        void *data;                                     /**< data passed to all callbacks */
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 };
 
 static int cmp_spillctx(const void *a, const void *b, size_t n) {
 };
 
 static int cmp_spillctx(const void *a, const void *b, size_t n) {
@@ -74,15 +74,11 @@ static int cmp_spillinfo(const void *x, const void *y, size_t size) {
        return ! (xx->spilled_node == yy->spilled_node);
 }
 
        return ! (xx->spilled_node == yy->spilled_node);
 }
 
-spill_env_t *be_new_spill_env(firm_dbg_module_t *dbg,
-                                                         const be_chordal_env_t *chordal_env,
-                                                         decide_irn_t is_mem_phi, void *data) {
-
+spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal_env, decide_irn_t is_mem_phi, void *data) {
        spill_env_t *env = xmalloc(sizeof(env[0]));
        env->spill_ctxs  = new_set(cmp_spillctx, 1024);
        env->spills      = new_set(cmp_spillinfo, 1024);
        env->cls         = chordal_env->cls;
        spill_env_t *env = xmalloc(sizeof(env[0]));
        env->spill_ctxs  = new_set(cmp_spillctx, 1024);
        env->spills      = new_set(cmp_spillinfo, 1024);
        env->cls         = chordal_env->cls;
-       env->dbg         = dbg;
        env->is_mem_phi  = is_mem_phi;
        env->data        = data;
        env->chordal_env = chordal_env;
        env->is_mem_phi  = is_mem_phi;
        env->data        = data;
        env->chordal_env = chordal_env;
@@ -386,11 +382,11 @@ typedef struct _spill_slot_t {
 } spill_slot_t;
 
 typedef struct _ss_env_t {
 } spill_slot_t;
 
 typedef struct _ss_env_t {
-       firm_dbg_module_t *dbg;
        struct obstack ob;
        be_chordal_env_t *cenv;
        pmap *slots;            /* maps spill_contexts to spill_slots */
        struct obstack ob;
        be_chordal_env_t *cenv;
        pmap *slots;            /* maps spill_contexts to spill_slots */
-  pmap *types;    /* maps modes to types */
+       pmap *types;    /* maps modes to types */
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 } ss_env_t;
 
 
 } ss_env_t;
 
 
index ef19be8..f999184 100644 (file)
@@ -22,11 +22,7 @@ typedef struct _spill_env_t spill_env_t;
 typedef int(*decide_irn_t)(const ir_node*, void*);
 
 
 typedef int(*decide_irn_t)(const ir_node*, void*);
 
 
-spill_env_t *be_new_spill_env(
-               firm_dbg_module_t *dbg,
-               const be_chordal_env_t *chordal,
-               decide_irn_t is_mem_phi,
-               void *data);
+spill_env_t *be_new_spill_env(const be_chordal_env_t *chordal, decide_irn_t is_mem_phi, void *data);
 
 void be_delete_spill_env(spill_env_t *senv);
 
 
 void be_delete_spill_env(spill_env_t *senv);
 
index 237ef77..3a9e68c 100644 (file)
@@ -47,7 +47,7 @@
 #define DBG_SLOTS  32
 #define DBG_TRACE  64
 #define DEBUG_LVL 0 //(DBG_START | DBG_DECIDE | DBG_WSETS | DBG_FIX | DBG_SPILL)
 #define DBG_SLOTS  32
 #define DBG_TRACE  64
 #define DEBUG_LVL 0 //(DBG_START | DBG_DECIDE | DBG_WSETS | DBG_FIX | DBG_SPILL)
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 #define MIN(a,b) (((a)<(b))?(a):(b))
 
 
 #define MIN(a,b) (((a)<(b))?(a):(b))
 
@@ -639,14 +639,15 @@ void be_spill_belady(const be_chordal_env_t *chordal_env) {
 
        /* init belady env */
        obstack_init(&bel.ob);
 
        /* init belady env */
        obstack_init(&bel.ob);
-       bel.arch    = chordal_env->birg->main_env->arch_env;
-       bel.cls     = chordal_env->cls;
-       bel.n_regs  = arch_register_class_n_regs(bel.cls);
-       bel.ws      = new_workset(&bel.ob, &bel);
-       bel.uses    = be_begin_uses(chordal_env->irg, chordal_env->birg->main_env->arch_env, bel.cls);
-       bel.senv    = be_new_spill_env(dbg, chordal_env, is_mem_phi, NULL);
-       bel.reloads = pset_new_ptr_default();
-       bel.copies  = pset_new_ptr_default();
+       bel.arch      = chordal_env->birg->main_env->arch_env;
+       bel.cls       = chordal_env->cls;
+       bel.n_regs    = arch_register_class_n_regs(bel.cls);
+       bel.ws        = new_workset(&bel.ob, &bel);
+       bel.uses      = be_begin_uses(chordal_env->irg, chordal_env->birg->main_env->arch_env, bel.cls);
+       bel.senv      = be_new_spill_env(chordal_env, is_mem_phi, NULL);
+       DEBUG_ONLY(bel.senv->dbg = dbg;)
+       bel.reloads   = pset_new_ptr_default();
+       bel.copies    = pset_new_ptr_default();
 
        DBG((dbg, LEVEL_1, "running on register class: %s\n", bel.cls->name));
 
 
        DBG((dbg, LEVEL_1, "running on register class: %s\n", bel.cls->name));
 
index c9b60bd..6dfcac4 100644 (file)
@@ -86,7 +86,6 @@ typedef struct _spill_ilp_t {
        spill_stat_t stats;
        const arch_register_class_t *cls;
        const be_chordal_env_t *chordal_env;
        spill_stat_t stats;
        const arch_register_class_t *cls;
        const be_chordal_env_t *chordal_env;
-       firm_dbg_module_t *dbg;
        lpp_t *lpp;
        set *irn_use_heads;
        set *live_ranges;
        lpp_t *lpp;
        set *irn_use_heads;
        set *live_ranges;
@@ -96,6 +95,7 @@ typedef struct _spill_ilp_t {
        struct obstack *obst;
        int enable_store : 1;
        int enable_remat : 1;
        struct obstack *obst;
        int enable_store : 1;
        int enable_remat : 1;
+       DEBUG_ONLY(firm_dbg_module_t *dbg;)
 } spill_ilp_t;
 
 typedef struct _live_range_t live_range_t;
 } spill_ilp_t;
 
 typedef struct _live_range_t live_range_t;
@@ -635,7 +635,8 @@ void be_spill_ilp(const be_chordal_env_t *chordal_env)
        memset(&si.stats, 0, sizeof(si.stats));
        si.chordal_env     = chordal_env;
        si.obst            = &obst;
        memset(&si.stats, 0, sizeof(si.stats));
        si.chordal_env     = chordal_env;
        si.obst            = &obst;
-       si.senv            = be_new_spill_env(si.dbg, chordal_env, is_mem_phi, &si);
+       si.senv            = be_new_spill_env(chordal_env, is_mem_phi, &si);
+       DEBUG_ONLY(si.senv->dbg = si.dbg;)
        si.cls             = chordal_env->cls;
        si.lpp             = new_lpp(problem_name, lpp_minimize);
        si.irn_use_heads   = new_set(cmp_irn_use_head, 4096);
        si.cls             = chordal_env->cls;
        si.lpp             = new_lpp(problem_name, lpp_minimize);
        si.irn_use_heads   = new_set(cmp_irn_use_head, 4096);
@@ -646,7 +647,6 @@ void be_spill_ilp(const be_chordal_env_t *chordal_env)
        si.enable_store    = 1;
        FIRM_DBG_REGISTER(si.dbg, "firm.be.ra.spillilp");
 
        si.enable_store    = 1;
        FIRM_DBG_REGISTER(si.dbg, "firm.be.ra.spillilp");
 
-       firm_dbg_set_mask(si.dbg, DBG_LEVEL);
        irg_block_walk_graph(chordal_env->irg, process_block, NULL, &si);
        if(si.enable_store)
                add_store_costs(&si);
        irg_block_walk_graph(chordal_env->irg, process_block, NULL, &si);
        if(si.enable_store)
                add_store_costs(&si);
index ded0b43..8608025 100644 (file)
@@ -29,7 +29,7 @@
 #include "benode_t.h"
 #include "besched_t.h"
 
 #include "benode_t.h"
 #include "besched_t.h"
 
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 #define DUMP_GRAPHS
 
 #define get_chordal_arch(ce) ((ce)->birg->main_env->arch_env)
 #define DUMP_GRAPHS
 
 #define get_chordal_arch(ce) ((ce)->birg->main_env->arch_env)
index ed76311..be79159 100644 (file)
@@ -45,8 +45,8 @@ typedef struct _be_use_t {
 struct _be_uses_t {
   set *uses;
   ir_graph *irg;
 struct _be_uses_t {
   set *uses;
   ir_graph *irg;
-  firm_dbg_module_t *dbg;
   const arch_env_t *arch_env;
   const arch_env_t *arch_env;
+  DEBUG_ONLY(firm_dbg_module_t *dbg;)
 };
 
 
 };
 
 
index c6ba842..bbf2d54 100644 (file)
@@ -419,13 +419,13 @@ ia32_irn_ops_t ia32_irn_ops = {
  */
 static void ia32_prepare_graph(void *self) {
        ia32_code_gen_t *cg = self;
  */
 static void ia32_prepare_graph(void *self) {
        ia32_code_gen_t *cg = self;
-       firm_dbg_module_t *old_mod = cg->mod;
+       DEBUG_ONLY(firm_dbg_module_t *old_mod = cg->mod;)
 
        FIRM_DBG_REGISTER(cg->mod, "firm.be.ia32.transform");
        irg_walk_blkwise_graph(cg->irg, ia32_place_consts_set_modes, ia32_transform_node, cg);
        be_dump(cg->irg, "-transformed", dump_ir_block_graph_sched);
 
 
        FIRM_DBG_REGISTER(cg->mod, "firm.be.ia32.transform");
        irg_walk_blkwise_graph(cg->irg, ia32_place_consts_set_modes, ia32_transform_node, cg);
        be_dump(cg->irg, "-transformed", dump_ir_block_graph_sched);
 
-       cg->mod = old_mod;
+       DEBUG_ONLY(cg->mod = old_mod;)
 
        if (cg->opt.doam) {
                edges_deactivate(cg->irg);
 
        if (cg->opt.doam) {
                edges_deactivate(cg->irg);
@@ -663,7 +663,7 @@ static void ia32_after_ra_walker(ir_node *node, void *env) {
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
-       tenv.mod   = cg->mod;
+       DEBUG_ONLY(tenv.mod   = cg->mod;)
        tenv.mode  = get_irn_mode(node);
        tenv.cg    = cg;
 
        tenv.mode  = get_irn_mode(node);
        tenv.cg    = cg;
 
index 2329eea..0d8c935 100644 (file)
@@ -43,7 +43,6 @@ typedef struct _ia32_code_gen_t {
        FILE                           *out;           /**< output file */
        const arch_env_t               *arch_env;      /**< the arch env */
        set                            *reg_set;       /**< set to memorize registers for non-ia32 nodes (e.g. phi nodes) */
        FILE                           *out;           /**< output file */
        const arch_env_t               *arch_env;      /**< the arch env */
        set                            *reg_set;       /**< set to memorize registers for non-ia32 nodes (e.g. phi nodes) */
-       firm_dbg_module_t              *mod;           /**< debugging module */
        int                             emit_decls;    /**< flag indicating if decls were already emitted */
        pmap                           *types;         /**< A map of modes to primitive types */
        pmap                           *tv_ent;        /**< A map of entities that store tarvals */
        int                             emit_decls;    /**< flag indicating if decls were already emitted */
        pmap                           *types;         /**< A map of modes to primitive types */
        pmap                           *tv_ent;        /**< A map of entities that store tarvals */
@@ -52,6 +51,7 @@ typedef struct _ia32_code_gen_t {
        ia32_optimize_t                 opt;           /**< contains optimization information */
        char                            fp_kind;       /**< floating point kind */
        char                            used_x87;      /**< x87 floating point unit used in this graph */
        ia32_optimize_t                 opt;           /**< contains optimization information */
        char                            fp_kind;       /**< floating point kind */
        char                            used_x87;      /**< x87 floating point unit used in this graph */
+       DEBUG_ONLY(firm_dbg_module_t   *mod;)          /**< debugging module */
 } ia32_code_gen_t;
 
 typedef struct _ia32_isa_t {
 } ia32_code_gen_t;
 
 typedef struct _ia32_isa_t {
@@ -77,13 +77,13 @@ typedef struct _ia32_irn_ops_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _ia32_transform_env_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _ia32_transform_env_t {
-       firm_dbg_module_t *mod;        /**< The firm debugger */
        dbg_info          *dbg;        /**< The node debug info */
        ir_graph          *irg;        /**< The irg, the node should be created in */
        ir_node           *block;      /**< The block, the node should belong to */
        ir_node           *irn;        /**< The irn, to be transformed */
        ir_mode           *mode;       /**< The mode of the irn */
        ia32_code_gen_t   *cg;         /**< The code generator */
        dbg_info          *dbg;        /**< The node debug info */
        ir_graph          *irg;        /**< The irg, the node should be created in */
        ir_node           *block;      /**< The block, the node should belong to */
        ir_node           *irn;        /**< The irn, to be transformed */
        ir_mode           *mode;       /**< The mode of the irn */
        ia32_code_gen_t   *cg;         /**< The code generator */
+       DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */
 } ia32_transform_env_t;
 
 /**
 } ia32_transform_env_t;
 
 /**
index 949e838..42c7356 100644 (file)
@@ -1426,10 +1426,10 @@ static void ia32_register_emitters(void) {
  * Emits code for a node.
  */
 static void ia32_emit_node(const ir_node *irn, void *env) {
  * Emits code for a node.
  */
 static void ia32_emit_node(const ir_node *irn, void *env) {
-       ia32_emit_env_t        *emit_env = env;
-       firm_dbg_module_t *mod      = emit_env->mod;
+       ia32_emit_env_t   *emit_env = env;
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
+       DEBUG_ONLY(firm_dbg_module_t *mod = emit_env->mod;)
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
index 72cb763..41416f4 100644 (file)
 #include "bearch_ia32_t.h"
 
 typedef struct _ia32_emit_env_t {
 #include "bearch_ia32_t.h"
 
 typedef struct _ia32_emit_env_t {
-       firm_dbg_module_t     *mod;
        FILE                  *out;
        const arch_env_t      *arch_env;
        const ia32_code_gen_t *cg;
        ia32_isa_t            *isa;
        FILE                  *out;
        const arch_env_t      *arch_env;
        const ia32_code_gen_t *cg;
        ia32_isa_t            *isa;
+       DEBUG_ONLY(firm_dbg_module_t *mod;)
 } ia32_emit_env_t;
 
 const lc_arg_env_t *ia32_get_arg_env(void);
 } ia32_emit_env_t;
 
 const lc_arg_env_t *ia32_get_arg_env(void);
index df7a64b..b3a5687 100644 (file)
@@ -217,7 +217,7 @@ void ia32_place_consts_set_modes(ir_node *irn, void *env) {
        tenv.block    = get_nodes_block(irn);
        tenv.cg       = cg;
        tenv.irg      = cg->irg;
        tenv.block    = get_nodes_block(irn);
        tenv.cg       = cg;
        tenv.irg      = cg->irg;
-       tenv.mod      = cg->mod;
+       DEBUG_ONLY(tenv.mod      = cg->mod;)
 
        /* Loop over all predecessors and check for Sym/Const nodes */
        for (i = get_irn_arity(irn) - 1; i >= 0; --i) {
 
        /* Loop over all predecessors and check for Sym/Const nodes */
        for (i = get_irn_arity(irn) - 1; i >= 0; --i) {
@@ -596,7 +596,7 @@ static int load_store_addr_is_equal(const ir_node *load, const ir_node *store,
 /**
  * Folds Add or Sub to LEA if possible
  */
 /**
  * Folds Add or Sub to LEA if possible
  */
-static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, firm_dbg_module_t *mod, ir_node *noreg) {
+static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, ir_node *noreg) {
        ir_graph   *irg        = get_irn_irg(irn);
        dbg_info   *dbg        = get_irn_dbg_info(irn);
        ir_node    *block      = get_nodes_block(irn);
        ir_graph   *irg        = get_irn_irg(irn);
        dbg_info   *dbg        = get_irn_dbg_info(irn);
        ir_node    *block      = get_nodes_block(irn);
@@ -613,6 +613,7 @@ static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, firm_dbg_module_t *
        ir_node    *left, *right, *temp;
        ir_node    *base, *index;
        ia32_am_flavour_t am_flav;
        ir_node    *left, *right, *temp;
        ir_node    *base, *index;
        ia32_am_flavour_t am_flav;
+       DEBUG_ONLY(firm_dbg_module_t *mod = cg->mod;)
 
        if (is_ia32_Add(irn))
                isadd = 1;
 
        if (is_ia32_Add(irn))
                isadd = 1;
@@ -849,7 +850,6 @@ static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn, firm_dbg_module_t *
  */
 void ia32_optimize_am(ir_node *irn, void *env) {
        ia32_code_gen_t   *cg   = env;
  */
 void ia32_optimize_am(ir_node *irn, void *env) {
        ia32_code_gen_t   *cg   = env;
-       firm_dbg_module_t *mod  = cg->mod;
        ir_node           *res  = irn;
        dbg_info          *dbg;
        ir_mode           *mode;
        ir_node           *res  = irn;
        dbg_info          *dbg;
        ir_mode           *mode;
@@ -858,6 +858,7 @@ void ia32_optimize_am(ir_node *irn, void *env) {
        ir_node           *store, *load, *mem_proj;
        ir_node           *succ, *addr_b, *addr_i;
        int                check_am_src = 0;
        ir_node           *store, *load, *mem_proj;
        ir_node           *succ, *addr_b, *addr_i;
        int                check_am_src = 0;
+       DEBUG_ONLY(firm_dbg_module_t *mod = cg->mod;)
 
        if (! is_ia32_irn(irn))
                return;
 
        if (! is_ia32_irn(irn))
                return;
@@ -889,7 +890,7 @@ void ia32_optimize_am(ir_node *irn, void *env) {
                /* check is irn is a candidate for address calculation */
                if (is_candidate(block, irn, 1)) {
                        DBG((mod, LEVEL_1, "\tfound address calculation candidate %+F ... ", irn));
                /* check is irn is a candidate for address calculation */
                if (is_candidate(block, irn, 1)) {
                        DBG((mod, LEVEL_1, "\tfound address calculation candidate %+F ... ", irn));
-                       res = fold_addr(cg, irn, mod, noreg_gp);
+                       res = fold_addr(cg, irn, noreg_gp);
 
                        if (res == irn)
                                DB((mod, LEVEL_1, "transformed into %+F\n", res));
 
                        if (res == irn)
                                DB((mod, LEVEL_1, "transformed into %+F\n", res));
index 4cdcfa5..4fa60b1 100644 (file)
@@ -184,11 +184,11 @@ static ir_node *gen_binop(ia32_transform_env_t *env, ir_node *op1, ir_node *op2,
        dbg_info          *dbg      = env->dbg;
        ir_graph          *irg      = env->irg;
        ir_node           *block    = env->block;
        dbg_info          *dbg      = env->dbg;
        ir_graph          *irg      = env->irg;
        ir_node           *block    = env->block;
-       firm_dbg_module_t *mod      = env->mod;
        ir_node           *noreg_gp = ia32_new_NoReg_gp(env->cg);
        ir_node           *noreg_fp = ia32_new_NoReg_fp(env->cg);
        ir_node           *nomem    = new_NoMem();
        ir_node           *expr_op, *imm_op;
        ir_node           *noreg_gp = ia32_new_NoReg_gp(env->cg);
        ir_node           *noreg_fp = ia32_new_NoReg_fp(env->cg);
        ir_node           *nomem    = new_NoMem();
        ir_node           *expr_op, *imm_op;
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        /* Check if immediate optimization is on and */
        /* if it's an operation with immediate.      */
 
        /* Check if immediate optimization is on and */
        /* if it's an operation with immediate.      */
@@ -275,11 +275,11 @@ static ir_node *gen_shift_binop(ia32_transform_env_t *env, ir_node *op1, ir_node
        dbg_info          *dbg    = env->dbg;
        ir_graph          *irg    = env->irg;
        ir_node           *block  = env->block;
        dbg_info          *dbg    = env->dbg;
        ir_graph          *irg    = env->irg;
        ir_node           *block  = env->block;
-       firm_dbg_module_t *mod    = env->mod;
        ir_node           *noreg  = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem  = new_NoMem();
        ir_node           *expr_op, *imm_op;
        tarval            *tv;
        ir_node           *noreg  = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem  = new_NoMem();
        ir_node           *expr_op, *imm_op;
        tarval            *tv;
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        assert(! mode_is_float(mode) && "Shift/Rotate with float not supported");
 
 
        assert(! mode_is_float(mode) && "Shift/Rotate with float not supported");
 
@@ -345,11 +345,11 @@ static ir_node *gen_unop(ia32_transform_env_t *env, ir_node *op, construct_unop_
        ir_node           *new_op = NULL;
        ir_mode           *mode   = env->mode;
        dbg_info          *dbg    = env->dbg;
        ir_node           *new_op = NULL;
        ir_mode           *mode   = env->mode;
        dbg_info          *dbg    = env->dbg;
-       firm_dbg_module_t *mod    = env->mod;
        ir_graph          *irg    = env->irg;
        ir_node           *block  = env->block;
        ir_node           *noreg  = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem  = new_NoMem();
        ir_graph          *irg    = env->irg;
        ir_node           *block  = env->block;
        ir_node           *noreg  = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem  = new_NoMem();
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        new_op = func(dbg, irg, block, noreg, noreg, op, nomem, mode_T);
 
 
        new_op = func(dbg, irg, block, noreg, noreg, op, nomem, mode_T);
 
@@ -383,7 +383,6 @@ static ir_node *gen_unop(ia32_transform_env_t *env, ir_node *op, construct_unop_
 static ir_node *gen_imm_Add(ia32_transform_env_t *env, ir_node *expr_op, ir_node *const_op) {
        ir_node                *new_op     = NULL;
        tarval                 *tv         = get_ia32_Immop_tarval(const_op);
 static ir_node *gen_imm_Add(ia32_transform_env_t *env, ir_node *expr_op, ir_node *const_op) {
        ir_node                *new_op     = NULL;
        tarval                 *tv         = get_ia32_Immop_tarval(const_op);
-       firm_dbg_module_t      *mod        = env->mod;
        dbg_info               *dbg        = env->dbg;
        ir_graph               *irg        = env->irg;
        ir_node                *block      = env->block;
        dbg_info               *dbg        = env->dbg;
        ir_graph               *irg        = env->irg;
        ir_node                *block      = env->block;
@@ -391,6 +390,7 @@ static ir_node *gen_imm_Add(ia32_transform_env_t *env, ir_node *expr_op, ir_node
        ir_node                *nomem      = new_NoMem();
        int                     normal_add = 1;
        tarval_classification_t class_tv, class_negtv;
        ir_node                *nomem      = new_NoMem();
        int                     normal_add = 1;
        tarval_classification_t class_tv, class_negtv;
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        /* try to optimize to inc/dec  */
        if (env->cg->opt.incdec && tv) {
 
        /* try to optimize to inc/dec  */
        if (env->cg->opt.incdec && tv) {
@@ -704,7 +704,6 @@ static ir_node *gen_Min(ia32_transform_env_t *env, ir_node *op1, ir_node *op2) {
 static ir_node *gen_imm_Sub(ia32_transform_env_t *env, ir_node *expr_op, ir_node *const_op) {
        ir_node                *new_op     = NULL;
        tarval                 *tv         = get_ia32_Immop_tarval(const_op);
 static ir_node *gen_imm_Sub(ia32_transform_env_t *env, ir_node *expr_op, ir_node *const_op) {
        ir_node                *new_op     = NULL;
        tarval                 *tv         = get_ia32_Immop_tarval(const_op);
-       firm_dbg_module_t      *mod        = env->mod;
        dbg_info               *dbg        = env->dbg;
        ir_graph               *irg        = env->irg;
        ir_node                *block      = env->block;
        dbg_info               *dbg        = env->dbg;
        ir_graph               *irg        = env->irg;
        ir_node                *block      = env->block;
@@ -712,6 +711,7 @@ static ir_node *gen_imm_Sub(ia32_transform_env_t *env, ir_node *expr_op, ir_node
        ir_node                *nomem      = new_NoMem();
        int                     normal_sub = 1;
        tarval_classification_t class_tv, class_negtv;
        ir_node                *nomem      = new_NoMem();
        int                     normal_sub = 1;
        tarval_classification_t class_tv, class_negtv;
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        /* try to optimize to inc/dec  */
        if (env->cg->opt.incdec && tv) {
 
        /* try to optimize to inc/dec  */
        if (env->cg->opt.incdec && tv) {
@@ -1626,8 +1626,8 @@ static ir_node *gen_Conv(ia32_transform_env_t *env, ir_node *op) {
        ir_node           *new_op   = NULL;
        ir_node           *noreg    = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem    = new_rd_NoMem(irg);
        ir_node           *new_op   = NULL;
        ir_node           *noreg    = ia32_new_NoReg_gp(env->cg);
        ir_node           *nomem    = new_rd_NoMem(irg);
-       firm_dbg_module_t *mod      = env->mod;
        ir_node           *proj;
        ir_node           *proj;
+       DEBUG_ONLY(firm_dbg_module_t *mod = env->mod;)
 
        if (src_mode == tgt_mode) {
                /* this can happen when changing mode_P to mode_Is */
 
        if (src_mode == tgt_mode) {
                /* this can happen when changing mode_P to mode_Is */
@@ -1894,7 +1894,7 @@ void ia32_transform_sub_to_neg_add(ir_node *irn, ia32_code_gen_t *cg) {
        tenv.dbg      = get_irn_dbg_info(irn);
        tenv.irg      = cg->irg;
        tenv.irn      = irn;
        tenv.dbg      = get_irn_dbg_info(irn);
        tenv.irg      = cg->irg;
        tenv.irn      = irn;
-       tenv.mod      = cg->mod;
+       DEBUG_ONLY(tenv.mod      = cg->mod;)
        tenv.mode     = get_ia32_res_mode(irn);
        tenv.cg       = cg;
 
        tenv.mode     = get_ia32_res_mode(irn);
        tenv.cg       = cg;
 
@@ -1977,7 +1977,7 @@ void ia32_transform_lea_to_add(ir_node *irn, ia32_code_gen_t *cg) {
        tenv.dbg   = get_irn_dbg_info(irn);
        tenv.irg   = cg->irg;
        tenv.irn   = irn;
        tenv.dbg   = get_irn_dbg_info(irn);
        tenv.irg   = cg->irg;
        tenv.irn   = irn;
-       tenv.mod   = cg->mod;
+       DEBUG_ONLY(tenv.mod   = cg->mod;)
        tenv.mode  = get_irn_mode(irn);
        tenv.cg    = cg;
 
        tenv.mode  = get_irn_mode(irn);
        tenv.cg    = cg;
 
@@ -2069,7 +2069,7 @@ void ia32_transform_node(ir_node *node, void *env) {
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
        tenv.mode     = get_irn_mode(node);
        tenv.cg       = cgenv;
 
        tenv.mode     = get_irn_mode(node);
        tenv.cg       = cgenv;
 
index 2472cf9..010efd8 100644 (file)
@@ -48,7 +48,7 @@
 #define MASK_TOS(x)            ((x) & (N_x87_REGS - 1))
 
 /** the debug handle */
 #define MASK_TOS(x)            ((x) & (N_x87_REGS - 1))
 
 /** the debug handle */
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 /**
  * An exchange template.
 
 /**
  * An exchange template.
index 1e4e303..77c9b24 100644 (file)
@@ -14,11 +14,11 @@ struct _mips_code_gen_t {
        FILE                           *out;            /**< output file */
        const arch_env_t               *arch_env;       /**< the arch env */
        set                            *reg_set;        /**< set to memorize registers for FIRM nodes (e.g. phi) */
        FILE                           *out;            /**< output file */
        const arch_env_t               *arch_env;       /**< the arch env */
        set                            *reg_set;        /**< set to memorize registers for FIRM nodes (e.g. phi) */
-       firm_dbg_module_t              *mod;            /**< debugging module */
        int                             emit_decls;     /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /**< The be-irg (contains additional information about the irg) */
        ir_node                        **bl_list;               /**< The block schedule list. */
        survive_dce_t                              *bl_list_sdce;       /**< survive dce environment for the block schedule list */
        int                             emit_decls;     /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;           /**< The be-irg (contains additional information about the irg) */
        ir_node                        **bl_list;               /**< The block schedule list. */
        survive_dce_t                              *bl_list_sdce;       /**< survive dce environment for the block schedule list */
+       DEBUG_ONLY(firm_dbg_module_t   *mod;)           /**< debugging module */
 };
 
 
 };
 
 
@@ -40,13 +40,13 @@ typedef struct _mips_irn_ops_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _mips_transform_env_t {
 /* this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _mips_transform_env_t {
-       firm_dbg_module_t *mod;      /**< The firm debugger */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
        mips_code_gen_t   *cg;       /**< The code generator */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
        mips_code_gen_t   *cg;       /**< The code generator */
+       DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */
 } mips_transform_env_t;
 
 ir_node *mips_new_NoReg(mips_code_gen_t *cg);
 } mips_transform_env_t;
 
 ir_node *mips_new_NoReg(mips_code_gen_t *cg);
index 1c2cb3a..552c9dc 100644 (file)
@@ -658,10 +658,10 @@ typedef void (*emit_func) (const ir_node *, mips_emit_env_t *);
  */
 static void mips_emit_node(ir_node *irn, mips_emit_env_t* env)
 {
  */
 static void mips_emit_node(ir_node *irn, mips_emit_env_t* env)
 {
-       mips_emit_env_t        *emit_env = env;
-       firm_dbg_module_t *mod      = emit_env->mod;
+       mips_emit_env_t   *emit_env = env;
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
        FILE              *F        = emit_env->out;
        ir_op             *op       = get_irn_op(irn);
+       DEBUG_ONLY(firm_dbg_module_t *mod = emit_env->mod;)
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
index 86c4133..993788a 100644 (file)
 #include "bearch_mips_t.h"
 
 typedef struct _mips_emit_env_t {
 #include "bearch_mips_t.h"
 
 typedef struct _mips_emit_env_t {
-       firm_dbg_module_t         *mod;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const mips_code_gen_t *cg;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const mips_code_gen_t *cg;
+       DEBUG_ONLY(firm_dbg_module_t *mod;)
 } mips_emit_env_t;
 
 const lc_arg_env_t *mips_get_arg_env(void);
 } mips_emit_env_t;
 
 const lc_arg_env_t *mips_get_arg_env(void);
index 3dcd39f..a22dd9a 100644 (file)
@@ -986,7 +986,7 @@ void mips_transform_node(ir_node *node, void *env) {
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
        tenv.mode     = get_irn_mode(node);
        tenv.cg           = cgenv;
 
        tenv.mode     = get_irn_mode(node);
        tenv.cg           = cgenv;
 
@@ -1134,7 +1134,7 @@ void mips_pre_transform_node(ir_node *node, void *env) {
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
        tenv.mode     = get_irn_mode(node);
        tenv.cg           = cgenv;
 
        tenv.mode     = get_irn_mode(node);
        tenv.cg           = cgenv;
 
@@ -1173,7 +1173,7 @@ void mips_after_ra_walker(ir_node *node, void *env) {
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
-       tenv.mod   = cg->mod;
+       DEBUG_ONLY(tenv.mod   = cg->mod;)
        tenv.mode  = get_irn_mode(node);
        tenv.cg    = cg;
 
        tenv.mode  = get_irn_mode(node);
        tenv.cg    = cg;
 
index a3b2037..2a2aac7 100644 (file)
@@ -13,13 +13,13 @@ typedef struct _ppc32_code_gen_t {
        FILE                           *out;              /**< output file */
        const arch_env_t               *arch_env;         /**< the arch env */
        set                            *reg_set;          /**< set to memorize registers for FIRM nodes (e.g. phi) */
        FILE                           *out;              /**< output file */
        const arch_env_t               *arch_env;         /**< the arch env */
        set                            *reg_set;          /**< set to memorize registers for FIRM nodes (e.g. phi) */
-       firm_dbg_module_t              *mod;              /**< debugging module */
        int                             emit_decls;       /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;             /**< The be-irg (contains additional information about the irg) */
        unsigned                        area_size;        /**< size of call area for the current irg */
        entity                         *area;             /**< the entity representing the call area or NULL for leaf functions */
        ir_node                        *start_succ_block; /**< the block succeeding the start block in the cfg */
        ir_node                        **blk_sched;       /**< an array containing the scheduled blocks */
        int                             emit_decls;       /**< flag indicating if decls were already emitted */
        const be_irg_t                 *birg;             /**< The be-irg (contains additional information about the irg) */
        unsigned                        area_size;        /**< size of call area for the current irg */
        entity                         *area;             /**< the entity representing the call area or NULL for leaf functions */
        ir_node                        *start_succ_block; /**< the block succeeding the start block in the cfg */
        ir_node                        **blk_sched;       /**< an array containing the scheduled blocks */
+       DEBUG_ONLY(firm_dbg_module_t    *mod;)             /**< debugging module */
 } ppc32_code_gen_t;
 
 
 } ppc32_code_gen_t;
 
 
@@ -41,12 +41,12 @@ typedef struct _ppc32_irn_ops_t {
 /** this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _ppc32_transform_env_t {
 /** this is a struct to minimize the number of parameters
    for transformation walker */
 typedef struct _ppc32_transform_env_t {
-       firm_dbg_module_t *mod;      /**< The firm debugger */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
        dbg_info          *dbg;      /**< The node debug info */
        ir_graph          *irg;      /**< The irg, the node should be created in */
        ir_node           *block;    /**< The block, the node should belong to */
        ir_node           *irn;      /**< The irn, to be transformed */
        ir_mode           *mode;     /**< The mode of the irn */
+       DEBUG_ONLY(firm_dbg_module_t *mod;) /**< The firm debugger */
 } ppc32_transform_env_t;
 
 
 } ppc32_transform_env_t;
 
 
index 228edfc..2192d1d 100644 (file)
@@ -574,10 +574,10 @@ static void ppc32_register_emitters(void) {
  * Emits code for a node.
  */
 static void ppc32_emit_node(ir_node *irn, void *env) {
  * Emits code for a node.
  */
 static void ppc32_emit_node(ir_node *irn, void *env) {
-       ppc32_emit_env_t *emit_env   = env;
-       firm_dbg_module_t *mod = emit_env->mod;
-       FILE              *F   = emit_env->out;
-       ir_op             *op = get_irn_op(irn);
+       ppc32_emit_env_t  *emit_env = env;
+       FILE              *F        = emit_env->out;
+       ir_op             *op       = get_irn_op(irn);
+       DEBUG_ONLY(firm_dbg_module_t *mod = emit_env->mod;)
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
 
        DBG((mod, LEVEL_1, "emitting code for %+F\n", irn));
 
index 1074480..edc9b31 100644 (file)
 #include "bearch_ppc32_t.h"
 
 typedef struct _emit_env_t {
 #include "bearch_ppc32_t.h"
 
 typedef struct _emit_env_t {
-       firm_dbg_module_t         *mod;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const ppc32_code_gen_t    *cg;
        FILE                      *out;
        const arch_env_t          *arch_env;
        const ppc32_code_gen_t    *cg;
+       DEBUG_ONLY(firm_dbg_module_t *mod;)
 } ppc32_emit_env_t;
 
 const lc_arg_env_t *ppc32_get_arg_env(void);
 } ppc32_emit_env_t;
 
 const lc_arg_env_t *ppc32_get_arg_env(void);
index be7afc1..055f29f 100644 (file)
@@ -1357,7 +1357,7 @@ void ppc32_transform_node(ir_node *node, void *env) {
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
        tenv.dbg      = get_irn_dbg_info(node);
        tenv.irg      = current_ir_graph;
        tenv.irn      = node;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
        tenv.mode     = get_irn_mode(node);
 
 #define UNOP(a)        case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break
        tenv.mode     = get_irn_mode(node);
 
 #define UNOP(a)        case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break
@@ -1746,7 +1746,7 @@ void ppc32_transform_const(ir_node *node, void *env) {
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
        tenv.dbg   = get_irn_dbg_info(node);
        tenv.irg   = current_ir_graph;
        tenv.irn   = node;
-       tenv.mod   = cgenv->mod;
+       DEBUG_ONLY(tenv.mod   = cgenv->mod;)
        tenv.mode  = get_irn_mode(node);
 
 #define OTHER_GEN(a)                        \
        tenv.mode  = get_irn_mode(node);
 
 #define OTHER_GEN(a)                        \
index 8e74a09..b500292 100644 (file)
@@ -208,7 +208,7 @@ void finalize_block(ppc32_code_gen_t *cgenv)
 
        tenv.block    = current_block;
        tenv.irg      = current_ir_graph;
 
        tenv.block    = current_block;
        tenv.irg      = current_ir_graph;
-       tenv.mod      = cgenv->mod;
+       DEBUG_ONLY(tenv.mod      = cgenv->mod;)
 
        memory = get_irg_no_mem(current_ir_graph);
        for(i = 0; i < attr->conv_count; i++)
 
        memory = get_irg_no_mem(current_ir_graph);
        for(i = 0; i < attr->conv_count; i++)
@@ -360,7 +360,7 @@ void ppc32_conv_walk(ir_node *node, void *env) {
        }
 
        tenv.irg = current_ir_graph;
        }
 
        tenv.irg = current_ir_graph;
-       tenv.mod = cgenv->mod;
+       DEBUG_ONLY(tenv.mod = cgenv->mod;)
 
        if (code == iro_Conv)
        {
 
        if (code == iro_Conv)
        {
@@ -456,7 +456,7 @@ void ppc32_pretransform_walk(ir_node *node, void *env) {
        }
 
        tenv.irg = current_ir_graph;
        }
 
        tenv.irg = current_ir_graph;
-       tenv.mod = cgenv->mod;
+       DEBUG_ONLY(tenv.mod = cgenv->mod;)
 
        if(code == iro_Const || code == iro_SymConst)
        {
 
        if(code == iro_Const || code == iro_SymConst)
        {