Fixed inconsistent uses of DEBUG_ONLY.
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Thu, 15 Sep 2011 11:45:56 +0000 (13:45 +0200)
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Thu, 15 Sep 2011 11:46:27 +0000 (13:46 +0200)
21 files changed:
ir/adt/hungarian.c
ir/ana/interval_analysis.c
ir/ana/vrp.c
ir/be/bechordal_common.c
ir/be/becopyheur2.c
ir/be/belistsched.c
ir/be/beloopana.c
ir/be/betranshlp.c
ir/be/ia32/ia32_transform.c
ir/be/ia32/ia32_x87.c
ir/opt/boolopt.c
ir/opt/combo.c
ir/opt/convopt.c
ir/opt/garbage_collect.c
ir/opt/ifconv.c
ir/opt/ircgopt.c
ir/opt/jumpthreading.c
ir/opt/loop.c
ir/opt/opt_blocks.c
ir/opt/tailrec.c
ir/tr/tr_inheritance.c

index 926f768..3b34318 100644 (file)
@@ -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 */
index 79e3440..2686133 100644 (file)
@@ -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. */
index d1d0a67..21c871f 100644 (file)
@@ -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;
index 195aa50..74f48c7 100644 (file)
@@ -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;
index 217819e..6bb00d0 100644 (file)
@@ -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));
        }
 
index 692fee1..3d58208 100644 (file)
@@ -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.
index b79c537..8c9b613 100644 (file)
@@ -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))
 
index ee4b803..678f361 100644 (file)
@@ -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) {
index 4bd96e5..a06ccd3 100644 (file)
@@ -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);
                }
index 3977b94..be1438a 100644 (file)
@@ -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);
index a666c2d..74dfc32 100644 (file)
@@ -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
index 0ae4337..a08de84 100644 (file)
@@ -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);
index 6ead5fd..9fb7e55 100644 (file)
@@ -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; }
 
index 9ea12b8..c1607e8 100644 (file)
@@ -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);
 
index 87cb43d..322024c 100644 (file)
@@ -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.
index c95e0a5..c0cddd8 100644 (file)
@@ -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.
index de83530..b803755 100644 (file)
@@ -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
index 23745b0..082464e 100644 (file)
@@ -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.
index 6df8594..7bb50db 100644 (file)
@@ -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 */
index ef4b76f..a01f8f9 100644 (file)
@@ -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
index 9f5f1b4..2ba6291 100644 (file)
@@ -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.                                           */