From 7d5b331123bd8399f5f1d057e90797faa3300b66 Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Thu, 15 Sep 2011 13:45:56 +0200 Subject: [PATCH] Fixed inconsistent uses of DEBUG_ONLY. --- ir/adt/hungarian.c | 2 +- ir/ana/interval_analysis.c | 2 +- ir/ana/vrp.c | 2 +- ir/be/bechordal_common.c | 6 +++--- ir/be/becopyheur2.c | 2 +- ir/be/belistsched.c | 2 +- ir/be/beloopana.c | 2 +- ir/be/betranshlp.c | 2 +- ir/be/ia32/ia32_transform.c | 2 +- ir/be/ia32/ia32_x87.c | 42 ++++++++++++++++++------------------- ir/opt/boolopt.c | 2 +- ir/opt/combo.c | 8 +++---- ir/opt/convopt.c | 2 +- ir/opt/garbage_collect.c | 2 +- ir/opt/ifconv.c | 2 +- ir/opt/ircgopt.c | 2 +- ir/opt/jumpthreading.c | 2 +- ir/opt/loop.c | 2 +- ir/opt/opt_blocks.c | 6 +++--- ir/opt/tailrec.c | 2 +- ir/tr/tr_inheritance.c | 2 +- 21 files changed, 48 insertions(+), 48 deletions(-) diff --git a/ir/adt/hungarian.c b/ir/adt/hungarian.c index 926f768fa..3b34318f4 100644 --- a/ir/adt/hungarian.c +++ b/ir/adt/hungarian.c @@ -43,7 +43,7 @@ #include "hungarian.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) struct hungarian_problem_t { unsigned num_rows; /**< number of rows */ diff --git a/ir/ana/interval_analysis.c b/ir/ana/interval_analysis.c index 79e34401a..268613345 100644 --- a/ir/ana/interval_analysis.c +++ b/ir/ana/interval_analysis.c @@ -40,7 +40,7 @@ #include "irprintf.h" #include "hashptr.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /*------------------------------------------------------------------*/ /* A new in array via a hashmap. */ diff --git a/ir/ana/vrp.c b/ir/ana/vrp.c index d1d0a6752..21c871ff5 100644 --- a/ir/ana/vrp.c +++ b/ir/ana/vrp.c @@ -41,7 +41,7 @@ #include "bitset.h" #include "debug.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) typedef struct vrp_env_t { waitq *workqueue; diff --git a/ir/be/bechordal_common.c b/ir/be/bechordal_common.c index 195aa50f0..74f48c756 100644 --- a/ir/be/bechordal_common.c +++ b/ir/be/bechordal_common.c @@ -78,8 +78,8 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head */ set_irn_link(irn, def); - DEBUG_ONLY(b->magic = BORDER_FOURCC); - DEBUG_ONLY(def->magic = BORDER_FOURCC); + DEBUG_ONLY(b->magic = BORDER_FOURCC;) + DEBUG_ONLY(def->magic = BORDER_FOURCC;) } else { /* * If the def is encountered, the use was made and so was the @@ -88,7 +88,7 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head */ b = (border_t*)get_irn_link(irn); - DEBUG_ONLY(assert(b && b->magic == BORDER_FOURCC && "Illegal border encountered")); + DEBUG_ONLY(assert(b && b->magic == BORDER_FOURCC && "Illegal border encountered");) } b->pressure = pressure; diff --git a/ir/be/becopyheur2.c b/ir/be/becopyheur2.c index 217819ed0..6bb00d0fa 100644 --- a/ir/be/becopyheur2.c +++ b/ir/be/becopyheur2.c @@ -958,7 +958,7 @@ static void process_cloud(co2_cloud_t *cloud) DBG((env->dbg, LEVEL_3, "mst:\n")); for (i = 0; i < cloud->n_memb; ++i) { - DEBUG_ONLY(co2_cloud_irn_t *ci = cloud->seq[i]); + DEBUG_ONLY(co2_cloud_irn_t *ci = cloud->seq[i];) DBG((env->dbg, LEVEL_3, "\t%+F -> %+F\n", ci->inh.irn, ci->mst_parent->inh.irn)); } diff --git a/ir/be/belistsched.c b/ir/be/belistsched.c index 692fee1fd..3d5820806 100644 --- a/ir/be/belistsched.c +++ b/ir/be/belistsched.c @@ -61,7 +61,7 @@ #include "lc_opts.h" #include "lc_opts_enum.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL); +DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;) /** * Scheduling environment for the whole graph. diff --git a/ir/be/beloopana.c b/ir/be/beloopana.c index b79c537f7..8c9b61391 100644 --- a/ir/be/beloopana.c +++ b/ir/be/beloopana.c @@ -40,7 +40,7 @@ #include "beloopana.h" #include "bemodule.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL); +DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;) #define HASH_LOOP_INFO(info) (HASH_PTR((info)->loop) ^ HASH_PTR((info)->cls)) diff --git a/ir/be/betranshlp.c b/ir/be/betranshlp.c index ee4b8032d..678f361ef 100644 --- a/ir/be/betranshlp.c +++ b/ir/be/betranshlp.c @@ -211,7 +211,7 @@ ir_node *be_transform_node(ir_node *node) if (new_node != NULL) return new_node; - DEBUG_ONLY(be_set_transformed_node(node, NULL)); + DEBUG_ONLY(be_set_transformed_node(node, NULL);) op = get_irn_op(node); if (op->ops.generic == NULL) { diff --git a/ir/be/ia32/ia32_transform.c b/ir/be/ia32/ia32_transform.c index 4bd96e556..a06ccd384 100644 --- a/ir/be/ia32/ia32_transform.c +++ b/ir/be/ia32/ia32_transform.c @@ -3929,7 +3929,7 @@ static ir_node *gen_Conv(ir_node *node) } } else { /* this should be optimized already, but who knows... */ - DEBUG_ONLY(ir_fprintf(stderr, "Debug warning: conv %+F is pointless\n", node)); + DEBUG_ONLY(ir_fprintf(stderr, "Debug warning: conv %+F is pointless\n", node);) DB((dbg, LEVEL_1, "killed Conv(mode, mode) ...")); return be_transform_node(op); } diff --git a/ir/be/ia32/ia32_x87.c b/ir/be/ia32/ia32_x87.c index 3977b94ff..be1438af8 100644 --- a/ir/be/ia32/ia32_x87.c +++ b/ir/be/ia32/ia32_x87.c @@ -217,7 +217,7 @@ static void x87_set_st(x87_state *state, int reg_idx, ir_node *node, int pos) state->st[MASK_TOS(state->tos + pos)].node = node; DB((dbg, LEVEL_2, "After SET_REG: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) } /* x87_set_st */ /** @@ -248,7 +248,7 @@ static void x87_fxch(x87_state *state, int pos) state->st[MASK_TOS(state->tos)] = entry; DB((dbg, LEVEL_2, "After FXCH: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) } /* x87_fxch */ /** @@ -286,7 +286,7 @@ static void x87_push_dbl(x87_state *state, int reg_idx, ir_node *node) state->st[state->tos].reg_idx = reg_idx; state->st[state->tos].node = node; - DB((dbg, LEVEL_2, "After PUSH: ")); DEBUG_ONLY(x87_dump_stack(state)); + DB((dbg, LEVEL_2, "After PUSH: ")); DEBUG_ONLY(x87_dump_stack(state);) } /* x87_push_dbl */ /** @@ -316,7 +316,7 @@ static void x87_pop(x87_state *state) --state->depth; state->tos = MASK_TOS(state->tos + 1); - DB((dbg, LEVEL_2, "After POP: ")); DEBUG_ONLY(x87_dump_stack(state)); + DB((dbg, LEVEL_2, "After POP: ")); DEBUG_ONLY(x87_dump_stack(state);) } /* x87_pop */ /** @@ -583,9 +583,9 @@ static x87_state *x87_shuffle(x87_simulator *sim, ir_node *block, /* Hmm: permutation needed */ DB((dbg, LEVEL_2, "\n%+F needs permutation: from\n", block)); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) DB((dbg, LEVEL_2, " to\n")); - DEBUG_ONLY(x87_dump_stack(dst_state)); + DEBUG_ONLY(x87_dump_stack(dst_state);) #ifdef DEBUG_libfirm @@ -910,9 +910,9 @@ static int sim_binop(x87_state *state, ir_node *n, const exchange_tmpl *tmpl) DB((dbg, LEVEL_1, ">>> %+F %s, %s -> %s\n", n, arch_register_get_name(op1_reg), arch_register_get_name(op2_reg), arch_register_get_name(out))); - DEBUG_ONLY(vfp_dump_live(live)); + DEBUG_ONLY(vfp_dump_live(live);) DB((dbg, LEVEL_1, "Stack before: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) op1_idx = x87_on_stack(state, reg_index_1); assert(op1_idx >= 0); @@ -1071,7 +1071,7 @@ static int sim_unop(x87_state *state, ir_node *n, ir_op *op) unsigned live = vfp_live_args_after(sim, n, REGMASK(out)); DB((dbg, LEVEL_1, ">>> %+F -> %s\n", n, out->name)); - DEBUG_ONLY(vfp_dump_live(live)); + DEBUG_ONLY(vfp_dump_live(live);) op1_idx = x87_on_stack(state, arch_register_get_index(op1)); @@ -1358,9 +1358,9 @@ static int sim_FtstFnstsw(x87_state *state, ir_node *n) unsigned live = vfp_live_args_after(sim, n, 0); DB((dbg, LEVEL_1, ">>> %+F %s\n", n, arch_register_get_name(reg1))); - DEBUG_ONLY(vfp_dump_live(live)); + DEBUG_ONLY(vfp_dump_live(live);) DB((dbg, LEVEL_1, "Stack before: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) assert(op1_idx >= 0); if (op1_idx != 0) { @@ -1410,9 +1410,9 @@ static int sim_Fucom(x87_state *state, ir_node *n) DB((dbg, LEVEL_1, ">>> %+F %s, %s\n", n, arch_register_get_name(op1), arch_register_get_name(op2))); - DEBUG_ONLY(vfp_dump_live(live)); + DEBUG_ONLY(vfp_dump_live(live);) DB((dbg, LEVEL_1, "Stack before: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) op1_idx = x87_on_stack(state, reg_index_1); assert(op1_idx >= 0); @@ -1656,7 +1656,7 @@ static int sim_Keep(x87_state *state, ir_node *node) } DB((dbg, LEVEL_1, "Stack after: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) return NO_NODE_ADDED; } /* sim_Keep */ @@ -1778,7 +1778,7 @@ static int sim_Copy(x87_state *state, ir_node *n) DB((dbg, LEVEL_1, ">>> %+F %s -> %s\n", n, arch_register_get_name(op1), arch_register_get_name(out))); - DEBUG_ONLY(vfp_dump_live(live)); + DEBUG_ONLY(vfp_dump_live(live);) op1_idx = x87_on_stack(state, arch_register_get_index(op1)); @@ -1916,7 +1916,7 @@ static int sim_Call(x87_state *state, ir_node *n) end_call: DB((dbg, LEVEL_1, "Stack after: ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) return NO_NODE_ADDED; } /* sim_Call */ @@ -2038,8 +2038,8 @@ static x87_state *x87_kill_deads(x87_simulator *sim, ir_node *block, x87_state * state = x87_clone_state(sim, state); DB((dbg, LEVEL_1, "Killing deads:\n")); - DEBUG_ONLY(vfp_dump_live(live)); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(vfp_dump_live(live);) + DEBUG_ONLY(x87_dump_stack(state);) if (kill_mask != 0 && live == 0) { /* special case: kill all registers */ @@ -2114,7 +2114,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block) DB((dbg, LEVEL_1, "Simulate %+F\n", block)); DB((dbg, LEVEL_2, "State at Block begin:\n ")); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) /* at block begin, kill all dead registers */ state = x87_kill_deads(sim, block, state); @@ -2151,7 +2151,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block) start_block = get_irg_start_block(get_irn_irg(block)); - DB((dbg, LEVEL_2, "State at Block end:\n ")); DEBUG_ONLY(x87_dump_stack(state)); + DB((dbg, LEVEL_2, "State at Block end:\n ")); DEBUG_ONLY(x87_dump_stack(state);) /* check if the state must be shuffled */ foreach_block_succ(block, edge) { @@ -2165,7 +2165,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block) if (succ_state->begin == NULL) { DB((dbg, LEVEL_2, "Set begin state for succ %+F:\n", succ)); - DEBUG_ONLY(x87_dump_stack(state)); + DEBUG_ONLY(x87_dump_stack(state);) succ_state->begin = state; waitq_put(sim->worklist, succ); diff --git a/ir/opt/boolopt.c b/ir/opt/boolopt.c index a666c2dfe..74dfc326f 100644 --- a/ir/opt/boolopt.c +++ b/ir/opt/boolopt.c @@ -57,7 +57,7 @@ typedef struct { int changed; /**< Set if the graph was changed. */ } bool_opt_env_t; -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * Check if tho given nodes, l and r, represent two compares with diff --git a/ir/opt/combo.c b/ir/opt/combo.c index 0ae4337fd..a08de8457 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -219,7 +219,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg;) DEBUG_ONLY(static const char *what_reason;) /** Next partition number. */ -DEBUG_ONLY(static unsigned part_nr = 0); +DEBUG_ONLY(static unsigned part_nr = 0;) /** The tarval returned by Unknown nodes: set to either tarval_bad OR tarval_top. */ static ir_tarval *tarval_UNKNOWN; @@ -3529,7 +3529,7 @@ static ir_graph_state_t do_combo(ir_graph *irg) set_value_of_func(get_node_tarval); set_compute_functions(); - DEBUG_ONLY(part_nr = 0); + DEBUG_ONLY(part_nr = 0;) ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_PHI_LIST); @@ -3544,7 +3544,7 @@ static ir_graph_state_t do_combo(ir_graph *irg) irg_walk_graph(irg, create_initial_partitions, init_block_phis, &env); /* set the hook: from now, every node has a partition and a type */ - DEBUG_ONLY(set_dump_node_vcgattr_hook(dump_partition_hook)); + DEBUG_ONLY(set_dump_node_vcgattr_hook(dump_partition_hook);) /* all nodes on the initial partition have type Top */ env.initial->type_is_T_or_C = 1; @@ -3592,7 +3592,7 @@ static ir_graph_state_t do_combo(ir_graph *irg) ir_free_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_PHI_LIST); /* remove the partition hook */ - DEBUG_ONLY(set_dump_node_vcgattr_hook(NULL)); + DEBUG_ONLY(set_dump_node_vcgattr_hook(NULL);) DEL_ARR_F(env.kept_memory); del_set(env.opcode2id_map); diff --git a/ir/opt/convopt.c b/ir/opt/convopt.c index 6ead5fd75..9fb7e55c8 100644 --- a/ir/opt/convopt.c +++ b/ir/opt/convopt.c @@ -56,7 +56,7 @@ #include "vrp.h" #include "opt_manage.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) static inline int imin(int a, int b) { return a < b ? a : b; } diff --git a/ir/opt/garbage_collect.c b/ir/opt/garbage_collect.c index 9ea12b809..c1607e875 100644 --- a/ir/opt/garbage_collect.c +++ b/ir/opt/garbage_collect.c @@ -36,7 +36,7 @@ #include "error.h" #include "debug.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) static void visit_entity(ir_entity *entity); diff --git a/ir/opt/ifconv.c b/ir/opt/ifconv.c index 87cb43d08..322024c62 100644 --- a/ir/opt/ifconv.c +++ b/ir/opt/ifconv.c @@ -53,7 +53,7 @@ typedef struct walker_env { bool changed; /**< Set if the graph was changed. */ } walker_env; -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * Returns non-zero if a Block can be emptied. diff --git a/ir/opt/ircgopt.c b/ir/opt/ircgopt.c index c95e0a52a..c0cddd8f4 100644 --- a/ir/opt/ircgopt.c +++ b/ir/opt/ircgopt.c @@ -45,7 +45,7 @@ #include "irtools.h" #include "irpass.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * Walker: adds Call operations to a head's link list. diff --git a/ir/opt/jumpthreading.c b/ir/opt/jumpthreading.c index de8353031..b80375559 100644 --- a/ir/opt/jumpthreading.c +++ b/ir/opt/jumpthreading.c @@ -50,7 +50,7 @@ #undef AVOID_PHIB -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * Add the new predecessor x to node node, which is either a Block or a Phi diff --git a/ir/opt/loop.c b/ir/opt/loop.c index 23745b099..082464e41 100644 --- a/ir/opt/loop.c +++ b/ir/opt/loop.c @@ -53,7 +53,7 @@ #include "irloop_t.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * Convenience macro for iterating over every phi node of the given block. diff --git a/ir/opt/opt_blocks.c b/ir/opt/opt_blocks.c index 6df859402..7bb50db9b 100644 --- a/ir/opt/opt_blocks.c +++ b/ir/opt/opt_blocks.c @@ -155,7 +155,7 @@ typedef struct listmap_t { DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** Next partition number. */ -DEBUG_ONLY(static unsigned part_nr = 0); +DEBUG_ONLY(static unsigned part_nr = 0;) #ifdef DEBUG_libfirm /** @@ -293,7 +293,7 @@ static partition_t *create_partition(ir_node *meet_block, environment_t *env) INIT_LIST_HEAD(&part->blocks); part->meet_block = meet_block; part->n_blocks = 0; - DEBUG_ONLY(part->nr = part_nr++); + DEBUG_ONLY(part->nr = part_nr++;) list_add_tail(&part->part_list, &env->partitions); return part; } /* create_partition */ @@ -1203,7 +1203,7 @@ int shape_blocks(ir_graph *irg) /* register a debug mask */ FIRM_DBG_REGISTER(dbg, "firm.opt.blocks"); - DEBUG_ONLY(part_nr = 0); + DEBUG_ONLY(part_nr = 0;) DB((dbg, LEVEL_1, "Shaping blocks for %+F\n", irg)); /* works better, when returns are placed at the end of the blocks */ diff --git a/ir/opt/tailrec.c b/ir/opt/tailrec.c index ef4b76f7c..a01f8f94d 100644 --- a/ir/opt/tailrec.c +++ b/ir/opt/tailrec.c @@ -47,7 +47,7 @@ #include "ircons_t.h" #include "irpass.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /** * the environment for collecting data diff --git a/ir/tr/tr_inheritance.c b/ir/tr/tr_inheritance.c index 9f5f1b4c0..2ba62911f 100644 --- a/ir/tr/tr_inheritance.c +++ b/ir/tr/tr_inheritance.c @@ -35,7 +35,7 @@ #include "irgwalk.h" #include "irflag.h" -DEBUG_ONLY(static firm_dbg_module_t *dbg); +DEBUG_ONLY(static firm_dbg_module_t *dbg;) /* ----------------------------------------------------------------------- */ /* Resolve implicit inheritance. */ -- 2.20.1