fixed a bunch of warnings (and some bugs)
authorMatthias Braun <matze@braunis.de>
Sun, 17 Jun 2007 14:13:20 +0000 (14:13 +0000)
committerMatthias Braun <matze@braunis.de>
Sun, 17 Jun 2007 14:13:20 +0000 (14:13 +0000)
[r14557]

34 files changed:
ir/be/beabi.c
ir/be/beblocksched.c
ir/be/bechordal_draw.c
ir/be/bechordal_main.c
ir/be/becopyheur2.c
ir/be/becopyheur3.c
ir/be/becopyheur4.c
ir/be/becopyilp2.c
ir/be/becopyopt.c
ir/be/beifg.c
ir/be/beifg_clique.c
ir/be/beifg_list.c
ir/be/beifg_pointer.c
ir/be/beifg_std.c
ir/be/beilpsched.c
ir/be/belive.c
ir/be/bemain.c
ir/be/benode.c
ir/be/beprofile.c
ir/be/beschedmris.c
ir/be/beschedrand.c
ir/be/beschedregpress.c
ir/be/beschedrss.c
ir/be/beschedtrace.c
ir/be/bespill.c
ir/be/bespillbelady.c
ir/be/bespillmorgan.c
ir/be/bespilloptions.c
ir/be/bespillslots.c
ir/be/bessadestr.c
ir/be/bestat.c
ir/be/beuses.c
ir/be/beutil.c
ir/be/beverify.c

index e837b09..cdc93db 100644 (file)
@@ -133,6 +133,7 @@ static int be_omit_fp = 1;
 static int cmp_call_arg(const void *a, const void *b, size_t n)
 {
        const be_abi_call_arg_t *p = a, *q = b;
+       (void) n;
        return !(p->is_res == q->is_res && p->pos == q->pos);
 }
 
