Commit ea64ddab authored by Christian Würdig's avatar Christian Würdig
Browse files

wrapped debugging modules with DEBUG_ONLY

parent 0ed1fdbf
...@@ -297,9 +297,9 @@ static void TEMPLATE_register_emitters(void) { ...@@ -297,9 +297,9 @@ static void TEMPLATE_register_emitters(void) {
*/ */
void TEMPLATE_emit_node(ir_node *irn, void *env) { void TEMPLATE_emit_node(ir_node *irn, void *env) {
emit_env_t *emit_env = env; emit_env_t *emit_env = env;
firm_dbg_module_t *mod = emit_env->mod;
FILE *F = emit_env->out; FILE *F = emit_env->out;
ir_op *op = get_irn_op(irn); 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));
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include "bearch_TEMPLATE_t.h" #include "bearch_TEMPLATE_t.h"
typedef struct _emit_env_t { typedef struct _emit_env_t {
firm_dbg_module_t *mod;
FILE *out; FILE *out;
const arch_env_t *arch_env; const arch_env_t *arch_env;
const TEMPLATE_code_gen_t *cg; const TEMPLATE_code_gen_t *cg;
DEBUG_ONLY(firm_dbg_module_t *mod;)
} emit_env_t; } emit_env_t;
const lc_arg_env_t *TEMPLATE_get_arg_env(void); const lc_arg_env_t *TEMPLATE_get_arg_env(void);
......
...@@ -12,9 +12,9 @@ typedef struct _TEMPLATE_code_gen_t { ...@@ -12,9 +12,9 @@ typedef struct _TEMPLATE_code_gen_t {
FILE *out; /* output file */ FILE *out; /* output file */
const arch_env_t *arch_env; /* the arch env */ const arch_env_t *arch_env; /* the arch env */
set *reg_set; /* set to memorize registers for FIRM nodes (e.g. phi) */ 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 */ int emit_decls; /* flag indicating if decls were already emitted */
const be_irg_t *birg; /* The be-irg (contains additional information about the irg) */ 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 { ...@@ -36,12 +36,12 @@ typedef struct _TEMPLATE_irn_ops_t {
/* this is a struct to minimize the number of parameters /* this is a struct to minimize the number of parameters
for transformation walker */ for transformation walker */
typedef struct _TEMPLATE_transform_env_t { typedef struct _TEMPLATE_transform_env_t {
firm_dbg_module_t *mod; /**< The firm debugger */
dbg_info *dbg; /**< The node debug info */ dbg_info *dbg; /**< The node debug info */
ir_graph *irg; /**< The irg, the node should be created in */ ir_graph *irg; /**< The irg, the node should be created in */
ir_node *block; /**< The block, the node should belong to */ ir_node *block; /**< The block, the node should belong to */
ir_node *irn; /**< The irn, to be transformed */ ir_node *irn; /**< The irn, to be transformed */
ir_mode *mode; /**< The mode of the irn */ 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;
......
...@@ -754,9 +754,9 @@ static void arm_register_emitters(void) { ...@@ -754,9 +754,9 @@ static void arm_register_emitters(void) {
*/ */
static void arm_emit_node(const ir_node *irn, void *env) { static void arm_emit_node(const ir_node *irn, void *env) {
arm_emit_env_t *emit_env = env; arm_emit_env_t *emit_env = env;
firm_dbg_module_t *mod = emit_env->mod;
FILE *F = emit_env->out; FILE *F = emit_env->out;
ir_op *op = get_irn_op(irn); 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));
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include "bearch_arm_t.h" #include "bearch_arm_t.h"
typedef struct _arm_emit_env_t { typedef struct _arm_emit_env_t {
firm_dbg_module_t *mod;
FILE *out; FILE *out;
const arch_env_t *arch_env; const arch_env_t *arch_env;
const arm_code_gen_t *cg; const arm_code_gen_t *cg;
DEBUG_ONLY(firm_dbg_module_t *mod;)
} arm_emit_env_t; } arm_emit_env_t;
const lc_arg_env_t *arm_get_arg_env(void); const lc_arg_env_t *arm_get_arg_env(void);
......
...@@ -821,7 +821,7 @@ static ir_node *gen_CopyB(arm_transform_env_t *env) { ...@@ -821,7 +821,7 @@ static ir_node *gen_CopyB(arm_transform_env_t *env) {
const_env.dbg = dbg; const_env.dbg = dbg;
const_env.irg = irg; const_env.irg = irg;
const_env.irn = node; const_env.irn = node;
const_env.mod = env->mod; DEBUG_ONLY(const_env.mod = env->mod;)
const_env.mode = mode_Iu; const_env.mode = mode_Iu;
src_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_general_purpose], irg, block, src); 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) { ...@@ -874,7 +874,7 @@ void arm_move_consts(ir_node *node, void *env) {
tenv.dbg = get_irn_dbg_info(pred); tenv.dbg = get_irn_dbg_info(pred);
tenv.irg = current_ir_graph; tenv.irg = current_ir_graph;
tenv.irn = pred; tenv.irn = pred;
tenv.mod = cgenv->mod; DEBUG_ONLY(tenv.mod = cgenv->mod;)
tenv.mode = get_irn_mode(pred); tenv.mode = get_irn_mode(pred);
const_graph = create_const_graph(&tenv); const_graph = create_const_graph(&tenv);
set_irn_n(node, i, const_graph); set_irn_n(node, i, const_graph);
...@@ -899,7 +899,7 @@ void arm_move_consts(ir_node *node, void *env) { ...@@ -899,7 +899,7 @@ void arm_move_consts(ir_node *node, void *env) {
tenv.dbg = get_irn_dbg_info(pred); tenv.dbg = get_irn_dbg_info(pred);
tenv.irg = current_ir_graph; tenv.irg = current_ir_graph;
tenv.irn = pred; tenv.irn = pred;
tenv.mod = cgenv->mod; DEBUG_ONLY(tenv.mod = cgenv->mod;)
tenv.mode = get_irn_mode(pred); tenv.mode = get_irn_mode(pred);
const_graph = create_const_graph(&tenv); const_graph = create_const_graph(&tenv);
set_irn_n(node, i, const_graph); set_irn_n(node, i, const_graph);
...@@ -962,7 +962,7 @@ void arm_transform_node(ir_node *node, void *env) { ...@@ -962,7 +962,7 @@ void arm_transform_node(ir_node *node, void *env) {
tenv.dbg = get_irn_dbg_info(node); tenv.dbg = get_irn_dbg_info(node);
tenv.irg = current_ir_graph; tenv.irg = current_ir_graph;
tenv.irn = node; tenv.irn = node;
tenv.mod = cgenv->mod; DEBUG_ONLY(tenv.mod = cgenv->mod;)
tenv.mode = get_irn_mode(node); tenv.mode = get_irn_mode(node);
#define UNOP(a) case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break #define UNOP(a) case iro_##a: asm_node = gen_##a(&tenv, get_##a##_op(node)); break
......
...@@ -14,10 +14,10 @@ typedef struct _arm_code_gen_t { ...@@ -14,10 +14,10 @@ typedef struct _arm_code_gen_t {
FILE *out; /**< output file */ FILE *out; /**< output file */
const arch_env_t *arch_env; /**< the arch env */ const arch_env_t *arch_env; /**< the arch env */
set *reg_set; /**< set to memorize registers for FIRM nodes (e.g. phi) */ 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 */ int emit_decls; /**< flag indicating if decls were already emitted */
const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */ 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 */ 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 { ...@@ -39,13 +39,12 @@ typedef struct _arm_irn_ops_t {
/* this is a struct to minimize the number of parameters /* this is a struct to minimize the number of parameters
for transformation walker */ for transformation walker */
typedef struct _arm_transform_env_t { typedef struct _arm_transform_env_t {
firm_dbg_module_t *mod; /**< The firm debugger */
dbg_info *dbg; /**< The node debug info */ dbg_info *dbg; /**< The node debug info */
ir_graph *irg; /**< The irg, the node should be created in */ ir_graph *irg; /**< The irg, the node should be created in */
ir_node *block; /**< The block, the node should belong to */ ir_node *block; /**< The block, the node should belong to */
ir_node *irn; /**< The irn, to be transformed */ ir_node *irn; /**< The irn, to be transformed */
ir_mode *mode; /**< The mode of the irn */ 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;
......
...@@ -28,7 +28,7 @@ struct _be_main_env_t { ...@@ -28,7 +28,7 @@ struct _be_main_env_t {
struct _be_options_t *options; struct _be_options_t *options;
struct _arch_code_generator_t *cg; struct _arch_code_generator_t *cg;
struct _arch_irn_handler_t *phi_handler; 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 {
......
...@@ -74,7 +74,6 @@ struct _be_stack_slot_t { ...@@ -74,7 +74,6 @@ struct _be_stack_slot_t {
struct _be_abi_irg_t { struct _be_abi_irg_t {
struct obstack obst; struct obstack obst;
firm_dbg_module_t *dbg; /**< The debugging module. */
be_stack_frame_t *frame; /**< The stack frame model. */ be_stack_frame_t *frame; /**< The stack frame model. */
const be_irg_t *birg; /**< The back end IRG. */ const be_irg_t *birg; /**< The back end IRG. */
const arch_isa_t *isa; /**< The isa. */ const arch_isa_t *isa; /**< The isa. */
...@@ -99,6 +98,7 @@ struct _be_abi_irg_t { ...@@ -99,6 +98,7 @@ struct _be_abi_irg_t {
arch_irn_handler_t irn_handler; arch_irn_handler_t irn_handler;
arch_irn_ops_t irn_ops; 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 * ...@@ -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; be_abi_call_t *call = env->call;
const arch_isa_t *isa = env->birg->main_env->arch_env->isa; const arch_isa_t *isa = env->birg->main_env->arch_env->isa;
const arch_register_t *sp = arch_isa_sp(isa); const arch_register_t *sp = arch_isa_sp(isa);
...@@ -1148,6 +1147,7 @@ static void modify_irg(be_abi_irg_t *env) ...@@ -1148,6 +1147,7 @@ static void modify_irg(be_abi_irg_t *env)
pset *dont_save = pset_new_ptr(8); pset *dont_save = pset_new_ptr(8);
int n_params = get_method_n_params(method_type); int n_params = get_method_n_params(method_type);
int max_arg = 0; int max_arg = 0;
DEBUG_ONLY(firm_dbg_module_t *dbg = env->dbg;)
int i, j, n; int i, j, n;
......
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
typedef struct _be_chordal_alloc_env_t { typedef struct _be_chordal_alloc_env_t {
be_chordal_env_t *chordal_env; 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. */ pset *pre_colored; /**< Set of precolored nodes. */
bitset_t *live; /**< A liveness bitset. */ 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. */ 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 { ...@@ -71,6 +70,7 @@ typedef struct _be_chordal_alloc_env_t {
bitset_t *in_colors; /**< Colors used by live in values. */ bitset_t *in_colors; /**< Colors used by live in values. */
bitset_t *ignore_regs; /**< A bitset of all ignore registers in the current class. */ bitset_t *ignore_regs; /**< A bitset of all ignore registers in the current class. */
int colors_n; /**< The number of colors. */ 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; } be_chordal_alloc_env_t;
#include "fourcc.h" #include "fourcc.h"
...@@ -380,13 +380,13 @@ static ir_node *pre_process_constraints(be_chordal_alloc_env_t *alloc_env, insn_ ...@@ -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; be_chordal_env_t *env = alloc_env->chordal_env;
const arch_env_t *aenv = env->birg->main_env->arch_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; insn_t *insn = *the_insn;
ir_node *bl = get_nodes_block(insn->irn); ir_node *bl = get_nodes_block(insn->irn);
ir_node *copy = NULL; ir_node *copy = NULL;
ir_node *perm = NULL; ir_node *perm = NULL;
bitset_t *out_constr = bitset_alloca(env->cls->n_regs); bitset_t *out_constr = bitset_alloca(env->cls->n_regs);
bitset_t *bs = 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 ...@@ -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. correctly precolored. These Perms arise during the ABI handling phase.
*/ */
if(insn->has_constraints) { if(insn->has_constraints) {
firm_dbg_module_t *dbg = alloc_env->constr_dbg;
const arch_env_t *aenv = env->birg->main_env->arch_env; const arch_env_t *aenv = env->birg->main_env->arch_env;
int n_regs = env->cls->n_regs; int n_regs = env->cls->n_regs;
bitset_t *bs = bitset_alloca(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 ...@@ -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); bipartite_t *bp = bipartite_new(n_regs, n_regs);
int *assignment = alloca(n_regs * sizeof(assignment[0])); int *assignment = alloca(n_regs * sizeof(assignment[0]));
pmap *partners = pmap_create(); pmap *partners = pmap_create();
DEBUG_ONLY(firm_dbg_module_t *dbg = alloc_env->constr_dbg;)
int i, n_alloc; int i, n_alloc;
long col; long col;
...@@ -699,8 +699,8 @@ static void pressure(ir_node *block, void *env_ptr) ...@@ -699,8 +699,8 @@ static void pressure(ir_node *block, void *env_ptr)
be_chordal_alloc_env_t *alloc_env = env_ptr; be_chordal_alloc_env_t *alloc_env = env_ptr;
be_chordal_env_t *env = alloc_env->chordal_env; be_chordal_env_t *env = alloc_env->chordal_env;
bitset_t *live = alloc_env->live; 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; int i, n;
unsigned step = 0; unsigned step = 0;
...@@ -795,11 +795,11 @@ static void assign(ir_node *block, void *env_ptr) ...@@ -795,11 +795,11 @@ static void assign(ir_node *block, void *env_ptr)
{ {
be_chordal_alloc_env_t *alloc_env = env_ptr; be_chordal_alloc_env_t *alloc_env = env_ptr;
be_chordal_env_t *env = alloc_env->chordal_env; be_chordal_env_t *env = alloc_env->chordal_env;
firm_dbg_module_t *dbg = env->dbg;
bitset_t *live = alloc_env->live; bitset_t *live = alloc_env->live;
bitset_t *colors = alloc_env->colors; bitset_t *colors = alloc_env->colors;
bitset_t *in_colors = alloc_env->in_colors; bitset_t *in_colors = alloc_env->in_colors;
const arch_env_t *arch_env = env->birg->main_env->arch_env; 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; const ir_node *irn;
border_t *b; border_t *b;
......
...@@ -55,12 +55,12 @@ ...@@ -55,12 +55,12 @@
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; const arch_env_t *arch_env = chordal_env->birg->main_env->arch_env;
struct obstack ob; struct obstack ob;
pmap_entry *pme; pmap_entry *pme;
ir_node **nodes, *n1, *n2; ir_node **nodes, *n1, *n2;
int i, o; int i, o;
DEBUG_ONLY(firm_dbg_module_t *dbg = chordal_env->dbg;)
/* Collect all irns */ /* Collect all irns */
obstack_init(&ob); obstack_init(&ob);
...@@ -98,13 +98,13 @@ void be_ra_chordal_check(be_chordal_env_t *chordal_env) { ...@@ -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) static void check_pressure_walker(ir_node *bl, void *data)
{ {
be_chordal_env_t *env = data; be_chordal_env_t *env = data;
firm_dbg_module_t *dbg = env->dbg;
int n_regs = arch_register_class_n_regs(env->cls); int n_regs = arch_register_class_n_regs(env->cls);
pset *live = pset_new_ptr_default(); pset *live = pset_new_ptr_default();
int step = 0; int step = 0;
ir_node *irn; ir_node *irn;
irn_live_t *li; irn_live_t *li;
DEBUG_ONLY(firm_dbg_module_t *dbg = env->dbg;)
live_foreach(bl, li) { live_foreach(bl, li) {
if(live_is_end(li) && chordal_has_class(env, li->irn)) { if(live_is_end(li) && chordal_has_class(env, li->irn)) {
......
...@@ -54,7 +54,6 @@ typedef struct _border_t { ...@@ -54,7 +54,6 @@ typedef struct _border_t {
struct _be_chordal_env_t { struct _be_chordal_env_t {
struct obstack obst; /**< An obstack for temporary storage. */ struct obstack obst; /**< An obstack for temporary storage. */
be_ra_chordal_opts_t *opts; /**< A pointer to the chordal ra options. */ 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. */ const be_irg_t *birg; /**< Back-end IRG session. */
dom_front_info_t *dom_front; /**< Dominance frontiers. */ dom_front_info_t *dom_front; /**< Dominance frontiers. */
ir_graph *irg; /**< The graph under examination. */ ir_graph *irg; /**< The graph under examination. */
...@@ -62,6 +61,7 @@ struct _be_chordal_env_t { ...@@ -62,6 +61,7 @@ struct _be_chordal_env_t {
pmap *border_heads; /**< Maps blocks to border heads. */ pmap *border_heads; /**< Maps blocks to border heads. */
be_ifg_t *ifg; /**< The interference graph. */ be_ifg_t *ifg; /**< The interference graph. */
void *data; /**< Some pointer, to which different phases can attach data to. */ 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) {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "becopystat.h" #include "becopystat.h"
#include "bitset.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
......
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
#define DEBUG_LVL 1 #define DEBUG_LVL 1
typedef struct _local_env_t { typedef struct _local_env_t {
firm_dbg_module_t *dbg;
double time_limit; double time_limit;
int first_x_var, last_x_var; int first_x_var, last_x_var;
pmap *nr_2_irn; pmap *nr_2_irn;
DEBUG_ONLY(firm_dbg_module_t *dbg;)
} local_env_t; } local_env_t;
static void build_coloring_cstr(ilp_env_t *ienv) { static void build_coloring_cstr(ilp_env_t *ienv) {
......
...@@ -43,7 +43,7 @@ ...@@ -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) {
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define DO_ILP2 #define DO_ILP2
#define DEBUG_LVL SET_LEVEL_1 #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_ARITY 20
#define MAX_CLS_SIZE 20 #define MAX_CLS_SIZE 20
......
...@@ -403,9 +403,9 @@ typedef struct _block_sched_env_t { ...@@ -403,9 +403,9 @@ typedef struct _block_sched_env_t {
pset *ready_set; pset *ready_set;
pset *already_scheduled; pset *already_scheduled;
ir_node *block; ir_node *block;
firm_dbg_module_t *dbg;
const list_sched_selector_t *selector; const list_sched_selector_t *selector;
void *selector_block_env; void *selector_block_env;
DEBUG_ONLY(firm_dbg_module_t *dbg;)
} block_sched_env_t; } block_sched_env_t;
/** /**
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
typedef struct _lower_env_t { typedef struct _lower_env_t {
be_chordal_env_t *chord_env; be_chordal_env_t *chord_env;
int do_copy; int do_copy;
firm_dbg_module_t *dbg_module; DEBUG_ONLY(firm_dbg_module_t *dbg_module;)
} lower_env_t; } lower_env_t;
/* holds a perm register pair */ /* 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 ...@@ -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) { static void lower_perm_node(ir_node *irn, void *walk_env) {
const arch_register_class_t *reg_class; const arch_register_class_t *reg_class;
const arch_env_t *arch_env; const arch_env_t *arch_env;
firm_dbg_module_t *mod;
lower_env_t *env = walk_env; lower_env_t *env = walk_env;
reg_pair_t *pairs; reg_pair_t *pairs;
const ir_edge_t *edge; const ir_edge_t *edge;
...@@ -257,10 +256,11 @@ static void lower_perm_node(ir_node *irn, void *walk_env) { ...@@ -257,10 +256,11 @@ static void lower_perm_node(ir_node *irn, void *walk_env) {
ir_node *sched_point, *block, *in[2]; ir_node *sched_point, *block, *in[2];
ir_node *arg1, *arg2, *res1, *res2; ir_node *arg1, *arg2, *res1, *res2;
ir_node *cpyxchg = NULL; ir_node *cpyxchg = NULL;
DEBUG_ONLY(firm_dbg_module_t *mod;)
arch_env = env->chord_env->birg->main_env->arch_env; arch_env = env->chord_env->birg->main_env->arch_env;
do_copy = env->do_copy; 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);
/* /*
......
...@@ -103,7 +103,6 @@ typedef struct _var_info_t var_info_t; ...@@ -103,7 +103,6 @@ typedef struct _var_info_t var_info_t;
* Environment with all the needed stuff * Environment with all the needed stuff
*/ */
typedef struct _be_raext_env_t { typedef struct _be_raext_env_t {
firm_dbg_module_t *dbg;
arch_env_t *aenv; arch_env_t *aenv;
const arch_register_class_t *cls; const arch_register_class_t *cls;
ir_graph *irg; ir_graph *irg;
...@@ -113,6 +112,7 @@ typedef struct _be_raext_env_t { ...@@ -113,6 +112,7 @@ typedef struct _be_raext_env_t {
set *vars; /**< contains all var_info_t */