index a6b6af7..310afc1 100644 (file)
@@ -82,7 +82,7 @@ static lc_opt_enum_int_var_t algo_var = {
 
 static const lc_opt_table_entry_t be_blocksched_options[] = {
        LC_OPT_ENT_ENUM_INT ("algo", "the block scheduling algorithm", &algo_var),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 /*
@@ -362,6 +362,7 @@ static ir_node **create_blocksched_array(blocksched_env_t *env, blocksched_entry
        int                i = 0;
        ir_node            **block_list;
        blocksched_entry_t *entry;
+       (void) env;
 
        block_list = NEW_ARR_D(ir_node *, obst, count);
        DBG((dbg, LEVEL_1, "Blockschedule:\n"));
index d9a6e72..137eb2c 100644 (file)
@@ -75,6 +75,7 @@ static int get_width(const plotter_t *_self) {
 }
 
 static void plotter_default_free(plotter_t *self) {
+       (void) self;
 }
 
 typedef struct {
@@ -348,6 +349,8 @@ static color_t *reg_to_color(const draw_chordal_env_t *env,
 {
        int             phi_arg = 0;
        const ir_edge_t *edge;
+       (void) env;
+       (void) rel_bl;
 
        foreach_out_edge(irn, edge)
                phi_arg |= is_Phi(edge->src);
index 440c16b..564cd5b 100644 (file)
@@ -98,6 +98,8 @@ static be_ra_chordal_opts_t options = {
        BE_CH_DUMP_NONE,
        BE_CH_LOWER_PERM_SWAP,
        BE_CH_VRFY_WARN,
+       "",
+       ""
 };
 
 typedef struct _post_spill_env_t {
@@ -170,7 +172,7 @@ static const lc_opt_table_entry_t be_chordal_options[] = {
        LC_OPT_ENT_ENUM_PTR ("perm",          "perm lowering options", &lower_perm_var),
        LC_OPT_ENT_ENUM_MASK("dump",          "select dump phases", &dump_var),
        LC_OPT_ENT_ENUM_PTR ("vrfy",          "verify options", &be_ch_vrfy_var),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 static void dump(unsigned mask, ir_graph *irg,
index dcedd76..a219e5d 100644 (file)
@@ -84,7 +84,7 @@ static const lc_opt_table_entry_t options[] = {
        LC_OPT_ENT_INT      ("iter", "iterations for subtree nodes",                           &subtree_iter),
        LC_OPT_ENT_DBL      ("cf",   "factor of constraint importance (between 0.0 and 1.0)",  &constr_factor),
        LC_OPT_ENT_INT      ("max",  "maximum recursion depth",                                &max_depth),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 void be_init_copyheur2(void)
index 6d1455d..b9d8784 100644 (file)
@@ -80,7 +80,7 @@ static lc_opt_enum_mask_var_t dump_var = {
 static const lc_opt_table_entry_t options[] = {
        LC_OPT_ENT_ENUM_MASK("dump", "dump ifg cloud",                              &dump_var),
        LC_OPT_ENT_INT      ("dbg",  "debug level for the Java coalescer",          &dbg_level),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 void be_init_copyheur3(void)
index f93bfcc..266c7d9 100644 (file)
@@ -130,7 +130,7 @@ typedef int decide_func_t(const co_mst_irn_t *node, int col);
  * Write a chunk to stderr for debugging.
  */
 static void dbg_aff_chunk(const co_mst_env_t *env, const aff_chunk_t *c) {
-       int idx;
+       bitset_pos_t idx;
        if (c->weight_consistent)
                ir_fprintf(stderr, " $%d ", c->weight);
        ir_fprintf(stderr, "{");
@@ -145,7 +145,9 @@ static void dbg_aff_chunk(const co_mst_env_t *env, const aff_chunk_t *c) {
  * Dump all admissible colors to stderr.
  */
 static void dbg_admissible_colors(const co_mst_env_t *env, const co_mst_irn_t *node) {
-       int idx;
+       bitset_pos_t idx;
+       (void) env;
+
        if (bitset_popcnt(node->adm_colors) < 1)
                fprintf(stderr, "no admissible colors?!?");
        else {
@@ -191,6 +193,8 @@ static int decider_hasnot_color(const co_mst_irn_t *node, int col) {
  * Always returns true.
  */
 static int decider_always_yes(const co_mst_irn_t *node, int col) {
+       (void) node;
+       (void) col;
        return 1;
 }
 
@@ -324,6 +328,7 @@ static void *co_mst_irn_init(ir_phase *ph, ir_node *irn, void *old) {
  * Check if affinity chunk @p chunk interferes with node @p irn.
  */
 static INLINE int aff_chunk_interferes(co_mst_env_t *env, const aff_chunk_t *chunk, ir_node *irn) {
+       (void) env;
        return bitset_is_set(chunk->interfere, get_irn_idx(irn));
 }
 
index 8054f48..ab5201d 100644 (file)
@@ -81,7 +81,8 @@ static void build_coloring_cstr(ilp_env_t *ienv) {
 
        be_ifg_foreach_node(ifg, iter, irn)
                if (!sr_is_removed(ienv->sr, irn)) {
-                       int col, cst_idx;
+                       bitset_pos_t col;
+                       int cst_idx;
                        const arch_register_req_t *req;
                        int curr_node_color = get_irn_col(ienv->co, irn);
                        int node_nr = (int)get_irn_node_nr(irn);
@@ -104,7 +105,7 @@ static void build_coloring_cstr(ilp_env_t *ienv) {
 
                        bitset_foreach(colors, col) {
                                int var_idx = lpp_add_var(ienv->lp, name_cdd(buf, 'x', node_nr, col), lpp_binary, 0.0);
-                               lpp_set_start_value(ienv->lp, var_idx, (col == curr_node_color) ? 1.0 : 0.0);
+                               lpp_set_start_value(ienv->lp, var_idx, (col == (unsigned) curr_node_color) ? 1.0 : 0.0);
                                lpp_set_factor_fast(ienv->lp, cst_idx, var_idx, 1);
 
                                lenv->last_x_var = var_idx;
@@ -218,6 +219,7 @@ typedef struct _edge_t {
 static int compare_edge_t(const void *k1, const void *k2, size_t size) {
        const edge_t *e1 = k1;
        const edge_t *e2 = k2;
+       (void) size;
 
        return ! (e1->n1 == e2->n1   &&   e1->n2 == e2->n2);
 }
index 2f49c36..f3ef071 100644 (file)
@@ -149,7 +149,7 @@ static const lc_opt_table_entry_t options[] = {
        LC_OPT_ENT_ENUM_MASK     ("style",   "dump style for ifg dumping",                              &style_var),
        LC_OPT_ENT_BOOL          ("stats",   "dump statistics after each optimization",                 &do_stats),
        LC_OPT_ENT_BOOL          ("improve", "run heur3 before if algo can exploit start solutions",    &improve),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 /* Insert additional options registration functions here. */
@@ -245,6 +245,8 @@ int co_get_costs_loop_depth(const copy_opt_t *co, ir_node *root, ir_node* arg, i
        int cost = 0;
        ir_loop *loop;
        ir_node *root_block = get_nodes_block(root);
+       (void) co;
+       (void) arg;
 
        if (is_Phi(root)) {
                /* for phis the copies are placed in the corresponding pred-block */
@@ -264,6 +266,7 @@ int co_get_costs_exec_freq(const copy_opt_t *co, ir_node *root, ir_node* arg, in
        int res;
        ir_node *root_bl = get_nodes_block(root);
        ir_node *copy_bl = is_Phi(root) ? get_Block_cfgpred_block(root_bl, pos) : root_bl;
+       (void) arg;
        res = get_block_execfreq_ulong(co->cenv->birg->exec_freq, copy_bl);
 
        /* don't allow values smaller than one. */
@@ -272,6 +275,10 @@ int co_get_costs_exec_freq(const copy_opt_t *co, ir_node *root, ir_node* arg, in
 
 
 int co_get_costs_all_one(const copy_opt_t *co, ir_node *root, ir_node *arg, int pos) {
+       (void) co;
+       (void) root;
+       (void) arg;
+       (void) pos;
        return 1;
 }
 
@@ -295,7 +302,8 @@ static int ou_max_ind_set_costs(unit_t *ou) {
        ir_node **safe, **unsafe;
        int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
        bitset_t *curr;
-       int max, pos, curr_weight, best_weight = 0;
+       bitset_pos_t pos;
+       int max, curr_weight, best_weight = 0;
 
        /* assign the nodes into two groups.
         * safe: node has no interference, hence it is in every max stable set.
@@ -702,6 +710,7 @@ void co_complete_stats(const copy_opt_t *co, co_complete_stats_t *stat)
 static int compare_affinity_node_t(const void *k1, const void *k2, size_t size) {
        const affinity_node_t *n1 = k1;
        const affinity_node_t *n2 = k2;
+       (void) size;
 
        return (n1->irn != n2->irn);
 }
@@ -913,6 +922,7 @@ static int appel_aff_weight(const appel_clique_walker_t *env, ir_node *bl)
        return res == 0 ? 1 : res;
 #else
        ir_loop *loop = get_irn_loop(bl);
+       (void) env;
        if(loop) {
                int d = get_loop_depth(loop);
                return 1 + d * d;
@@ -924,6 +934,7 @@ static int appel_aff_weight(const appel_clique_walker_t *env, ir_node *bl)
 static void *appel_clique_walker_irn_init(ir_phase *phase, ir_node *irn, void *old)
 {
        appel_block_info_t *res = NULL;
+       (void) old;
 
        if(is_Block(irn)) {
                appel_clique_walker_t *d = (void *) phase;
@@ -1214,7 +1225,7 @@ void co_dump_appel_graph_cliques(const copy_opt_t *co, FILE *f)
                                                                  |_|            |___/
 */
 
-static const char *get_dot_color_name(int col)
+static const char *get_dot_color_name(size_t col)
 {
        static const char *names[] = {
                "blue",
@@ -1260,6 +1271,7 @@ typedef struct _co_ifg_dump_t {
 
 static void ifg_dump_graph_attr(FILE *f, void *self)
 {
+       (void) self;
        fprintf(f, "overlap=scale");
 }
 
@@ -1355,11 +1367,12 @@ void co_dump_ifg_dot(const copy_opt_t *co, FILE *f, unsigned flags)
 
 void co_solve_park_moon(copy_opt_t *opt)
 {
-
+       (void) opt;
 }
 
 static int void_algo(copy_opt_t *co)
 {
+       (void) co;
        return 0;
 }
 
@@ -1421,7 +1434,7 @@ void co_driver(be_chordal_env_t *cenv)
        co_algo_t           *algo_func;
        int                 was_optimal = 0;
 
-       if (algo < 0 || algo >= CO_ALGO_LAST)
+       if (algo >= CO_ALGO_LAST)
                return;
 
        be_liveness_assure_chk(be_get_birg_liveness(cenv->birg));
index 0f0bb8c..cd1e262 100644 (file)
@@ -81,6 +81,8 @@ size_t (be_ifg_cliques_iter_size)(const be_ifg_t *ifg)
 static void *regs_irn_data_init(ir_phase *ph, ir_node *irn, void *data)
 {
        coloring_t *coloring = (coloring_t *) ph;
+       (void) data;
+
        return (void *) arch_get_irn_register(coloring->arch_env, irn);
 }
 
@@ -720,7 +722,7 @@ static lc_opt_enum_int_var_t ifg_flavor_var = {
 
 static const lc_opt_table_entry_t be_ifg_options[] = {
        LC_OPT_ENT_ENUM_PTR ("ifg", "interference graph flavour", &ifg_flavor_var),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 void be_init_ifg(void)
index 5a3eaf7..1eb410b 100644 (file)
@@ -472,12 +472,14 @@ static ir_node *ifg_clique_neighbours_begin(const void *self, void *iter, const
 
 static ir_node *ifg_clique_neighbours_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_neighbour(iter);
 }
 
 static void ifg_clique_neighbours_break(const void *self, void *iter)
 {
        cli_iter_t *it = iter;
+       (void) self;
 
        bitset_free(it->visited_neighbours);
 
@@ -492,12 +494,14 @@ static ir_node *ifg_clique_nodes_begin(const void *self, void *iter)
 
 static ir_node *ifg_clique_nodes_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_node(iter);
 }
 
 static void ifg_clique_nodes_break(const void *self, void *iter)
 {
        cli_iter_t *it = iter;
+       (void) self;
 
        bitset_free(it->visited_nodes);
 
index 7624d65..5282d58 100644 (file)
@@ -362,12 +362,14 @@ static ir_node *ifg_list_nodes_begin(const void *self, void *iter)
 
 static ir_node *ifg_list_nodes_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_node(iter);
 }
 
 static void ifg_list_nodes_break(const void *self, void *iter)
 {
        nodes_iter_t *it = iter;
+       (void) self;
        it->curr_node_idx = 0;
        it->ifg = NULL;
 }
@@ -380,12 +382,14 @@ static ir_node *ifg_list_neighbours_begin(const void *self, void *iter,const ir_
 
 static ir_node *ifg_list_neighbours_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_neighbour(iter);
 }
 
 static void ifg_list_neighbours_break(const void *self, void *iter)
 {
        adj_iter_t *it= iter;
+       (void) self;
        it->curr_adj_element = NULL;
        it->ifg = NULL;
 }
index 5f0b8a9..f9c198e 100644 (file)
@@ -88,6 +88,8 @@ typedef struct _ptr_iter_t {
 static void *ptr_irn_data_init(ir_phase *ph, ir_node *irn, void *data)
 {
        ptr_head_t *head = phase_alloc(ph, sizeof(*head));
+       (void) irn;
+       (void) data;
        INIT_LIST_HEAD(&head->list);
        return head;
 }
@@ -109,7 +111,7 @@ static ptr_head_t *ptr_get_new_head(ifg_pointer_t *ifg)
 static void write_pointers(bitset_t *live, ifg_pointer_t *ifg)
 {
        ir_node      *live_irn;
-       bitset_pos_t elm;
+       bitset_pos_t  elm;
 
        bitset_foreach_irn(ifg->env->irg, live, elm, live_irn)
        {
index 6c5e535..d8c422f 100644 (file)
@@ -130,11 +130,13 @@ static ir_node *ifg_std_nodes_begin(const void *self, void *iter)
 
 static ir_node *ifg_std_nodes_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_node(iter);
 }
 
 static void ifg_std_nodes_break(const void *self, void *iter)
 {
+       (void) self;
        node_break(iter, 1);
 }
 
@@ -192,6 +194,7 @@ static void find_neighbours(const ifg_std_t *ifg, adj_iter_t *it, const ir_node
 
 static INLINE void neighbours_break(adj_iter_t *it, int force)
 {
+       (void) force;
        assert(it->valid == 1);
        ir_nodeset_destroy(&it->neighbours);
        it->valid = 0;
@@ -215,11 +218,13 @@ static ir_node *ifg_std_neighbours_begin(const void *self, void *iter, const ir_
 
 static ir_node *ifg_std_neighbours_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_neighbour(iter);
 }
 
 static void ifg_std_neighbours_break(const void *self, void *iter)
 {
+       (void) self;
        neighbours_break(iter, 1);
 }
 
@@ -325,11 +330,13 @@ static int ifg_std_cliques_begin(const void *self, void *iter, ir_node **buf)
 
 static int ifg_std_cliques_next(const void *self, void *iter)
 {
+       (void) self;
        return get_next_clique(iter);
 }
 
 static void ifg_std_cliques_break(const void *self, void *iter)
 {
+       (void) self;
        free_clique_iter(iter);
 }
 
index f1b372b..f29ac6a 100644 (file)
@@ -209,7 +209,7 @@ static const lc_opt_table_entry_t ilpsched_option_table[] = {
        LC_OPT_ENT_BOOL("regpress",  "Use register pressure constraints", &ilp_opts.regpress),
        LC_OPT_ENT_INT("time_limit", "ILP time limit per block", &ilp_opts.time_limit),
        LC_OPT_ENT_STR("lpp_log",    "LPP logfile (stderr and stdout are supported)", ilp_opts.log_file, sizeof(ilp_opts.log_file)),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 /*
@@ -376,7 +376,7 @@ static void collect_alap_root_nodes(ir_node *irn, void *walk_env) {
        unsigned              n_consumer     = 0;
        ir_edge_kind_t        ekind[2]       = { EDGE_KIND_NORMAL, EDGE_KIND_DEP };
        ir_node               **consumer;
-       int                   idx;
+       unsigned              idx;
 
        if (! consider_for_sched(env->arch_env->isa, irn))
                return;
index 136b229..3e6a413 100644 (file)
@@ -474,6 +474,8 @@ static void lv_dump_block(void *context, FILE *f, const ir_node *bl)
 static void *lv_phase_data_init(ir_phase *phase, ir_node *irn, void *old)
 {
        struct _be_lv_info_t *info = phase_alloc(phase, LV_STD_SIZE * sizeof(info[0]));
+       (void) irn;
+
        memset(info, 0, LV_STD_SIZE * sizeof(info[0]));
        info[0].u.head.n_size = LV_STD_SIZE - 1;
        return info;
index 0b4f639..36d9dcd 100644 (file)
@@ -160,7 +160,7 @@ static const lc_opt_table_entry_t be_main_options[] = {
        LC_OPT_ENT_STR ("ilp.server", "the ilp server name", be_options.ilp_server, sizeof(be_options.ilp_server)),
        LC_OPT_ENT_STR ("ilp.solver", "the ilp solver name", be_options.ilp_solver, sizeof(be_options.ilp_solver)),
 #endif /* WITH_ILP */
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 static be_module_list_entry_t *isa_ifs = NULL;
@@ -203,7 +203,7 @@ int be_parse_arg(const char *arg) {
 }
 
 /** The be parameters returned by default, all off. */
-const static backend_params be_params = {
+static const backend_params be_params = {
        0,    /* need dword lowering */
        0,    /* don't support inlien assembler yet */
        0,    /* no different calling conventions */
index e191dcd..ae98f6c 100644 (file)
@@ -359,7 +359,7 @@ int is_be_node(const ir_node *irn)
 
 be_opcode_t be_get_irn_opcode(const ir_node *irn)
 {
-       return is_be_node(irn) ? get_irn_opcode(irn) - beo_base : beo_NoBeOp;
+       return is_be_node(irn) ? (be_opcode_t) get_irn_opcode(irn) - beo_base : beo_NoBeOp;
 }
 
 /**
@@ -407,9 +407,10 @@ static be_reg_data_t *retrieve_reg_data(const ir_node *node)
 }
 
 static void
-be_node_set_irn_reg(const void *_self, ir_node *irn, const arch_register_t *reg)
+be_node_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg)
 {
        be_reg_data_t *r = retrieve_reg_data(irn);
+       (void) self;
        r->reg = reg;
 }
 
@@ -1213,6 +1214,7 @@ be_node_get_irn_reg_req(const void *self, const ir_node *irn, int pos)
 {
        int out_pos = pos;
 
+       (void) self;
        if (pos < 0) {
                if (get_irn_mode(irn) == mode_T)
                        return arch_no_register_req;
@@ -1236,20 +1238,22 @@ be_node_get_irn_reg_req(const void *self, const ir_node *irn, int pos)
 }
 
 const arch_register_t *
-be_node_get_irn_reg(const void *_self, const ir_node *irn)
+be_node_get_irn_reg(const void *self, const ir_node *irn)
 {
        be_reg_data_t *r;
 
+       (void) self;
        if (get_irn_mode(irn) == mode_T)
                return NULL;
        r = retrieve_reg_data(irn);
        return r->reg;
 }
 
-static arch_irn_class_t be_node_classify(const void *_self, const ir_node *irn)
+static arch_irn_class_t be_node_classify(const void *self, const ir_node *irn)
 {
        redir_proj((const ir_node **) &irn);
 
+       (void) self;
        switch(be_get_irn_opcode(irn)) {
 #define XXX(a,b) case beo_ ## a: return arch_irn_class_ ## b
                XXX(Spill, spill);
@@ -1266,10 +1270,11 @@ static arch_irn_class_t be_node_classify(const void *_self, const ir_node *irn)
        return 0;
 }
 
-static arch_irn_flags_t be_node_get_flags(const void *_self, const ir_node *node)
+static arch_irn_flags_t be_node_get_flags(const void *self, const ir_node *node)
 {
        be_req_t *bereq;
        int pos = -1;
+       (void) self;
 
        if(is_Proj(node)) {
                pos = OUT_POS(get_Proj_proj(node));
@@ -1283,12 +1288,14 @@ static arch_irn_flags_t be_node_get_flags(const void *_self, const ir_node *node
 
 static ir_entity *be_node_get_frame_entity(const void *self, const ir_node *irn)
 {
+       (void) self;
        return be_get_frame_entity(irn);
 }
 
 static void be_node_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
 {
        be_frame_attr_t *a;
+       (void) self;
 
        assert(be_has_frame_entity(irn));
 
@@ -1298,6 +1305,7 @@ static void be_node_set_frame_entity(const void *self, ir_node *irn, ir_entity *
 
 static void be_node_set_frame_offset(const void *self, ir_node *irn, int offset)
 {
+       (void) self;
        if(be_has_frame_entity(irn)) {
                be_frame_attr_t *a = get_irn_attr(irn);
                a->offset = offset;
@@ -1306,6 +1314,7 @@ static void be_node_set_frame_offset(const void *self, ir_node *irn, int offset)
 
 static int be_node_get_sp_bias(const void *self, const ir_node *irn)
 {
+       (void) self;
        return be_is_IncSP(irn) ? be_get_IncSP_offset(irn) : 0;
 }
 
@@ -1341,6 +1350,7 @@ static const arch_irn_ops_t be_node_irn_ops = {
 const void *be_node_get_irn_ops(const arch_irn_handler_t *self, const ir_node *irn)
 {
        redir_proj((const ir_node **) &irn);
+       (void) self;
        return is_be_node(irn) ? &be_node_irn_ops : NULL;
 }
 
@@ -1449,6 +1459,8 @@ const arch_register_req_t *phi_get_irn_reg_req(const void *self,
 {
        phi_handler_t *phi_handler = get_phi_handler_from_ops(self);
        phi_attr_t *attr;
+       (void) self;
+       (void) pos;
 
        if(!mode_is_datab(get_irn_mode(irn)))
                return arch_no_register_req;
@@ -1516,6 +1528,8 @@ const arch_register_t *phi_get_irn_reg(const void *self, const ir_node *irn)
 static
 arch_irn_class_t phi_classify(const void *self, const ir_node *irn)
 {
+       (void) self;
+       (void) irn;
        return arch_irn_class_normal;
 }
 
@@ -1524,30 +1538,41 @@ arch_irn_flags_t phi_get_flags(const void *self, const ir_node *irn)
 {
        phi_handler_t *h = get_phi_handler_from_ops(self);
        phi_attr_t *attr = get_Phi_attr(h, irn);
+       (void) self;
        return attr->flags;
 }
 
 static
-ir_entity *phi_get_frame_entity(const void *_self, const ir_node *irn)
+ir_entity *phi_get_frame_entity(const void *self, const ir_node *irn)
 {
+       (void) self;
+       (void) irn;
        return NULL;
 }
 
 static
-void phi_set_frame_entity(const void *_self, ir_node *irn, ir_entity *ent)
+void phi_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
 {
+       (void) self;
+       (void) irn;
+       (void) ent;
        assert(0);
 }
 
 static
-void phi_set_frame_offset(const void *_self, ir_node *irn, int bias)
+void phi_set_frame_offset(const void *self, ir_node *irn, int bias)
 {
+       (void) self;
+       (void) irn;
+       (void) bias;
        assert(0);
 }
 
 static
 int phi_get_sp_bias(const void* self, const ir_node *irn)
 {
+       (void) self;
+       (void) irn;
        return 0;
 }
 
index 82da025..7931429 100644 (file)
@@ -88,6 +88,7 @@ typedef struct _execcount_t {
 static int
 cmp_execcount(const void * a, const void * b, size_t size)
 {
+       (void) size;
        return ((execcount_t*)a)->block != ((execcount_t*)b)->block;
 }
 
@@ -95,6 +96,7 @@ static void
 block_counter(ir_node * bb, void * data)
 {
        unsigned int  *count = data;
+       (void) bb;
        *count = *count + 1;
 }
 
@@ -522,6 +524,7 @@ be_profile_instrument(const char *filename, unsigned flags)
 static void
 profile_node_info(void *ctx, FILE *f, const ir_node *irn)
 {
+       (void) ctx;
        if(is_Block(irn)) {
                fprintf(f, "profiled execution count: %u\n", be_profile_get_block_execcount(irn));
        }
index 795caac..371616a 100644 (file)
@@ -83,6 +83,7 @@ typedef struct _mris_irn_t {
 static void *mris_irn_data_init(ir_phase *ph, ir_node *irn, void *data)
 {
        mris_irn_t *mi = data ? data : phase_alloc(ph, sizeof(mi[0]));
+       (void) irn;
        memset(mi, 0, sizeof(mi[0]));
        INIT_LIST_HEAD(&mi->lineage_list);
        return mi;
index b074c4c..bfaf5fb 100644 (file)
@@ -44,6 +44,7 @@ static ir_node *random_select(void *block_env, ir_nodeset_t *ready_set,
        const arch_env_t *arch_env = block_env;
        ir_node          *irn      = NULL;
        int only_branches_left = 1;
+       (void) live_set;
 
        /* assure that branches and constants are executed last */
        ir_nodeset_iterator_init(&iter, ready_set);
index b939c87..f72b445 100644 (file)
@@ -283,6 +283,7 @@ static ir_node *reg_pressure_select(void *block_env, ir_nodeset_t *ready_set,
        reg_pressure_selector_env_t *env = block_env;
        ir_node *irn, *res     = NULL;
        int curr_cost          = INT_MAX;
+       (void) live_set;
 
        assert(ir_nodeset_size(ready_set) > 0);
 
index d541104..a6fce45 100644 (file)
@@ -218,7 +218,7 @@ static lc_opt_enum_int_var_t dump_var = {
 
 static const lc_opt_table_entry_t rss_option_table[] = {
        LC_OPT_ENT_ENUM_MASK("dump", "dump phases", &dump_var),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 /******************************************************************************
@@ -773,6 +773,7 @@ static int is_potential_killer(rss_t *rss, rss_irn_t *v, rss_irn_t *u) {
        plist_t *list;
        ir_node **arr;
        plist_element_t *el;
+       (void) rss;
 
        assert(is_Sink(v->irn) || ((plist_count(v->descendant_list) > 0 && v->descendants) || 1));
        assert(is_Sink(u->irn) || ((plist_count(u->consumer_list)   > 0 && u->consumer)    || 1));
index a90b508..bae27c7 100644 (file)
@@ -538,6 +538,7 @@ static ir_node *muchnik_select(void *block_env, ir_nodeset_t *ready_set, ir_node
        ir_nodeset_iterator_t iter;
        sched_timestep_t max_delay = 0;
        ir_node *irn;
+       (void) live_set;
 
        /* calculate the max delay of all candidates */
        foreach_ir_nodeset(ready_set, irn, iter) {
index 57cfbd3..93cfb2f 100644 (file)
@@ -116,6 +116,8 @@ int cmp_spillinfo(const void *x, const void *y, size_t size)
 {
        const spill_info_t *xx = x;
        const spill_info_t *yy = y;
+       (void) size;
+
        return xx->to_spill != yy->to_spill;
 }
 
@@ -704,6 +706,7 @@ double be_get_spill_costs(spill_env_t *env, ir_node *to_spill, ir_node *after)
 {
        ir_node *block = get_nodes_block(after);
        double   freq  = get_block_execfreq(env->exec_freq, block);
+       (void) to_spill;
 
        return env->spill_cost * freq;
 }
index 151344e..a1e8200 100644 (file)
@@ -372,6 +372,7 @@ static loc_t to_take_or_not_to_take(belady_env_t *env, ir_node* first,
        loc_t loc;
        loc.time = USES_INFINITY;
        loc.irn = node;
+       (void) block;
 
        if (!arch_irn_consider_in_reg_alloc(env->arch, env->cls, node)) {
                loc.time = USES_INFINITY;
index 0f10523..3c8ce5f 100644 (file)
@@ -91,23 +91,26 @@ typedef struct morgan_block_attr {
 
 //---------------------------------------------------------------------------
 
-static int loop_edge_cmp(const void* p1, const void* p2, size_t s) {
+static int loop_edge_cmp(const void* p1, const void* p2, size_t size) {
        loop_edge_t *e1 = (loop_edge_t*) p1;
        loop_edge_t *e2 = (loop_edge_t*) p2;
+       (void) size;
 
        return e1->block != e2->block || e1->pos != e2->pos;
 }
 
-static int loop_attr_cmp(const void *e1, const void *e2, size_t s) {
+static int loop_attr_cmp(const void *e1, const void *e2, size_t size) {
        loop_attr_t *la1 = (loop_attr_t*) e1;
        loop_attr_t *la2 = (loop_attr_t*) e2;
+       (void) size;
 
        return la1->loop != la2->loop;
 }
 
-static int block_attr_cmp(const void *e1, const void *e2, size_t s) {
+static int block_attr_cmp(const void *e1, const void *e2, size_t size) {
        block_attr_t *b1 = (block_attr_t*) e1;
        block_attr_t *b2 = (block_attr_t*) e2;
+       (void) size;
 
        return b1->block != b2->block;
 }
@@ -420,6 +423,7 @@ static void spill_values(morgan_env_t *env, const loop_attr_t *loop_attr, int sp
        const bitset_t *cand_bitset = loop_attr->livethrough_unused;
        int candidatecount = bitset_popcnt(cand_bitset);
        spillcandidate_t *candidates;
+       bitset_pos_t idx;
        int i, c;
        loop_edge_t *edge;
 
@@ -430,8 +434,8 @@ static void spill_values(morgan_env_t *env, const loop_attr_t *loop_attr, int sp
        DBG((dbg, DBG_CHOOSE, "Candidates for loop %d\n", get_loop_loop_nr(loop_attr->loop)));
        // build candidiatelist
        c = 0;
-       bitset_foreach(cand_bitset, i) {
-               ir_node *node = get_idx_irn(env->irg, i);
+       bitset_foreach(cand_bitset, idx) {
+               ir_node *node = get_idx_irn(env->irg, idx);
                candidates[c].node = node;
                candidates[c].cost = 0;
 
index 1f7d561..ed5eac9 100644 (file)
@@ -44,7 +44,7 @@ int be_do_remats = 1;
 static const lc_opt_table_entry_t be_spill_options[] = {
        LC_OPT_ENT_BOOL ("coalesce_slots", "coalesce the spill slots", &be_coalesce_spill_slots),
        LC_OPT_ENT_BOOL ("remat", "try to rematerialize values instead of reloading", &be_do_remats),
-       { NULL }
+       LC_OPT_ENT_NULL
 };
 
 static be_module_list_entry_t *spillers = NULL;
index 4946166..6086523 100644 (file)
@@ -98,6 +98,8 @@ static int cmp_spill(const void* d1, const void* d2, size_t size)
 {
        const spill_t* s1 = d1;
        const spill_t* s2 = d2;
+       (void) size;
+
        return s1->spill != s2->spill;
 }
 
@@ -417,6 +419,8 @@ static int cmp_memperm(const void* d1, const void* d2, size_t size)
 {
        const memperm_t* e1 = d1;
        const memperm_t* e2 = d2;
+       (void) size;
+
        return e1->block != e2->block;
 }
 
index c0f66b6..23f4d38 100644 (file)
@@ -62,6 +62,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 #define is_curr_reg_class(irn)  (get_reg_cls(p) == chordal_env->cls)
 
 static void clear_link(ir_node *irn, void *data) {
+       (void) data;
        set_irn_link(irn, NULL);
 }
 
@@ -96,6 +97,8 @@ typedef struct {
 static int cmp_perm_proj(const void *a, const void *b, size_t n) {
        const perm_proj_t *p = a;
        const perm_proj_t *q = b;
+       (void) n;
+
        return !(p->arg == q->arg);
 }
 
index 847c3b7..3bb3a88 100644 (file)
@@ -79,6 +79,7 @@ static int cmp_stat_phase(const void *a, const void *b) {
 static int cmp_stat_data(const void *a, const void *b, size_t len) {
        const be_stat_irg_t *p1 = a;
        const be_stat_irg_t *p2 = b;
+       (void) len;
 
        return p1->irg != p2->irg;
 }
index defe308..82cc71a 100644 (file)
@@ -75,6 +75,8 @@ static int cmp_use(const void *a, const void *b, size_t n)
 {
        const be_use_t *p = a;
        const be_use_t *q = b;
+       (void) n;
+
        return !(p->block == q->block && p->node == q->node);
 }
 
@@ -118,7 +120,7 @@ static const be_use_t *get_or_set_use_block(be_uses_t *env,
        return result;
 }
 
-static int be_is_phi_argument(const be_lv_t *lv, const ir_node *block, const ir_node *def)
+static int be_is_phi_argument(const ir_node *block, const ir_node *def)
 {
        ir_node *node;
        ir_node *succ_block = NULL;
@@ -255,7 +257,7 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from,
        }
 #endif
 
-       if(be_is_phi_argument(env->lv, block, def)) {
+       if(be_is_phi_argument(block, def)) {
                // TODO we really should continue searching the uses of the phi,
                // as a phi isn't a real use that implies a reload (because we could
                // easily spill the whole phi)
@@ -354,6 +356,7 @@ void set_sched_step_walker(ir_node *block, void *data)
 {
        ir_node  *node;
        unsigned step = 0;
+       (void) data;
 
        sched_foreach(block, node) {
                set_irn_link(node, INT_TO_PTR(step));
index d0498dd..e6d64dc 100644 (file)
@@ -182,11 +182,12 @@ void be_dump(ir_graph *irg, const char *suffix, void (*dumper)(ir_graph *, const
 
 static void collect_phis(ir_node *irn, void *data)
 {
-  if(is_Phi(irn)) {
-    ir_node *bl = get_nodes_block(irn);
-    set_irn_link(irn, get_irn_link(bl));
-    set_irn_link(bl, irn);
-  }
+       (void) data;
+       if(is_Phi(irn)) {
+               ir_node *bl = get_nodes_block(irn);
+               set_irn_link(irn, get_irn_link(bl));
+               set_irn_link(bl, irn);
+       }
 }
 
 void be_clear_links(ir_graph *irg)
index 799793e..74df99f 100644 (file)
@@ -399,6 +399,8 @@ typedef struct {
 static int cmp_spill(const void* d1, const void* d2, size_t size) {
        const spill_t* s1 = d1;
        const spill_t* s2 = d2;
+       (void) size;
+
        return s1->spill != s2->spill;
 }