cleanup: Remove end-of-if/for/function comments.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 2 Dec 2012 11:28:15 +0000 (12:28 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 2 Dec 2012 11:28:15 +0000 (12:28 +0100)
15 files changed:
ir/opt/combo.c
ir/opt/gvn_pre.c
ir/opt/jumpthreading.c
ir/opt/ldstopt.c
ir/opt/opt_blocks.c
ir/opt/opt_confirms.c
ir/opt/opt_ldst.c
ir/opt/opt_osr.c
ir/opt/reassoc.c
ir/stat/dags.c
ir/stat/firmstat.c
ir/stat/pattern.c
ir/stat/pattern_dmp.c
ir/stat/stat_dmp.c
win32/firmEvaluator/firm.c

index 4975e3d..d92197a 100644 (file)
@@ -260,7 +260,7 @@ static int cmp_irn_opcode(const ir_node *a, const ir_node *b)
                return a->op->ops.node_cmp_attr(a, b);
 
        return 0;
-}  /* cmp_irn_opcode */
+}
 
 #ifdef CHECK_PARTITIONS
 /**
@@ -283,7 +283,7 @@ static void check_partition(const partition_t *T)
                assert(node->flagged == 0);
                assert(node->part == T);
        }
-}  /* check_partition */
+}
 
 /**
  * check that all leader nodes in the partition have the same opcode.
@@ -301,7 +301,7 @@ static void check_opcode(const partition_t *Z)
                        assert(cmp_irn_opcode(repr, irn) == 0);
                }
        }
-}  /* check_opcode */
+}
 
 static void check_all_partitions(environment_t *env)
 {
@@ -341,7 +341,7 @@ static void do_check_list(const node_t *list, int ofs, const partition_t *Z)
        (void) ofs;
        (void) Z;
 #endif
-}  /* ido_check_list */
+}
 
 /**
  * Check a local list.
@@ -349,7 +349,7 @@ static void do_check_list(const node_t *list, int ofs, const partition_t *Z)
 static void check_list(const node_t *list, const partition_t *Z)
 {
        do_check_list(list, offsetof(node_t, next), Z);
-}  /* check_list */
+}
 
 #else
 #define check_partition(T)
@@ -384,7 +384,7 @@ static void dump_partition(const char *msg, const partition_t *part)
                }
        }
        DB((dbg, LEVEL_2, "\n}\n"));
-}  /* dump_partition */
+}
 
 /**
  * Dumps a list.
@@ -404,7 +404,7 @@ static void do_dump_list(const char *msg, const node_t *node, int ofs)
        DB((dbg, LEVEL_3, "\n}\n"));
 
 #undef GET_LINK
-}  /* do_dump_list */
+}
 
 /**
  * Dumps a race list.
@@ -412,7 +412,7 @@ static void do_dump_list(const char *msg, const node_t *node, int ofs)
 static void dump_race_list(const char *msg, const node_t *list)
 {
        do_dump_list(msg, list, offsetof(node_t, race_next));
-}  /* dump_race_list */
+}
 
 /**
  * Dumps a local list.
@@ -420,7 +420,7 @@ static void dump_race_list(const char *msg, const node_t *list)
 static void dump_list(const char *msg, const node_t *list)
 {
        do_dump_list(msg, list, offsetof(node_t, next));
-}  /* dump_list */
+}
 
 /**
  * Dump all partitions.
@@ -432,7 +432,7 @@ static void dump_all_partitions(const environment_t *env)
        DB((dbg, LEVEL_2, "All partitions\n===============\n"));
        for (P = env->dbg_list; P != NULL; P = P->dbg_next)
                dump_partition("", P);
-}  /* dump_all_partitions */
+}
 
 /**
  * Sump a split list.
@@ -448,7 +448,7 @@ static void dump_split_list(const partition_t *list)
                split = ',';
        }
        DB((dbg, LEVEL_2, "\n}\n"));
-}  /* dump_split_list */
+}
 
 /**
  * Dump partition and type for a node.
@@ -460,7 +460,7 @@ static int dump_partition_hook(FILE *F, const ir_node *n, const ir_node *local)
 
        ir_fprintf(F, "info2 : \"partition %u type %+F\"\n", node->part->nr, node->type);
        return 1;
-}  /* dump_partition_hook */
+}
 
 #else
 #define dump_partition(msg, part)
@@ -489,7 +489,7 @@ static void verify_type(const lattice_elem_t old_type, node_t *node)
                return;
        }
        panic("wrong translation from %+F to %+F on node %+F", old_type, node->type, node->node);
-}  /* verify_type */
+}
 
 #else
 #define verify_type(old_type, node)
@@ -505,7 +505,7 @@ static int listmap_cmp_ptr(const void *elt, const void *key, size_t size)
 
        (void) size;
        return e1->id != e2->id;
-}  /* listmap_cmp_ptr */
+}
 
 /**
  * Initializes a listmap.
@@ -516,7 +516,7 @@ static void listmap_init(listmap_t *map)
 {
        map->map    = new_set(listmap_cmp_ptr, 16);
        map->values = NULL;
-}  /* listmap_init */
+}
 
 /**
  * Terminates a listmap.
@@ -526,7 +526,7 @@ static void listmap_init(listmap_t *map)
 static void listmap_term(listmap_t *map)
 {
        del_set(map->map);
-}  /* listmap_term */
+}
 
 /**
  * Return the associated listmap entry for a given id.
@@ -551,7 +551,7 @@ static listmap_entry_t *listmap_find(listmap_t *map, void *id)
                map->values = entry;
        }
        return entry;
-}  /* listmap_find */
+}
 
 /**
  * Calculate the hash value for an opcode map entry.
@@ -574,7 +574,7 @@ static unsigned opcode_hash(const opcode_key_t *entry)
        else if (code == iro_Proj)
                hash += (unsigned)get_Proj_proj(n);
        return hash;
-}  /* opcode_hash */
+}
 
 /**
  * Compare two entries in the opcode map.
@@ -587,7 +587,7 @@ static int cmp_opcode(const void *elt, const void *key, size_t size)
        (void) size;
 
        return cmp_irn_opcode(o1->irn, o2->irn);
-}  /* cmp_opcode */
+}
 
 /**
  * Compare two Def-Use edges for input position.
@@ -599,7 +599,7 @@ static int cmp_def_use_edge(const void *a, const void *b)
 
        /* no overrun, because range is [-1, MAXINT] */
        return ea->pos - eb->pos;
-}  /* cmp_def_use_edge */
+}
 
 /**
  * We need the Def-Use edges sorted.
@@ -611,7 +611,7 @@ static void sort_irn_outs(node_t *node)
        qsort(irn->o.out->edges, n_outs, sizeof(irn->o.out->edges[0]),
                  cmp_def_use_edge);
        node->max_user_input = n_outs > 0 ? irn->o.out->edges[n_outs-1].pos : -1;
-}  /* sort_irn_outs */
+}
 
 /**
  * Return the type of a node.
@@ -623,7 +623,7 @@ static void sort_irn_outs(node_t *node)
 static inline lattice_elem_t get_node_type(const ir_node *irn)
 {
        return get_irn_node(irn)->type;
-}  /* get_node_type */
+}
 
 /**
  * Return the tarval of a node.
@@ -639,7 +639,7 @@ static inline ir_tarval *get_node_tarval(const ir_node *irn)
        if (is_tarval(type.tv))
                return type.tv;
        return tarval_bottom;
-}  /* get_node_type */
+}
 
 /**
  * Add a partition to the worklist.
@@ -651,7 +651,7 @@ static inline void add_to_worklist(partition_t *X, environment_t *env)
        X->wl_next     = env->worklist;
        X->on_worklist = 1;
        env->worklist  = X;
-}  /* add_to_worklist */
+}
 
 /**
  * Create a new empty partition.
@@ -687,7 +687,7 @@ static inline partition_t *new_partition(environment_t *env)
 #endif
 
        return part;
-}  /* new_partition */
+}
 
 /**
  * Get the first node from a partition.
@@ -695,7 +695,7 @@ static inline partition_t *new_partition(environment_t *env)
 static inline node_t *get_first_node(const partition_t *X)
 {
        return list_entry(X->Leader.next, node_t, node_list);
-}  /* get_first_node */
+}
 
 /**
  * Return the type of a partition (assuming partition is non-empty and
@@ -709,7 +709,7 @@ static inline lattice_elem_t get_partition_type(const partition_t *X)
 {
        const node_t *first = get_first_node(X);
        return first->type;
-}  /* get_partition_type */
+}
 
 /**
  * Creates a partition node for the given IR-node and place it
@@ -747,7 +747,7 @@ static node_t *create_partition_node(ir_node *irn, partition_t *part, environmen
        ++part->n_leader;
 
        return node;
-}  /* create_partition_node */
+}
 
 /**
  * Pre-Walker, initialize all Nodes' type to U or top and place
@@ -767,7 +767,7 @@ static void create_initial_partitions(ir_node *irn, void *ctx)
        if (is_Block(irn)) {
                set_Block_phis(irn, NULL);
        }
-}  /* create_initial_partitions */
+}
 
 /**
  * Post-Walker, collect  all Block-Phi lists, set Cond.
@@ -780,7 +780,7 @@ static void init_block_phis(ir_node *irn, void *ctx)
                ir_node *block = get_nodes_block(irn);
                add_Block_phi(block, irn);
        }
-}  /* init_block_phis */
+}
 
 /**
  * Add a node to the entry.partition.touched set and
@@ -807,7 +807,7 @@ static inline void add_to_touched(node_t *y, environment_t *env)
 
                check_list(part->touched, part);
        }
-}  /* add_to_touched */
+}
 
 /**
  * Place a node on the cprop list.
@@ -860,7 +860,7 @@ static void add_to_cprop(node_t *y, environment_t *env)
                        add_to_cprop(p, env);
                }
        }
-}  /* add_to_cprop */
+}
 
 /**
  * Update the worklist: If Z is on worklist then add Z' to worklist.
@@ -877,7 +877,7 @@ static void update_worklist(partition_t *Z, partition_t *Z_prime, environment_t
        } else {
                add_to_worklist(Z, env);
        }
-}  /* update_worklist */
+}
 
 /**
  * Make all inputs to x no longer be F.def_use edges.
@@ -914,7 +914,7 @@ static void move_edges_to_leader(node_t *x)
                        }
                }
        }
-}  /* move_edges_to_leader */
+}
 
 /**
  * Split a partition that has NO followers by a local list.
@@ -970,7 +970,7 @@ static partition_t *split_no_followers(partition_t *Z, node_t *g, environment_t
        update_worklist(Z, Z_prime, env);
 
        return Z_prime;
-}  /* split_no_followers */
+}
 
 /**
  * Make the Follower -> Leader transition for a node.
@@ -987,7 +987,7 @@ static void follower_to_leader(node_t *n)
        list_del(&n->node_list);
        list_add_tail(&n->node_list, &n->part->Leader);
        ++n->part->n_leader;
-}  /* follower_to_leader */
+}
 
 /**
  * The environment for one race step.
@@ -1064,7 +1064,7 @@ static int is_real_follower(const ir_node *irn, int input)
                break;
        }
        return 1;
-}  /* is_real_follower */
+}
 
 /**
  * Do one step in the race.
@@ -1129,7 +1129,7 @@ static int step(step_env *env)
                env->index    = 0;
        }
        return 1;
-}  /* step */
+}
 
 /**
  * Clear the flags from a list and check for
@@ -1152,7 +1152,7 @@ static int clear_flags(node_t *list)
                n->flagged = 0;
        }
        return res;
-}  /* clear_flags */
+}
 
 /**
  * Split a partition by a local list using the race.
@@ -1327,7 +1327,7 @@ static partition_t *split(partition_t **pX, node_t *gg, environment_t *env)
        }
 
        return X_prime;
-}  /* split */
+}
 
 /**
  * Returns non-zero if the i'th input of a Phi node is live.
@@ -1348,7 +1348,7 @@ static int is_live_input(ir_node *phi, int i)
        }
        /* else it's the control input, always live */
        return 1;
-}  /* is_live_input */
+}
 
 /**
  * Return non-zero if a type is a constant.
@@ -1358,7 +1358,7 @@ static int is_constant_type(lattice_elem_t type)
        if (type.tv != tarval_bottom && type.tv != tarval_top)
                return 1;
        return 0;
-}  /* is_constant_type */
+}
 
 /**
  * Check whether a type is neither Top or a constant.
@@ -1378,7 +1378,7 @@ static int type_is_neither_top_nor_const(const lattice_elem_t type)
                return 0;
        }
        return 1;
-}  /* type_is_neither_top_nor_const */
+}
 
 /**
  * Collect nodes to the touched list.
@@ -1443,7 +1443,7 @@ static void collect_touched(list_head *list, int idx, environment_t *env)
                        }
                }
        }
-}  /* collect_touched */
+}
 
 /**
  * Collect commutative nodes to the touched list.
@@ -1493,7 +1493,7 @@ static void collect_commutative_touched(list_head *list, environment_t *env)
                        }
                }
        }
-}  /* collect_commutative_touched */
+}
 
 /**
  * Split the partitions if caused by the first entry on the worklist.
@@ -1616,7 +1616,7 @@ static void cause_splits(environment_t *env)
                                assert(n_touched <= Z->n_leader);
                }
        }
-}  /* cause_splits */
+}
 
 /**
  * Implements split_by_what(): Split a partition by characteristics given
@@ -1674,14 +1674,14 @@ static partition_t *split_by_what(partition_t *X, what_func What,
 
        listmap_term(&map);
        return *P;
-}  /* split_by_what */
+}
 
 /** lambda n.(n.type) */
 static void *lambda_type(const node_t *node, environment_t *env)
 {
        (void)env;
        return node->type.tv;
-}  /* lambda_type */
+}
 
 /** lambda n.(n.opcode) */
 static void *lambda_opcode(const node_t *node, environment_t *env)
@@ -1692,7 +1692,7 @@ static void *lambda_opcode(const node_t *node, environment_t *env)
 
        entry = set_insert(opcode_key_t, env->opcode2id_map, &key, sizeof(key), opcode_hash(&key));
        return entry;
-}  /* lambda_opcode */
+}
 
 /** lambda n.(n[i].partition) */
 static void *lambda_partition(const node_t *node, environment_t *env)
@@ -1721,7 +1721,7 @@ static void *lambda_partition(const node_t *node, environment_t *env)
        pred = i == -1 ? get_irn_n(skipped, i) : get_irn_n(node->node, i);
        p    = get_irn_node(pred);
        return p->part;
-}  /* lambda_partition */
+}
 
 /** lambda n.(n[i].partition) for commutative nodes */
 static void *lambda_commutative_partition(const node_t *node, environment_t *env)
@@ -1774,7 +1774,7 @@ static void *lambda_commutative_partition(const node_t *node, environment_t *env
 
                return p->part;
        }
-}  /* lambda_commutative_partition */
+}
 
 /**
  * Returns true if a type is a constant (and NOT Top
@@ -1786,7 +1786,7 @@ static int is_con(const lattice_elem_t type)
        if (is_tarval(type.tv))
                return tarval_is_constant(type.tv);
        return is_entity(type.sym.entity_p);
-}  /* is_con */
+}
 
 /**
  * Implements split_by().
@@ -1877,7 +1877,7 @@ static void split_by(partition_t *X, environment_t *env)
                        }
                }
        } while (P != NULL);
-}  /* split_by */
+}
 
 /**
  * (Re-)compute the type for a given node.
@@ -1904,7 +1904,7 @@ static void default_compute(node_t *node)
                node->type.tv = tarval_reachable;
        else
                node->type.tv = computed_value(irn);
-}  /* default_compute */
+}
 
 /**
  * (Re-)compute the type for a Block node.
@@ -1933,7 +1933,7 @@ static void compute_Block(node_t *node)
                }
        }
        node->type.tv = tarval_top;
-}  /* compute_Block */
+}
 
 /**
  * (Re-)compute the type for a Bad node.
@@ -1944,7 +1944,7 @@ static void compute_Bad(node_t *node)
 {
        /* Bad nodes ALWAYS compute Top */
        node->type.tv = tarval_top;
-}  /* compute_Bad */
+}
 
 /**
  * (Re-)compute the type for an Unknown node.
@@ -1964,7 +1964,7 @@ static void compute_Unknown(node_t *node)
         * (jump threading for instance) might replace them by Phib's...
         */
        node->type.tv = tarval_UNKNOWN;
-}  /* compute_Unknown */
+}
 
 /**
  * (Re-)compute the type for a Jmp node.
@@ -1976,7 +1976,7 @@ static void compute_Jmp(node_t *node)
        node_t *block = get_irn_node(get_nodes_block(node->node));
 
        node->type = block->type;
-}  /* compute_Jmp */
+}
 
 /**
  * (Re-)compute the type for the Return node.
@@ -1989,7 +1989,7 @@ static void compute_Return(node_t *node)
         * This is already checked in compute(). so we can return
         * Reachable here. */
        node->type.tv = tarval_reachable;
-}  /* compute_Return */
+}
 
 /**
  * (Re-)compute the type for the End node.
@@ -2000,7 +2000,7 @@ static void compute_End(node_t *node)
 {
        /* the End node is NOT dead of course */
        node->type.tv = tarval_reachable;
-}  /* compute_End */
+}
 
 /**
  * (Re-)compute the type for a Call.
@@ -2014,7 +2014,7 @@ static void compute_Call(node_t *node)
         * predecessors.
         */
        node->type.tv = tarval_bottom;
-}  /* compute_Call */
+}
 
 /**
  * (Re-)compute the type for a SymConst node.
@@ -2037,7 +2037,7 @@ static void compute_SymConst(node_t *node)
        default:
                node->type.tv = computed_value(irn);
        }
-}  /* compute_SymConst */
+}
 
 /**
  * (Re-)compute the type for a Phi node.
@@ -2085,7 +2085,7 @@ static void compute_Phi(node_t *node)
                /* else nothing, constants are the same */
        }
        node->type = type;
-}  /* compute_Phi */
+}
 
 /**
  * (Re-)compute the type for an Add. Special case: one nodes is a Zero Const.
@@ -2127,7 +2127,7 @@ static void compute_Add(node_t *node)
                }
                node->type.tv = tarval_bottom;
        }
-}  /* compute_Add */
+}
 
 /**
  * (Re-)compute the type for a Sub. Special case: both nodes are congruent.
@@ -2174,7 +2174,7 @@ static void compute_Sub(node_t *node)
        } else {
                node->type.tv = tarval_bottom;
        }
-}  /* compute_Sub */
+}
 
 /**
  * (Re-)compute the type for an Eor. Special case: both nodes are congruent.
@@ -2216,7 +2216,7 @@ static void compute_Eor(node_t *node)
        } else {
                node->type.tv = tarval_bottom;
        }
-}  /* compute_Eor */
+}
 
 /**
  * (Re-)compute the type for Cmp.
@@ -2361,7 +2361,7 @@ static void compute_Proj_Cond(node_t *node, ir_node *cond)
                        }
                }
        }
-}  /* compute_Proj_Cond */
+}
 
 static void compute_Proj_Switch(node_t *node, ir_node *switchn)
 {
@@ -2464,7 +2464,7 @@ ir_node *proj = node->node;
        }
 
        default_compute(node);
-}  /* compute_Proj */
+}
 
 /**
  * (Re-)compute the type for a Confirm.
@@ -2487,7 +2487,7 @@ static void compute_Confirm(node_t *node)
        }
        /* a Confirm is a copy OR a Const */
        node->type = pred->type;
-}  /* compute_Confirm */
+}
 
 /**
  * (Re-)compute the type for a given node.
@@ -2525,7 +2525,7 @@ static void compute(node_t *node)
        func = (compute_func)node->node->op->ops.generic;
        if (func != NULL)
                func(node);
-}  /* compute */
+}
 
 /*
  * Identity functions: Note that one might think that identity() is just a
@@ -2563,7 +2563,7 @@ static node_t *identity_Phi(node_t *node)
         * tarval_top, is in the TOP partition and should NOT being split! */
        assert(n_part != NULL);
        return n_part;
-}  /* identity_Phi */
+}
 
 /**
  * Calculates the Identity for commutative 0 neutral nodes.
@@ -2588,7 +2588,7 @@ static node_t *identity_comm_zero_binop(node_t *node)
        if (b->type.tv == zero)
                return a;
        return node;
-}  /* identity_comm_zero_binop */
+}
 
 /**
  * Calculates the Identity for Shift nodes.
@@ -2606,7 +2606,7 @@ static node_t *identity_shift(node_t *node)
        if (b->type.tv == zero)
                return get_irn_node(get_binop_left(op));
        return node;
-}  /* identity_shift */
+}
 
 /**
  * Calculates the Identity for Mul nodes.
@@ -2631,7 +2631,7 @@ static node_t *identity_Mul(node_t *node)
        if (b->type.tv == one)
                return a;
        return node;
-}  /* identity_Mul */
+}
 
 /**
  * Calculates the Identity for Sub nodes.
@@ -2651,7 +2651,7 @@ static node_t *identity_Sub(node_t *node)
        if (b->type.tv == get_mode_null(mode))
                return get_irn_node(get_Sub_left(sub));
        return node;
-}  /* identity_Sub */
+}
 
 /**
  * Calculates the Identity for And nodes.
@@ -2670,7 +2670,7 @@ static node_t *identity_And(node_t *node)
        if (b->type.tv == neutral)
                return a;
        return node;
-}  /* identity_And */
+}
 
 /**
  * Calculates the Identity for Confirm nodes.
@@ -2681,7 +2681,7 @@ static node_t *identity_Confirm(node_t *node)
 
        /* a Confirm is always a Copy */
        return get_irn_node(get_Confirm_value(confirm));
-}  /* identity_Confirm */
+}
 
 /**
  * Calculates the Identity for Mux nodes.
@@ -2707,7 +2707,7 @@ static node_t *identity_Mux(node_t *node)
                return f;
 #endif
        return node;
-}  /* identity_Mux */
+}
 
 /**
  * Calculates the Identity for nodes.
@@ -2741,7 +2741,7 @@ static node_t *identity(node_t *node)
        default:
                return node;
        }
-}  /* identity */
+}
 
 /**
  * Node follower is a (new) follower of leader, segregate Leader
@@ -2765,7 +2765,7 @@ static void segregate_def_use_chain_1(const ir_node *follower, node_t *leader)
                        break;
                }
        }
-}  /* segregate_def_use_chain_1 */
+}
 
 /**
  * Node follower is a (new) follower segregate its Leader
@@ -2782,7 +2782,7 @@ static void segregate_def_use_chain(const ir_node *follower)
 
                segregate_def_use_chain_1(follower, pred);
        }
-}  /* segregate_def_use_chain */
+}
 
 /**
  * Propagate constant evaluation.
@@ -2929,7 +2929,7 @@ static void propagate(environment_t *env)
                }
                split_by(Y, env);
        }
-}  /* propagate */
+}
 
 /**
  * Get the leader for a given node from its congruence class.
@@ -2950,7 +2950,7 @@ static ir_node *get_leader(node_t *node)
                return get_first_node(part)->node;
        }
        return node->node;
-}  /* get_leader */
+}
 
 /**
  * Returns non-zero if a mode_T node has only one reachable output.
@@ -2974,7 +2974,7 @@ static int only_one_reachable_proj(ir_node *n)
                }
        }
        return 1;
-}  /* only_one_reachable_proj */
+}
 
 /**
  * Return non-zero if the control flow predecessor node pred
@@ -3000,7 +3000,7 @@ static int can_exchange(ir_node *pred, ir_node *block)
                return only_one_reachable_proj(pred);
        }
        return 0;
-}  /* can_exchange */
+}
 
 /**
  * Block Post-Walker, apply the analysis results on control flow by
@@ -3161,7 +3161,7 @@ static void apply_cf(ir_node *block, void *ctx)
        }
        set_irn_in(block, k, in_X);
        env->modified = 1;
-}  /* apply_cf */
+}
 
 /**
  * Exchange a node by its leader.
@@ -3195,7 +3195,7 @@ static void exchange_leader(ir_node *irn, ir_node *leader)
                }
        }
        exchange(irn, leader);
-}  /* exchange_leader */
+}
 
 /**
  * Check, if all users of a mode_M node are dead. Use
@@ -3222,7 +3222,7 @@ static int all_users_are_dead(const ir_node *irn)
        }
        /* all users are unreachable */
        return 1;
-}  /* all_user_are_dead */
+}
 
 /**
  * Walker: Find reachable mode_M nodes that have only
@@ -3249,7 +3249,7 @@ static void find_kept_memory(ir_node *irn, void *ctx)
                DB((dbg, LEVEL_1, "%+F must be kept\n", irn));
                ARR_APP1(ir_node *, env->kept_memory, irn);
        }
-}  /* find_kept_memory */
+}
 
 /**
  * Post-Walker, apply the analysis results;
@@ -3409,7 +3409,7 @@ static void apply_result(ir_node *irn, void *ctx)
                        }
                }
        }
-}  /* apply_result */
+}
 
 /**
  * Fix the keep-alives by deleting unreachable ones.
@@ -3446,7 +3446,7 @@ static void apply_end(ir_node *end, environment_t *env)
                set_End_keepalives(end, j, in);
                env->modified = 1;
        }
-}  /* apply_end */
+}
 
 #define SET(code) op_##code->ops.generic = (op_func)compute_##code
 
@@ -3479,7 +3479,7 @@ static void set_compute_functions(void)
        SET(Return);
        SET(End);
        SET(Call);
-}  /* set_compute_functions */
+}
 
 /**
  * Add memory keeps.
@@ -3505,7 +3505,7 @@ static void add_memory_keeps(ir_node **kept_memory, size_t len)
                }
        }
        ir_nodeset_destroy(&set);
-}  /* add_memory_keeps */
+}
 
 void combo(ir_graph *irg)
 {
@@ -3623,10 +3623,10 @@ void combo(ir_graph *irg)
        current_ir_graph = rem;
 
        confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_NONE);
-}  /* combo */
+}
 
 /* Creates an ir_graph pass for combo. */
 ir_graph_pass_t *combo_pass(const char *name)
 {
        return def_graph_pass(name ? name : "combo", combo);
-}  /* combo_pass */
+}
index 7a4d07b..8e87313 100644 (file)
@@ -214,7 +214,7 @@ static void dump_value_set(ir_valueset_t *set, const char *txt, ir_node *block)
                ++i;
        }
        DB((dbg, LEVEL_2, "\n}\n"));
-}  /* dump_value_set */
+}
 
 /**
  * Dump all exp_gen value sets.
@@ -440,7 +440,7 @@ static void alloc_block_info(ir_node *block, pre_env *env)
 
        info->next = env->list;
        env->list  = info;
-}  /* alloc_block_info */
+}
 
 static void free_block_info(block_info *block_info)
 {
@@ -1228,7 +1228,7 @@ static void update_new_set(ir_node *block, ir_node *idom)
        if (updated)
                dump_value_set(curr_info->avail_out, "Updated [Avail_out]", block);
 #endif
-} /* update_new_set */
+}
 
 /**
  * Checks if hoisting irn is greedy.
@@ -1806,7 +1806,7 @@ static void eliminate(ir_node *irn, void *ctx)
                        }
                }
        }
-}  /* eliminate */
+}
 
 /**
  * Do all the recorded changes and optimize
@@ -1856,7 +1856,7 @@ static void eliminate_nodes(elim_pair *pairs, ir_nodeset_t *keeps)
        foreach_ir_nodeset(keeps, m_phi, iter) {
                remove_End_keepalive(end, m_phi);
        }
-}  /* eliminate_nodes */
+}
 
 
 /* --------------------------------------------------------
index f7b76f2..48fba5e 100644 (file)
@@ -789,4 +789,4 @@ void opt_jumpthreading(ir_graph* irg)
 ir_graph_pass_t *opt_jumpthreading_pass(const char *name)
 {
        return def_graph_pass(name ? name : "jumpthreading", opt_jumpthreading);
-}  /* opt_jumpthreading_pass */
+}
index 81d2b8d..c1098e2 100644 (file)
@@ -113,7 +113,7 @@ static ldst_info_t *get_ldst_info(ir_node *node, struct obstack *obst)
                set_irn_link(node, info);
        }
        return info;
-}  /* get_ldst_info */
+}
 
 /**
  * get the Block info of a node
@@ -127,7 +127,7 @@ static block_info_t *get_block_info(ir_node *node, struct obstack *obst)
                set_irn_link(node, info);
        }
        return info;
-}  /* get_block_info */
+}
 
 /**
  * update the projection info for a Load/Store
@@ -147,7 +147,7 @@ static unsigned update_projs(ldst_info_t *info, ir_node *proj)
                info->projs[nr] = proj;
                return 0;
        }
-}  /* update_projs */
+}
 
 /**
  * update the exception block info for a Load/Store node.
@@ -163,7 +163,7 @@ static unsigned update_exc(ldst_info_t *info, ir_node *block, int pos)
        info->exc_block = block;
        info->exc_idx   = pos;
        return 0;
-}  /* update_exc */
+}
 
 /**
  * walker, collects all Load/Store/Proj nodes
@@ -234,7 +234,7 @@ static void collect_nodes(ir_node *node, void *env)
                        }
                }
        }
-}  /* collect_nodes */
+}
 
 /**
  * Returns an entity if the address ptr points to a constant one.
@@ -322,7 +322,7 @@ static ir_entity *find_constant_entity(ir_node *ptr)
                } else
                        return NULL;
        }
-}  /* find_constant_entity */
+}
 
 /**
  * Return the Selection index of a Sel node from dimension n
@@ -332,7 +332,7 @@ static long get_Sel_array_index_long(ir_node *n, int dim)
        ir_node *index = get_Sel_index(n, dim);
        assert(is_Const(index));
        return get_tarval_long(get_Const_tarval(index));
-}  /* get_Sel_array_index_long */
+}
 
 typedef struct path_entry {
        ir_entity         *ent;
@@ -547,7 +547,7 @@ static void handle_load_update(ir_node *load)
                kill_node(load);
                reduce_adr_usage(ptr);
        }
-}  /* handle_load_update */
+}
 
 /**
  * A use of an address node has vanished. Check if this was a Proj
@@ -570,7 +570,7 @@ static void reduce_adr_usage(ir_node *ptr)
                /* this node lost its result proj, handle that */
                handle_load_update(pred);
        }
-}  /* reduce_adr_usage */
+}
 
 /**
  * Check, if an already existing value of mode old_mode can be converted
@@ -619,7 +619,7 @@ static unsigned is_Call_pure(ir_node *call)
                }
        }
        return (prop & (mtp_property_const|mtp_property_pure)) != 0;
-}  /* is_Call_pure */
+}
 
 static ir_node *get_base_and_offset(ir_node *ptr, long *pOffset)
 {
@@ -909,7 +909,7 @@ static unsigned follow_Mem_chain(ir_node *load, ir_node *curr)
        }
 
        return res;
-}  /* follow_Mem_chain */
+}
 
 ir_node *can_replace_load_by_const(const ir_node *load, ir_node *c)
 {
@@ -1058,7 +1058,7 @@ static unsigned optimize_load(ir_node *load)
        INC_MASTER();
        res = follow_Mem_chain(load, skip_Proj(mem));
        return res;
-}  /* optimize_load */
+}
 
 /**
  * Check whether a value of mode new_mode would completely overwrite a value
@@ -1067,7 +1067,7 @@ static unsigned optimize_load(ir_node *load)
 static int is_completely_overwritten(ir_mode *old_mode, ir_mode *new_mode)
 {
        return get_mode_size_bits(new_mode) >= get_mode_size_bits(old_mode);
-}  /* is_completely_overwritten */
+}
 
 /**
  * Check whether small is a part of large (starting at same address).
@@ -1082,7 +1082,7 @@ static int is_partially_same(ir_node *small, ir_node *large)
            && get_mode_size_bytes(sm) < get_mode_size_bytes(lm)
            && get_mode_arithmetic(sm) == irma_twos_complement
            && get_mode_arithmetic(lm) == irma_twos_complement;
-}  /* is_partially_same */
+}
 
 /**
  * follow the memory chain as long as there are only Loads and alias free Stores.
@@ -1215,7 +1215,7 @@ static unsigned follow_Mem_chain_for_Store(ir_node *store, ir_node *curr)
                }
        }
        return res;
-}  /* follow_Mem_chain_for_Store */
+}
 
 /** find entity used as base for an address calculation */
 static ir_entity *find_entity(ir_node *ptr)
@@ -1286,7 +1286,7 @@ static unsigned optimize_store(ir_node *store)
        INC_MASTER();
 
        return follow_Mem_chain_for_Store(store, skip_Proj(mem));
-}  /* optimize_store */
+}
 
 /* check if a node has more than one real user. Keepalive edges do not count as
  * real users */
@@ -1500,7 +1500,7 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
        exchange(phi, projM);
 
        return res | DF_CHANGED;
-}  /* optimize_phi */
+}
 
 static int optimize_conv_load(ir_node *conv)
 {
@@ -1568,7 +1568,7 @@ static void do_load_store_optimize(ir_node *n, void *env)
        default:
                break;
        }
-}  /* do_load_store_optimize */
+}
 
 /** A scc. */
 typedef struct scc {
@@ -1610,7 +1610,7 @@ static node_entry *get_irn_ne(ir_node *irn, loop_env *env)
                ir_nodehashmap_insert(&env->map, irn, e);
        }
        return e;
-}  /* get_irn_ne */
+}
 
 /**
  * Push a node onto the stack.
@@ -1629,7 +1629,7 @@ static void push(loop_env *env, ir_node *n)
        env->stack[env->tos++] = n;
        e = get_irn_ne(n, env);
        e->in_stack = 1;
-}  /* push */
+}
 
 /**
  * pop a node from the stack
@@ -1645,7 +1645,7 @@ static ir_node *pop(loop_env *env)
 
        e->in_stack = 0;
        return n;
-}  /* pop */
+}
 
 /**
  * Check if irn is a region constant.
@@ -1659,7 +1659,7 @@ static int is_rc(ir_node *irn, ir_node *header_block)
        ir_node *block = get_nodes_block(irn);
 
        return (block != header_block) && block_dominates(block, header_block);
-}  /* is_rc */
+}
 
 typedef struct phi_entry phi_entry;
 struct phi_entry {
@@ -1688,7 +1688,7 @@ static int cmp_avail_entry(const void *elt, const void *key, size_t size)
        (void) size;
 
        return a->ptr != b->ptr || a->mode != b->mode;
-}  /* cmp_avail_entry */
+}
 
 /**
  * Calculate the hash value of an avail entry.
@@ -1696,7 +1696,7 @@ static int cmp_avail_entry(const void *elt, const void *key, size_t size)
 static unsigned hash_cache_entry(const avail_entry_t *entry)
 {
        return get_irn_idx(entry->ptr) * 9 + hash_ptr(entry->mode);
-}  /* hash_cache_entry */
+}
 
 /**
  * Move loops out of loops if possible.
@@ -1829,7 +1829,7 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env)
                }
        }
        del_set(avail);
-}  /* move_loads_out_of_loops */
+}
 
 /**
  * Process a loop SCC.
@@ -1955,7 +1955,7 @@ static void process_loop(scc *pscc, loop_env *env)
 
 fail:
        ;
-}  /* process_loop */
+}
 
 /**
  * Process a SCC.
@@ -1988,7 +1988,7 @@ static void process_scc(scc *pscc, loop_env *env)
                /* this SCC has more than one member */
                process_loop(pscc, env);
        }
-}  /* process_scc */
+}
 
 /**
  * Do Tarjan's SCC algorithm and drive load/store optimization.
@@ -2063,7 +2063,7 @@ static void dfs(ir_node *irn, loop_env *env)
 
                process_scc(pscc, env);
        }
-}  /* dfs */
+}
 
 /**
  * Do the DFS on the memory edges a graph.
@@ -2105,7 +2105,7 @@ static void do_dfs(ir_graph *irg, loop_env *env)
                if (is_Phi(ka) && !irn_visited(ka))
                        dfs(ka, env);
        }
-}  /* do_dfs */
+}
 
 /**
  * Optimize Loads/Stores in loops.
@@ -2132,7 +2132,7 @@ static int optimize_loops(ir_graph *irg)
        ir_nodehashmap_destroy(&env.map);
 
        return env.changes;
-}  /* optimize_loops */
+}
 
 void optimize_load_store(ir_graph *irg)
 {
@@ -2179,4 +2179,4 @@ void optimize_load_store(ir_graph *irg)
 ir_graph_pass_t *optimize_load_store_pass(const char *name)
 {
        return def_graph_pass(name ? name : "ldst", optimize_load_store);
-}  /* optimize_load_store_pass */
+}
index 3428614..7cc8015 100644 (file)
@@ -170,7 +170,7 @@ static void dump_partition(const char *msg, const partition_t *part)
                first = 0;
        }
        DB((dbg, LEVEL_2, "\n }\n"));
-}  /* dump_partition */
+}
 
 /**
  * Dumps a list.
@@ -186,7 +186,7 @@ static void dump_list(const char *msg, const block_t *block)
                first = 0;
        }
        DB((dbg, LEVEL_3, "\n  }\n"));
-}  /* do_dump_list */
+}
 #else
 #define dump_partition(msg, part)
 #define dump_list(msg, block)
@@ -202,7 +202,7 @@ static int listmap_cmp_ptr(const void *elt, const void *key, size_t size)
 
        (void) size;
        return e1->id != e2->id;
-}  /* listmap_cmp_ptr */
+}
 
 /**
  * Initializes a listmap.
@@ -213,7 +213,7 @@ static void listmap_init(listmap_t *map)
 {
        map->map    = new_set(listmap_cmp_ptr, 16);
        map->values = NULL;
-}  /* listmap_init */
+}
 
 /**
  * Terminates a listmap.
@@ -223,7 +223,7 @@ static void listmap_init(listmap_t *map)
 static void listmap_term(listmap_t *map)
 {
        del_set(map->map);
-}  /* listmap_term */
+}
 
 /**
  * Return the associated listmap entry for a given id.
@@ -248,7 +248,7 @@ static listmap_entry_t *listmap_find(listmap_t *map, void *id)
                map->values = entry;
        }
        return entry;
-}  /* listmap_find */
+}
 
 /**
  * Calculate the hash value for an opcode map entry.
@@ -261,7 +261,7 @@ static unsigned opcode_hash(const opcode_key_t *entry)
 {
        /* assume long >= int */
        return (unsigned)(PTR_TO_INT(entry->mode) * 9 + entry->code + entry->u.proj * 3 + hash_ptr(entry->u.addr) + entry->arity);
-}  /* opcode_hash */
+}
 
 /**
  * Compare two entries in the opcode map.
@@ -275,7 +275,7 @@ static int cmp_opcode(const void *elt, const void *key, size_t size)
        return o1->code != o2->code || o1->mode != o2->mode ||
               o1->arity != o2->arity ||
               o1->u.proj != o2->u.proj || o1->u.addr != o2->u.addr;
-}  /* cmp_opcode */
+}
 
 /**
  * Creates a new empty partition and put in on the
@@ -294,7 +294,7 @@ static partition_t *create_partition(ir_node *meet_block, environment_t *env)
        DEBUG_ONLY(part->nr = part_nr++;)
        list_add_tail(&part->part_list, &env->partitions);
        return part;
-}  /* create_partition */
+}
 
 /**
  * Allocate a new block in the given partition.
@@ -328,7 +328,7 @@ static block_t *create_block(ir_node *block, int meet_input, partition_t *partit
        env->all_blocks = bl;
 
        return bl;
-}  /* create_block */
+}
 
 /**
  * Allocate a new node and add it to a blocks wait queue.
@@ -347,7 +347,7 @@ static node_t *create_node(ir_node *irn, block_t *block, environment_t *env)
        list_add_tail(&node->node_list, &block->nodes);
 
        return node;
-}  /* create_node */
+}
 
 /**
  * Add an input pair to a block.
@@ -367,7 +367,7 @@ static void add_pair(block_t *block, ir_node *irn, int idx, environment_t *env)
        pair->ins   = NULL;
 
        block->input_pairs = pair;
-}  /* add_pair */
+}
 
 /**
  * Add a Phi to a block.
@@ -385,7 +385,7 @@ static void add_phi(block_t *block, ir_node *phi, environment_t *env)
        node->ins  = NULL;
 
        block->phis = node;
-}  /** add_phi */
+}
 
 /**
  * Creates an opcode from a node.
@@ -436,7 +436,7 @@ static opcode_key_t *opcode(const node_t *node, environment_t *env)
 
        entry = set_insert(opcode_key_t, env->opcode2id_map, &key, sizeof(key), opcode_hash(&key));
        return entry;
-}  /* opcode */
+}
 
 /**
  * Split a partition by a local list.
@@ -476,7 +476,7 @@ static partition_t *split(partition_t *Z, block_t *g, environment_t *env)
        dump_partition("Now ", Z);
        dump_partition("Created new ", Z_prime);
        return Z_prime;
-}  /* split */
+}
 
 /**
  * Return non-zero if pred should be tread as a input node.
@@ -491,7 +491,7 @@ static int is_input_node(ir_node *pred, ir_node *irn, int index)
        if (! is_Call(irn))
                return 1;
        return 0;
-}  /* is_input_node */
+}
 
 /**
  * Propagate nodes on all wait queues of the given partition.
@@ -602,7 +602,7 @@ static void propagate_blocks(partition_t *part, environment_t *env)
                split(part, S, env);
        }
        listmap_term(&map);
-}  /* propagate_blocks */
+}
 
 /**
  * Propagate nodes on all wait queues.
@@ -619,7 +619,7 @@ static void propagate(environment_t *env)
                } else
                        propagate_blocks(part, env);
        }
-}  /* propagate */
+}
 
 /**
  * Map a block to the phi[block->input] live-trough.
@@ -635,7 +635,7 @@ static void *live_throughs(const block_t *bl, const ir_node *phi)
        if (get_nodes_block(input) == bl->block)
                return NULL;
        return input;
-}  /* live_throughs */
+}
 
 /**
  * Split partition by live-outs and live-troughs.
@@ -690,7 +690,7 @@ static void propagate_blocks_live_troughs(partition_t *part, environment_t *env)
                }
                listmap_term(&map);
        }
-}  /* propagate_blocks_live_troughs */
+}
 
 /**
  * Propagate live-troughs on all partitions on the partition list.
@@ -702,7 +702,7 @@ static void propagate_live_troughs(environment_t *env)
        list_for_each_entry_safe(partition_t, part, next, &env->partitions, part_list) {
                propagate_blocks_live_troughs(part, env);
        }
-}  /* propagate_live_troughs */
+}
 
 /**
  * Apply analysis results by replacing all blocks of a partition
@@ -917,7 +917,7 @@ continue_outer:
        /* fix inputs of the meet block */
        set_irn_in(meet_block, j, ins);
        DEL_ARR_F(ins);
-}  /* apply */
+}
 
 /**
  * Create a partition for a the end block.
@@ -968,7 +968,7 @@ static void partition_for_end_block(ir_node *end_block, environment_t *env)
        }
 
        dump_partition("Created", part);
-}  /* partition_for_end_block */
+}
 
 #ifdef GENERAL_SHAPE
 /**
@@ -1000,7 +1000,7 @@ static void partition_for_block(ir_node *block, pred_t preds[], int n_preds, env
        }
 
        dump_partition("Created", part);
-}  /* partition_for_block */
+}
 
 /**
  * Walker: clear the links of all block phi lists and normal
@@ -1013,7 +1013,7 @@ static void clear_phi_links(ir_node *irn, void *env)
                set_Block_phis(irn, NULL);
                set_irn_link(irn, NULL);
        }
-}  /* clear_phi_links */
+}
 
 /**
  * Walker, detect live-out nodes.
@@ -1056,7 +1056,7 @@ static void find_liveouts(ir_node *irn, void *ctx)
                        live_outs[idx] = pred_block;
                }
        }
-}  /* find_liveouts */
+}
 
 /**
  * Check if the current block is the meet block of its predecessors.
@@ -1095,7 +1095,7 @@ static void check_for_cf_meet(ir_node *block, void *ctx)
 
        if (k > 1)
                partition_for_block(block, preds, k, env);
-}  /* check_for_cf_meet */
+}
 
 /**
  * Compare two nodes for root ordering.
@@ -1127,7 +1127,7 @@ static int cmp_nodes(const void *a, const void *b)
        idx_b = get_irn_idx(irn_b);
 
        return (idx_a > idx_b) - (idx_a < idx_b);
-}  /* cmp_nodes */
+}
 
 /**
  * Add the roots to all blocks.
@@ -1176,7 +1176,7 @@ static void add_roots(ir_graph *irg, environment_t *env)
                DEL_ARR_F(bl->roots);
                bl->roots = NULL;
        }
-}  /* add_roots */
+}
 #endif /* GENERAL_SHAPE */
 
 /* Combines congruent end blocks into one. */
@@ -1256,9 +1256,9 @@ void shape_blocks(ir_graph *irg)
        DEL_ARR_F(env.live_outs);
        del_set(env.opcode2id_map);
        obstack_free(&env.obst, NULL);
-}  /* shape_blocks */
+}
 
 ir_graph_pass_t *shape_blocks_pass(const char *name)
 {
        return def_graph_pass(name ? name : "shape_blocks", shape_blocks);
-}  /* shape_blocks_pass */
+}
index dc67eaf..54d4766 100644 (file)
@@ -167,7 +167,7 @@ int value_not_zero(const ir_node *n, const ir_node **confirm)
        return (relation != ir_relation_equal) && (relation != ir_relation_unordered);
 
 #undef RET_ON
-}  /* value_not_zero */
+}
 
 /*
  * Check, if the value of a node cannot represent a NULL pointer.
@@ -222,7 +222,7 @@ int value_not_null(const ir_node *n, const ir_node **confirm)
                }
        }
        return 0;
-}  /* value_not_null */
+}
 
 #ifdef __cplusplus
 extern "C++" {
@@ -337,7 +337,7 @@ ir_value_classify_sign classify_value_sign(ir_node *n)
        default:
                return value_classified_unknown;
        }
-}  /* classify_value_sign */
+}
 
 /**
  * construct an interval from a value
@@ -381,7 +381,7 @@ static interval_t *get_interval_from_tv(interval_t *iv, ir_tarval *tv)
        iv->flags = MIN_INCLUDED | MAX_INCLUDED;
 
        return iv;
-}  /* get_interval_from_tv */
+}
 
 /**
  * construct an interval from a Confirm
@@ -483,7 +483,7 @@ static interval_t *get_interval(interval_t *iv, ir_node *bound, ir_relation rela
        if (iv->min != tarval_bad && iv->max != tarval_bad)
                return iv;
        return NULL;
-}  /* get_interval */
+}
 
 /**
  * Try to evaluate l_iv relation r_iv.
@@ -616,7 +616,7 @@ static ir_tarval *(compare_iv)(const interval_t *l_iv, const interval_t *r_iv, i
                return tarval_bad;
        }
        return tarval_bad;
-}  /* compare_iv */
+}
 
 /**
  * Returns non-zero, if a given relation is transitive.
@@ -624,7 +624,7 @@ static ir_tarval *(compare_iv)(const interval_t *l_iv, const interval_t *r_iv, i
 static int is_transitive(ir_relation relation)
 {
        return (ir_relation_false < relation && relation < ir_relation_less_greater);
-}  /* is_transitive */
+}
 
 /**
  * Return the value of a Cmp if one or both predecessors
@@ -807,7 +807,7 @@ check_null_case:
                DBG_EVAL_CONFIRM(cmp);
 
        return tv;
-}  /* computed_value_Cmp_Confirm */
+}
 
 #ifdef DEBUG_CONFIRM
 /**
@@ -836,7 +836,7 @@ static int iv_snprintf(char *buf, size_t len, const interval_t *iv)
                        return snprintf(buf, len, "%s", smin);
        }
        return snprintf(buf, len, "<UNKNOWN>");
-}  /* iv_snprintf */
+}
 
 /**
  * For debugging. Prints an interval compare.
@@ -853,7 +853,7 @@ static void print_iv_cmp(const interval_t *l_iv, const interval_t *r_iv, ir_rela
        iv_snprintf(sr, sizeof(sr), r_iv);
 
        ir_printf("%s %= %s", sl, relation, sr);
-}  /* print_iv_cmp */
+}
 
 /**
  * For debugging. call *compare_iv() and prints inputs and result.
@@ -873,6 +873,6 @@ static tarval *compare_iv_dbg(const interval_t *l_iv, const interval_t *r_iv, ir
        print_iv_cmp(l_iv, r_iv, relation);
        ir_printf(" = %T\n", tv);
        return tv;
-}  /* compare_iv_dbg */
+}
 
 #endif /* DEBUG_CONFIRM */
index 94ddcbf..24278aa 100644 (file)
@@ -169,7 +169,7 @@ static void dump_block_list(ldst_env *env)
                }
                DB((dbg, LEVEL_2, "\n}\n\n"));
        }
-}  /* dump_block_list */
+}
 
 /**
  * Dumps the current set.
@@ -196,7 +196,7 @@ static void dump_curr(block_t *bl, const char *s)
                i = (i + 1) & 3;
        }
        DB((dbg, LEVEL_2, "\n}\n"));
-}  /* dump_curr */
+}
 
 #else
 static void dump_block_list(ldst_env *env)
@@ -216,14 +216,14 @@ static block_t *get_block_entry(const ir_node *block)
        assert(is_Block(block));
 
        return (block_t*)get_irn_link(block);
-}  /* get_block_entry */
+}
 
 /** Get the memop entry for a memory operation node */
 static memop_t *get_irn_memop(const ir_node *irn)
 {
        assert(! is_Block(irn));
        return (memop_t*)get_irn_link(irn);
-}  /* get_irn_memop */
+}
 
 /**
  * Walk over the memory edges from definition to users.
@@ -263,7 +263,7 @@ static void walk_memory(ir_node *irn, irg_walk_func *pre, irg_walk_func *post, v
        }
        if (post)
                post(irn, ctx);
-}  /* walk_memory */
+}
 
 /**
  * Walks over all memory nodes of a graph.
@@ -286,7 +286,7 @@ static void walk_memory_irg(ir_graph *irg, irg_walk_func pre, irg_walk_func post
        walk_memory(get_irg_initial_mem(irg), pre, post, ctx);
 
        ir_free_resources(irg, IR_RESOURCE_IRN_VISITED);
-}  /* walk_memory_irg */
+}
 
 /**
  * Register an address and allocate a (sparse, 0..n) ID for it.
@@ -325,7 +325,7 @@ restart:
 #endif
        }
        return entry->id;
-}  /* register_address */
+}
 
 
 /**
@@ -341,7 +341,7 @@ static ir_node *phi_translate(ir_node *address, const ir_node *block, int pos)
        if (is_Phi(address) && get_nodes_block(address) == block)
                address = get_Phi_pred(address, pos);
        return address;
-}  /* phi_translate */
+}
 
 /**
  * Walker: allocate an block entry for every block
@@ -388,7 +388,7 @@ static void prepare_blocks(ir_node *irn, void *ctx)
                        (void)register_address(irn);
                }
        }
-}  /* prepare_blocks */
+}
 
 /**
  * Post-Walker, link in all Phi's
@@ -401,7 +401,7 @@ static void link_phis(ir_node *irn, void *ctx)
                ir_node *block = get_nodes_block(irn);
                add_Block_phi(block, irn);
        }
-}  /* link_phis */
+}
 
 /**
  * Block walker: creates the inverse post-order list for the CFG.
@@ -422,7 +422,7 @@ static void inverse_post_order(ir_node *block, void *ctx)
        /* remember the first visited (last in list) entry, needed for later */
        if (env.backward == NULL)
                env.backward = entry;
-}  /* inverse_post_order */
+}
 
 /**
  * Block walker: create backward links for the memops of a block.
@@ -453,7 +453,7 @@ static void collect_backward(ir_node *block, void *ctx)
                last     = op;
        }
        entry->memop_backward = last;
-}  /* collect_backward */
+}
 
 /**
  * Allocate a memop.
@@ -482,7 +482,7 @@ static memop_t *alloc_memop(ir_node *irn)
        if (irn != NULL)
                set_irn_link(irn, m);
        return m;
-}  /* alloc_memop */
+}
 
 /**
  * Create a memop for a Phi-replacement.
@@ -504,7 +504,7 @@ static memop_t *clone_memop_phi(memop_t *op, ir_node *phi)
 
        set_irn_link(phi, m);
        return m;
-}  /* clone_memop_phi */
+}
 
 /**
  * Return the memory properties of a call node.
@@ -530,7 +530,7 @@ static unsigned get_Call_memory_properties(ir_node *call)
                }
        }
        return prop & (mtp_property_const|mtp_property_pure);
-}  /* get_Call_memory_properties */
+}
 
 /**
  * Returns an entity if the address ptr points to a constant one.
@@ -618,7 +618,7 @@ static ir_entity *find_constant_entity(ir_node *ptr)
                } else
                        return NULL;
        }
-}  /* find_constant_entity */
+}
 
 /**
  * Return the Selection index of a Sel node from dimension n
@@ -628,7 +628,7 @@ static long get_Sel_array_index_long(ir_node *n, int dim)
        ir_node *index = get_Sel_index(n, dim);
        assert(is_Const(index));
        return get_tarval_long(get_Const_tarval(index));
-}  /* get_Sel_array_index_long */
+}
 
 typedef struct path_entry {
        ir_entity         *ent;
@@ -811,12 +811,12 @@ ptr_arith:
                goto ptr_arith;
        }
        return NULL;
-}  /* rec_find_compound_ent_value */
+}
 
 static ir_node *find_compound_ent_value(ir_node *ptr)
 {
        return rec_find_compound_ent_value(ptr, NULL);
-}  /* find_compound_ent_value */
+}
 
 /**
  * Mark a Load memop to be replace by a definition
@@ -828,7 +828,7 @@ static void mark_replace_load(memop_t *op, ir_node *def)
        op->replace = def;
        op->flags |= FLAG_KILLED_NODE;
        env.changed = 1;
-}  /* mark_replace_load */
+}
 
 /**
  * Mark a Store memop to be removed.
@@ -839,7 +839,7 @@ static void mark_remove_store(memop_t *op)
 {
        op->flags |= FLAG_KILLED_NODE;
        env.changed = 1;
-}  /* mark_remove_store */
+}
 
 /**
  * Update a memop for a Load.
@@ -934,7 +934,7 @@ static void update_Load_memop(memop_t *m)
                /* no user, KILL it */
                mark_replace_load(m, NULL);
        }
-}  /* update_Load_memop */
+}
 
 /**
  * Update a memop for a Store.
@@ -981,7 +981,7 @@ static void update_Store_memop(memop_t *m)
        }
        m->value.value = get_Store_value(store);
        m->value.mode  = get_irn_mode(m->value.value);
-}  /* update_Store_memop */
+}
 
 /**
  * Update a memop for a Call.
@@ -1018,7 +1018,7 @@ static void update_Call_memop(memop_t *m)
                        break;
                }
        }
-}  /* update_Call_memop */
+}
 
 /**
  * Update a memop for a Div/Mod.
@@ -1078,7 +1078,7 @@ static void update_Phi_memop(memop_t *m)
 {
        /* the Phi is its own mem */
        m->mem = m->node;
-}  /* update_Phi_memop */
+}
 
 /**
  * Memory walker: collect all memory ops and build topological lists.
@@ -1154,7 +1154,7 @@ static void collect_memops(ir_node *irn, void *ctx)
                        entry->memop_backward       = op;
                }
        }
-}  /* collect_memops */
+}
 
 /**
  * Find an address in the current set.
@@ -1179,7 +1179,7 @@ static memop_t *find_address(const value_t *value)
                        return res;
        }
        return NULL;
-}  /* find_address */
+}
 
 /**
  * Find an address in the avail_out set.
@@ -1200,7 +1200,7 @@ static memop_t *find_address_avail(const block_t *bl, unsigned id, const ir_mode
                        return res;
        }
        return NULL;
-}  /* find_address_avail */
+}
 
 /**
  * Kill all addresses from the current set.
@@ -1211,7 +1211,7 @@ static void kill_all(void)
 
        /* set sentinel */
        rbitset_set(env.curr_set, env.rbs_size - 1);
-}  /* kill_all */
+}
 
 /**
  * Kill memops that are not alias free due to a Store value from the current set.
@@ -1233,7 +1233,7 @@ static void kill_memops(const value_t *value)
                        DB((dbg, LEVEL_2, "KILLING %+F because of possible alias address %+F\n", op->node, value->address));
                }
        }
-}  /* kill_memops */
+}
 
 /**
  * Add the value of a memop to the current set.
@@ -1244,7 +1244,7 @@ static void add_memop(memop_t *op)
 {
        rbitset_set(env.curr_set, op->value.id);
        env.curr_id_2_memop[op->value.id] = op;
-}  /* add_memop */
+}
 
 /**
  * Add the value of a memop to the avail_out set.
@@ -1256,7 +1256,7 @@ static void add_memop_avail(block_t *bl, memop_t *op)
 {
        rbitset_set(bl->avail_out, op->value.id);
        bl->id_2_memop_avail[op->value.id] = op;
-}  /* add_memop_avail */
+}
 
 /**
  * Check, if we can convert a value of one mode to another mode
@@ -1272,7 +1272,7 @@ static int can_convert_to(const ir_mode *from, const ir_mode *to)
            get_mode_size_bits(from) == get_mode_size_bits(to))
                return 1;
        return 0;
-}  /* can_convert_to */
+}
 
 /**
  * Add a Conv to the requested mode if needed.
@@ -1296,7 +1296,7 @@ static ir_node *conv_to(ir_node *irn, ir_mode *mode)
                return NULL;
        }
        return irn;
-}  /* conv_to */
+}
 
 /**
  * Update the address of an value if this address was a load result
@@ -1316,7 +1316,7 @@ static void update_address(value_t *value)
                                value->address = op->replace;
                }
        }
-}  /* update_address */
+}
 
 /**
  * Do forward dataflow analysis on the given block and calculate the
@@ -1404,7 +1404,7 @@ static void calc_gen_kill_avail(block_t *bl)
                                kill_all();
                }
        }
-}  /* calc_gen_kill_avail */
+}
 
 #define BYTE_SIZE(x)  (((x) + 7) >> 3)
 
@@ -1422,7 +1422,7 @@ static void forward_avail(block_t *bl)
 
        calc_gen_kill_avail(bl);
        dump_curr(bl, "Avail_out");
-}  /* forward_avail */
+}
 
 /**
  * Do backward dataflow analysis on a given block to calculate the antic set
@@ -1546,7 +1546,7 @@ static int backward_antic(block_t *bl)
        }
        dump_curr(bl, "AnticL_in");
        return 0;
-}  /* backward_antic */
+}
 
 /**
  * Replace a Load memop by a already known value.
@@ -1595,7 +1595,7 @@ static void replace_load(memop_t *op)
        if (proj != NULL) {
                exchange(proj, new_r_Jmp(get_nodes_block(load)));
        }
-}  /* replace_load */
+}
 
 /**
  * Remove a Store memop.
@@ -1622,7 +1622,7 @@ static void remove_store(memop_t *op)
        if (proj != NULL) {
                exchange(proj, new_r_Jmp(get_nodes_block(store)));
        }
-}  /* remove_store */
+}
 
 
 /**
@@ -1646,7 +1646,7 @@ static void do_replacements(block_t *bl)
                        }
                }
        }
-}  /* do_replacements */
+}
 
 /**
  * Calculate the Avail_out sets for all basic blocks.
@@ -1668,7 +1668,7 @@ static void calcAvail(void)
        /* restore the current sets */
        env.curr_id_2_memop = tmp_memop;
        env.curr_set        = tmp_set;
-}  /* calcAvail */
+}
 
 /**
  * Calculate the Antic_in sets for all basic blocks.
@@ -1694,7 +1694,7 @@ static void calcAntic(void)
                ++i;
        } while (need_iter);
        DB((dbg, LEVEL_2, "Get anticipated Load set after %d iterations\n", i));
-}  /* calcAntic */
+}
 
 /**
  * Return the node representing the last memory in a block.
@@ -1710,7 +1710,7 @@ static ir_node *find_last_memory(block_t *bl)
                /* if there is NO memory in this block, go to the dominator */
                bl = get_block_entry(get_Block_idom(bl->block));
        }
-}  /* find_last_memory */
+}
 
 /**
  * Reroute all memory users of old memory
@@ -1730,7 +1730,7 @@ static void reroute_all_mem_users(ir_node *omem, ir_node *nmem)
 
        /* all edges previously point to omem now point to nmem */
        nmem->o.out = omem->o.out;
-}  /* reroute_all_mem_users */
+}
 
 /**
  * Reroute memory users of old memory that are dominated by a given block
@@ -1771,7 +1771,7 @@ static void reroute_mem_through(ir_node *omem, ir_node *nmem, ir_node *pass_bl)
           edges at the end either. */
        /* first entry is used for the length */
        nmem->o.out = new_out;
-}  /* reroute_mem_through */
+}
 
 /**
  * insert Loads, making partly redundant Loads fully redundant
@@ -2020,7 +2020,7 @@ static int insert_Load(block_t *bl)
        }
        dump_curr(bl, "Avail_out");
        return 0;
-}  /* insert_Load */
+}
 
 /**
  * Insert Loads upwards.
@@ -2047,7 +2047,7 @@ static void insert_Loads_upwards(void)
        } while (need_iter);
 
        DB((dbg, LEVEL_2, "Finished Load inserting after %d iterations\n", i));
-}  /* insert_Loads_upwards */
+}
 
 void opt_ldst(ir_graph *irg)
 {
@@ -2181,9 +2181,9 @@ no_changes:
 #ifdef DEBUG_libfirm
        DEL_ARR_F(env.id_2_address);
 #endif
-}  /* opt_ldst */
+}
 
 ir_graph_pass_t *opt_ldst_pass(const char *name)
 {
        return def_graph_pass(name ? name : "ldst_df", opt_ldst);
-}  /* opt_ldst_pass */
+}
index 3175ca9..380973d 100644 (file)
@@ -126,7 +126,7 @@ static int LFTR_cmp(const void *e1, const void *e2, size_t size)
        (void) size;
 
        return l1->src != l2->src;
-}  /* LFTR_cmp */
+}
 
 /**
  * Find a LFTR edge.
@@ -140,7 +140,7 @@ static LFTR_edge *LFTR_find(ir_node *src, iv_env *env)
        key.src  = src;
 
        return set_find(LFTR_edge, env->lftr_edges, &key, sizeof(key), hash_ptr(src));
-}  /* LFTR_find */
+}
 
 /**
  * Add a LFTR edge.
@@ -165,7 +165,7 @@ static void LFTR_add(ir_node *src, ir_node *dst, unsigned code, ir_node *rc, iv_
         * because we currently store only one.
         */
        (void)set_insert(LFTR_edge, env->lftr_edges, &key, sizeof(key), hash_ptr(src));
-}  /* LFTR_add */
+}
 
 /**
  * Gets the node_entry of a node.
@@ -182,7 +182,7 @@ static node_entry *get_irn_ne(ir_node *irn, iv_env *env)
                set_irn_link(irn, e);
        }
        return e;
-}  /* get_irn_ne */
+}
 
 /**
  * Gets the scc from an induction variable.
@@ -194,7 +194,7 @@ static scc *get_iv_scc(ir_node *iv, iv_env *env)
 {
        node_entry *e = get_irn_ne(iv, env);
        return e->pscc;
-}  /* get_iv_scc */
+}
 
 /**
  * Check if irn is an IV.
@@ -207,7 +207,7 @@ static scc *get_iv_scc(ir_node *iv, iv_env *env)
 static ir_node *is_iv(ir_node *irn, iv_env *env)
 {
        return get_irn_ne(irn, env)->header;
-}  /* is_iv */
+}
 
 /**
  * Check if irn is a region constant.
@@ -221,7 +221,7 @@ static int is_rc(ir_node *irn, ir_node *header_block)
        ir_node *block = get_nodes_block(irn);
 
        return (block != header_block) && block_dominates(block, header_block);
-}  /* is_rc */
+}
 
 /**
  * Set compare function for the quad set.
@@ -233,7 +233,7 @@ static int quad_cmp(const void *e1, const void *e2, size_t size)
        (void) size;
 
        return c1->code != c2->code || c1->op1 != c2->op1 || c1->op2 != c2->op2;
-}  /* quad_cmp */
+}
 
 /**
  * Check if an reduced operation was already calculated.
@@ -257,7 +257,7 @@ static ir_node *search(unsigned code, ir_node *op1, ir_node *op2, iv_env *env)
        if (entry)
                return entry->res;
        return NULL;
-}  /* search */
+}
 
 /**
  * Add an reduced operation.
@@ -278,7 +278,7 @@ static void add(unsigned code, ir_node *op1, ir_node *op2, ir_node *result, iv_e
        key.res  = result;
 
        (void)set_insert(quadruple_t, env->quad_map, &key, sizeof(key), (code * 9) ^ hash_ptr(op1) ^ hash_ptr(op2));
-}  /* add */
+}
 
 /**
  * Find a location where to place a bin-op whose operands are in
@@ -297,7 +297,7 @@ static ir_node *find_location(ir_node *block1, ir_node *block2)
                return block2;
        assert(block_dominates(block2, block1));
        return block1;
-}  /* find_location */
+}
 
 /**
  * Create a node that executes an op1 code op1 operation.
@@ -329,7 +329,7 @@ static ir_node *do_apply(unsigned code, dbg_info *db, ir_node *op1, ir_node *op2
                panic("Unsupported opcode");
        }
        return result;
-}  /* do_apply */
+}
 
 /**
  * The Apply operation.
@@ -364,7 +364,7 @@ static ir_node *apply(ir_node *header, ir_node *orig, ir_node *op1, ir_node *op2
                }
        }
        return result;
-}  /* apply */
+}
 
 /**
  * The Reduce operation.
@@ -428,7 +428,7 @@ static ir_node *reduce(ir_node *orig, ir_node *iv, ir_node *rc, iv_env *env)
                        get_irn_opname(orig), rc));
        }
        return result;
-}  /* reduce */
+}
 
 /**
  * Update the scc for a newly created IV.
@@ -465,7 +465,7 @@ static void update_scc(ir_node *iv, node_entry *e, iv_env *env)
        } while (! waitq_empty(wq));
        del_waitq(wq);
        DB((dbg, LEVEL_2, "\n"));
-}  /* update_scc */
+}
 
 /**
  * The Replace operation. We found a node representing iv (+,-,*) rc
@@ -498,7 +498,7 @@ static int replace(ir_node *irn, ir_node *iv, ir_node *rc, iv_env *env)
                return 1;
        }
        return 0;
-}  /* replace */
+}
 
 #if 0
 /**
@@ -526,7 +526,7 @@ static int is_x86_shift_const(ir_node *mul)
                }
        }
        return 0;
-}  /* is_x86_shift_const */
+}
 #endif
 
 /**
@@ -593,7 +593,7 @@ static int is_counter_iv(ir_node *iv, iv_env *env)
        pscc->incr = get_Const_tarval(have_incr);
        pscc->code = code;
        return code != iro_Bad;
-}  /* is_counter_iv */
+}
 
 /**
  * Check the users of an induction variable for register pressure.
@@ -664,7 +664,7 @@ static int check_users_for_reg_pressure(ir_node *iv, iv_env *env)
         * to do a linear function test replacement, so go on.
         */
        return 1;
-}  /* check_users_for_reg_pressure */
+}
 
 /**
  * Check if a node can be replaced (+, -, *).
@@ -712,7 +712,7 @@ static int check_replace(ir_node *irn, iv_env *env)
                break;
        }
        return 0;
-}  /* check_replace */
+}
 
 /**
  * Check which SCC's are induction variables.
@@ -836,7 +836,7 @@ fail:
                next = e->next;
                e->header = NULL;
        }
-}  /* classify_iv */
+}
 
 /**
  * Process an SCC for the operator strength reduction.
@@ -871,7 +871,7 @@ static void process_scc(scc *pscc, iv_env *env)
        } else {
                classify_iv(pscc, env);
        }
-}  /* process_scc */
+}
 
 /**
  * If an SCC is a Phi only cycle, remove it.
@@ -918,7 +918,7 @@ static void remove_phi_cycle(scc *pscc, iv_env *env)
                exchange(irn, out_rc);
        }
        ++env->replaced;
-}  /* remove_phi_cycle */
+}
 
 /**
  * Process a SCC for the Phi cycle remove.
@@ -949,7 +949,7 @@ static void process_phi_only_scc(scc *pscc, iv_env *env)
 
        if (e->next != NULL)
                remove_phi_cycle(pscc, env);
-}  /* process_phi_only_scc */
+}
 
 
 /**
@@ -969,7 +969,7 @@ static void push(iv_env *env, ir_node *n)
        env->stack[env->tos++] = n;
        e = get_irn_ne(n, env);
        e->in_stack = 1;
-}  /* push */
+}
 
 /**
  * Pop a node from the stack.
@@ -985,7 +985,7 @@ static ir_node *pop(iv_env *env)
 
        e->in_stack = 0;
        return n;
-}  /* pop */
+}
 
 /**
  * Do Tarjan's SCC algorithm and drive OSR.
@@ -1049,7 +1049,7 @@ static void dfs(ir_node *irn, iv_env *env)
                        env->process_scc(pscc, env);
                }
        }
-}  /* dfs */
+}
 
 /**
  * Do the DFS by starting at the End node of a graph.
@@ -1078,7 +1078,7 @@ static void do_dfs(ir_graph *irg, iv_env *env)
        }
 
        ir_free_resources(irg, IR_RESOURCE_IRN_VISITED);
-}  /* do_dfs */
+}
 
 /**
  * Post-block-walker: assign the post-order number.
@@ -1089,7 +1089,7 @@ static void assign_po(ir_node *block, void *ctx)
        node_entry *e = get_irn_ne(block, env);
 
        e->POnum = env->POnum++;
-}  /* assign_po */
+}
 
 /**
  * Apply one LFTR edge operation.
@@ -1192,7 +1192,7 @@ static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
                return new_r_Const(irg, tv);
        }
        return do_apply(e->code, NULL, rc, e->rc, get_irn_mode(e->dst));
-}  /* applyOneEdge */
+}
 
 /**
  * Applies the operations represented by the LFTR edges to a
@@ -1235,7 +1235,7 @@ static ir_node *applyEdges(ir_node **pIV, ir_node *rc, iv_env *env)
        DB((dbg, LEVEL_3, "\n"));
        *pIV = iv;
        return rc;
-}  /* applyEdges */
+}
 
 /**
  * Walker, finds Cmp(iv, rc) or Cmp(rc, iv)
@@ -1275,7 +1275,7 @@ static void do_lftr(ir_node *cmp, void *ctx)
                set_Cmp_right(cmp, nright);
                ++env->lftr_replaced;
        }
-}  /* do_lftr */
+}
 
 /**
  * do linear function test replacement.
@@ -1286,7 +1286,7 @@ static void do_lftr(ir_node *cmp, void *ctx)
 static void lftr(ir_graph *irg, iv_env *env)
 {
        irg_walk_graph(irg, NULL, do_lftr, env);
-}  /* lftr */
+}
 
 /* Remove any Phi cycles with only one real input. */
 void remove_phi_cycles(ir_graph *irg)
@@ -1343,7 +1343,7 @@ void remove_phi_cycles(ir_graph *irg)
 ir_graph_pass_t *remove_phi_cycles_pass(const char *name)
 {
        return def_graph_pass(name ? name : "remove_phi_cycles", remove_phi_cycles);
-}  /* remove_phi_cycles_pass */
+}
 
 /**
  * Post-walker: fix Add and Sub nodes that where results of I<->P conversions.
@@ -1411,7 +1411,7 @@ static void fix_adds_and_subs(ir_node *irn, void *ctx)
                        }
                }
        }
-}  /* fix_adds_and_subs */
+}
 
 /* Performs Operator Strength Reduction for the passed graph. */
 void opt_osr(ir_graph *irg, unsigned flags)
@@ -1485,7 +1485,7 @@ static int pass_wrapper(ir_graph *irg, void *context)
        pass_t *pass = (pass_t*)context;
        opt_osr(irg, pass->flags);
        return 0;
-}  /* pass_wrapper */
+}
 
 ir_graph_pass_t *opt_osr_pass(const char *name, unsigned flags)
 {
@@ -1494,4 +1494,4 @@ ir_graph_pass_t *opt_osr_pass(const char *name, unsigned flags)
        pass->flags = flags;
        return def_graph_pass_constructor(
                &pass->pass, name ? name : "osr", pass_wrapper);
-}  /* opt_osr_pass */
+}
index dee0384..d809ba8 100644 (file)
@@ -76,7 +76,7 @@ static const_class_t get_const_class(const ir_node *n, const ir_node *block)
                return REGION_CONST;
 
        return NO_CONSTANT;
-}  /* get_const_class */
+}
 
 /**
  * returns the operands of a commutative bin-op, if one operand is
@@ -119,7 +119,7 @@ static void get_comm_Binop_ops(ir_node *binop, ir_node **a, ir_node **c)
                *c = op_b;
                break;
        }
-}  /* get_comm_Binop_ops */
+}
 
 /**
  * reassociate a Sub: x - c = x + (-c)
@@ -181,7 +181,7 @@ static int reassoc_Sub(ir_node **in)
                return 1;
        }
        return 0;
-}  /* reassoc_Sub */
+}
 
 /** Retrieve a mode from the operands. We need this, because
  * Add and Sub are allowed to operate on (P, Is)
@@ -201,7 +201,7 @@ static ir_mode *get_mode_from_ops(ir_node *op1, ir_node *op2)
        assert(m1 == m2);
 
        return m1;
-}  /* get_mode_from_ops */
+}
 
 /**
  * reassociate a commutative Binop
@@ -349,7 +349,7 @@ static int reassoc_commutative(ir_node **node)
                }
        }
        return 0;
-}  /* reassoc_commutative */
+}
 
 #define reassoc_Add  reassoc_commutative
 #define reassoc_And  reassoc_commutative
@@ -408,7 +408,7 @@ static int reassoc_Mul(ir_node **node)
                }
        }
        return 0;
-}  /* reassoc_Mul */
+}
 
 /**
  * Reassociate Shl. We transform Shl(x, const) into Mul's if possible.
@@ -445,7 +445,7 @@ static int reassoc_Shl(ir_node **node)
                return 1;
        }
        return 0;
-}  /* reassoc_Shl */
+}
 
 /**
  * The walker for the reassociation.
@@ -459,7 +459,7 @@ static void wq_walker(ir_node *n, void *env)
                waitq_put(wq, n);
                set_irn_link(n, wq);
        }
-}  /* wq_walker */
+}
 
 /**
  * The walker for the reassociation.
@@ -506,7 +506,7 @@ static void do_reassociation(waitq *const wq)
                        }
                }
        }
-}  /* do_reassociation */
+}
 
 /**
  * Returns the earliest were a,b are available.
@@ -529,7 +529,7 @@ static ir_node *earliest_block(ir_node *a, ir_node *b, ir_node *curr_blk)
        if (res == get_irg_start_block(get_irn_irg(curr_blk)))
                return curr_blk;
        return res;
-}  /* earliest_block */
+}
 
 /**
  * Checks whether a node is a Constant expression.
@@ -560,7 +560,7 @@ static int is_constant_expr(ir_node *irn)
        default:
                return 0;
        }
-}  /* is_constant_expr */
+}
 
 /**
  * Apply distributive Law for Mul and Add/Sub
@@ -643,7 +643,7 @@ transform:
        exchange(n, irn);
        *node = irn;
        return 1;
-}  /* reverse_rule_distributive */
+}
 
 /**
  * Move Constants towards the root.
@@ -747,7 +747,7 @@ transform:
        exchange(n, irn);
        *node = irn;
        return 1;
-}  /* move_consts_up */
+}
 
 /**
  * Apply the rules in reverse order, removing code that was not collapsed
@@ -807,13 +807,13 @@ void optimize_reassociation(ir_graph *irg)
        del_waitq(wq);
 
        confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_CONTROL_FLOW);
-}  /* optimize_reassociation */
+}
 
 /* create a pass for the reassociation */
 ir_graph_pass_t *optimize_reassociation_pass(const char *name)
 {
        return def_graph_pass(name ? name : "reassoc", optimize_reassociation);
-}  /* optimize_reassociation_pass */
+}
 
 static void register_node_reassoc_func(ir_op *op, reassociate_func func)
 {
@@ -835,4 +835,4 @@ void ir_register_reassoc_node_ops(void)
 void firm_init_reassociation(void)
 {
        FIRM_DBG_REGISTER(dbg, "firm.opt.reassoc");
-}  /* firm_init_reassociation */
+}
index ff6f177..a6a4c2a 100644 (file)
@@ -84,9 +84,9 @@ static dag_entry_t *get_irn_dag_entry(const ir_node *n)
                        /* hacky cast to ir_node* */
                        set_irn_link((ir_node*)n, p);
                }
-       }  /* if */
+       }
        return p;
-}  /* get_irn_dag_entry */
+}
 
 #define set_irn_dag_entry(n, e) set_irn_link(n, e)
 
@@ -104,7 +104,7 @@ static int is_arg(ir_node *node)
 
        node = get_Proj_pred(node);
        return is_Start(node);
-}  /* is_arg */
+}
 
 /**
  * Allocate a new DAG entry.
@@ -128,7 +128,7 @@ static dag_entry_t *new_dag_entry(dag_env_t *dag_env, ir_node *node)
 
        set_irn_dag_entry(node, entry);
        return entry;
-}  /* new_dag_entry */
+}
 
 /**
  * Post-walker to detect DAG roots that are referenced form other blocks
@@ -162,7 +162,7 @@ static void find_dag_roots(ir_node *node, void *env)
                                if (dag_env->options & FIRMSTAT_COPY_CONSTANTS) {
                                        if (is_irn_constlike(prev))
                                                continue;
-                               }  /* if */
+                               }
 
                                entry = get_irn_dag_entry(prev);
 
@@ -170,9 +170,9 @@ static void find_dag_roots(ir_node *node, void *env)
                                        /* found an unassigned node, a new root */
                                        entry = new_dag_entry(dag_env, node);
                                        entry->is_ext_ref = 1;
-                               }  /* if */
-                       }  /* for */
-               }  /* if */
+                               }
+                       }
+               }
        } else {
 
                for (i = 0, arity = get_irn_arity(node); i < arity; ++i) {
@@ -188,7 +188,7 @@ static void find_dag_roots(ir_node *node, void *env)
                                if (dag_env->options & FIRMSTAT_COPY_CONSTANTS) {
                                        if (is_irn_constlike(prev))
                                                continue;
-                               }  /* if */
+                               }
 
                                if (get_nodes_block(prev) != block) {
                                        /* The predecessor is from another block. It forms
@@ -198,11 +198,11 @@ static void find_dag_roots(ir_node *node, void *env)
                                                /* found an unassigned node, a new root */
                                                entry = new_dag_entry(dag_env, node);
                                                entry->is_ext_ref = 1;
-                                       }  /* if */
-                               }  /* if */
-                       }  /* for */
-       }  /* if */
-}  /* find_dag_roots */
+                                       }
+                               }
+                       }
+       }
+}
 
 /**
  * Pre-walker for connecting DAGs and counting.
@@ -236,7 +236,7 @@ static void connect_dags(ir_node *node, void *env)
        if (mode == mode_X || mode == mode_M) {
                /* do NOT count mode_X and mode_M nodes */
                return;
-       }  /* if */
+       }
 
        /* if this option is set, Loads are always leaves */
        if (dag_env->options & FIRMSTAT_LOAD_IS_LEAVE && is_Load(node))
@@ -250,7 +250,7 @@ static void connect_dags(ir_node *node, void *env)
        if (! entry) {
                /* found an unassigned node, maybe a new root */
                entry = new_dag_entry(dag_env, node);
-       }  /* if */
+       }
 
        /* put the predecessors into the same DAG as the current */
        for (i = 0, arity = get_irn_arity(node); i < arity; ++i) {
@@ -272,8 +272,8 @@ static void connect_dags(ir_node *node, void *env)
                        if (is_irn_constlike(prev)) {
                                ++entry->num_nodes;
                                ++entry->num_inner_nodes;
-                       }  /* if */
-               }  /* if */
+                       }
+               }
 
                /* only nodes from the same block goes into the DAG */
                if (get_nodes_block(prev) == block) {
@@ -301,11 +301,11 @@ static void connect_dags(ir_node *node, void *env)
 
                                        prev_entry->is_dead = 1;
                                        prev_entry->link    = entry;
-                               }  /* if */
-                       }  /* if */
-               }  /* if */
-       }  /* for */
-}  /* connect_dags */
+                               }
+                       }
+               }
+       }
+}
 
 #define DEFAULT_RET     1
 #define COLOR_RET       1
@@ -331,7 +331,7 @@ static int stat_dag_mark_hook(FILE *F, const ir_node *n, const ir_node *l)
 
                if (mark_options & FIRMSTAT_CALL_IS_LEAVE && is_Call(n))
                        return DEFAULT_RET;
-       }  /* if */
+       }
 
        entry = get_irn_dag_entry(n);
        if (! entry)
@@ -341,7 +341,7 @@ static int stat_dag_mark_hook(FILE *F, const ir_node *n, const ir_node *l)
 
        /* I know the color! */
        return COLOR_RET;
-}  /* stat_dag_mark_hook */
+}
 
 /**
  * count the DAG's size of a graph
@@ -388,7 +388,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph)
                        entry->num_inner_nodes,
                        (unsigned)entry->is_tree,
                        get_irn_node_nr(entry->root));
-       }  /* for */
+       }
 
 #if 1
        /* dump for test */
@@ -401,4 +401,4 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph)
        assert(id == root_env.num_of_dags);
 
        obstack_free(&root_env.obst, NULL);
-}  /* count_dags_in_graph */
+}
index 0d12ddb..0e50be5 100644 (file)
@@ -104,7 +104,7 @@ static int opcode_cmp(const void *elt, const void *key)
        const node_entry_t *e2 = (const node_entry_t*)key;
 
        return e1->op->code - e2->op->code;
-}  /* opcode_cmp */
+}
 
 /**
  * Compare two elements of the graph hash.
@@ -115,7 +115,7 @@ static int graph_cmp(const void *elt, const void *key)
        const graph_entry_t *e2 = (const graph_entry_t*)key;
 
        return e1->irg != e2->irg;
-}  /* graph_cmp */
+}
 
 /**
  * Compare two elements of the optimization hash.
@@ -126,7 +126,7 @@ static int opt_cmp(const void *elt, const void *key)
        const opt_entry_t *e2 = (const opt_entry_t*)key;
 
        return e1->op->code != e2->op->code;
-}  /* opt_cmp */
+}
 
 /**
  * Compare two elements of the block hash.
@@ -138,7 +138,7 @@ static int block_cmp(const void *elt, const void *key)
 
        /* it's enough to compare the block number */
        return e1->block_nr != e2->block_nr;
-}  /* block_cmp */
+}
 
 /**
  * Compare two elements of the be_block hash.
@@ -149,7 +149,7 @@ static int be_block_cmp(const void *elt, const void *key)
        const be_block_entry_t *e2 = (const be_block_entry_t*)key;
 
        return e1->block_nr != e2->block_nr;
-}  /* be_block_cmp */
+}
 
 /**
  * Compare two elements of reg pressure hash.
@@ -160,7 +160,7 @@ static int reg_pressure_cmp(const void *elt, const void *key)
        const reg_pressure_entry_t *e2 = (const reg_pressure_entry_t*)key;
 
        return e1->class_name != e2->class_name;
-}  /* reg_pressure_cmp */
+}
 
 /**
  * Compare two elements of the perm_stat hash.
@@ -171,7 +171,7 @@ static int perm_stat_cmp(const void *elt, const void *key)
        const perm_stat_entry_t *e2 = (const perm_stat_entry_t*)key;
 
        return e1->perm != e2->perm;
-}  /* perm_stat_cmp */
+}
 
 /**
  * Compare two elements of the perm_class hash.
@@ -182,7 +182,7 @@ static int perm_class_cmp(const void *elt, const void *key)
        const perm_class_entry_t *e2 = (const perm_class_entry_t*)key;
 
        return e1->class_name != e2->class_name;
-}  /* perm_class_cmp */
+}
 
 /**
  * Compare two elements of the ir_op hash.
@@ -193,7 +193,7 @@ static int opcode_cmp_2(const void *elt, const void *key)
        const ir_op *e2 = (const ir_op*)key;
 
        return e1->code != e2->code;
-}  /* opcode_cmp_2 */
+}
 
 /**
  * Compare two elements of the address_mark set.
@@ -206,7 +206,7 @@ static int address_mark_cmp(const void *elt, const void *key, size_t size)
 
        /* compare only the nodes, the rest is used as data container */
        return e1->node != e2->node;
-}  /* address_mark_cmp */
+}
 
 /**
  * Clear all counter in a node_entry_t.
@@ -217,7 +217,7 @@ static void opcode_clear_entry(node_entry_t *elem)
        cnt_clr(&elem->new_node);
        cnt_clr(&elem->into_Id);
        cnt_clr(&elem->normalized);
-}  /* opcode_clear_entry */
+}
 
 /**
  * Returns the associates node_entry_t for an ir_op (and allocates
@@ -245,7 +245,7 @@ static node_entry_t *opcode_get_entry(const ir_op *op, hmap_node_entry_t *hmap)
        elem->op = op;
 
        return (node_entry_t*)pset_insert(hmap, elem, op->code);
-}  /* opcode_get_entry */
+}
 
 /**
  * Returns the associates ir_op for an opcode
@@ -259,7 +259,7 @@ static ir_op *opcode_find_entry(ir_opcode code, hmap_ir_op *hmap)
 
        key.code = code;
        return (ir_op*)pset_find(hmap, &key, code);
-}  /* opcode_find_entry */
+}
 
 /**
  * Clears all counter in a graph_entry_t.
@@ -274,16 +274,16 @@ static void graph_clear_entry(graph_entry_t *elem, int all)
        /* clear accumulated / non-accumulated counter */
        for (i = all ? 0 : _gcnt_non_acc; i < _gcnt_last; ++i) {
                cnt_clr(&elem->cnt[i]);
-       }  /* for */
+       }
 
        if (elem->block_hash) {
                del_pset(elem->block_hash);
                elem->block_hash = NULL;
-       }  /* if */
+       }
 
        obstack_free(&elem->recalc_cnts, NULL);
        obstack_init(&elem->recalc_cnts);
-}  /* graph_clear_entry */
+}
 
 /**
  * Returns the associated graph_entry_t for an IR graph.
@@ -307,7 +307,7 @@ static graph_entry_t *graph_get_entry(ir_graph *irg, hmap_graph_entry_t *hmap)
                        elem->be_block_hash = new_pset(be_block_cmp, 5);
 
                return elem;
-       }  /* if */
+       }
 
        /* allocate a new one */
        elem = OALLOCZ(&status->cnts, graph_entry_t);
@@ -328,7 +328,7 @@ static graph_entry_t *graph_get_entry(ir_graph *irg, hmap_graph_entry_t *hmap)
                elem->opt_hash[i] = new_pset(opt_cmp, 4);
 
        return (graph_entry_t*)pset_insert(hmap, elem, hash_ptr(irg));
-}  /* graph_get_entry */
+}
 
 /**
  * Clear all counter in an opt_entry_t.
@@ -336,7 +336,7 @@ static graph_entry_t *graph_get_entry(ir_graph *irg, hmap_graph_entry_t *hmap)
 static void opt_clear_entry(opt_entry_t *elem)
 {
        cnt_clr(&elem->count);
-}  /* opt_clear_entry */
+}
 
 /**
  * Returns the associated opt_entry_t for an IR operation.
@@ -363,7 +363,7 @@ static opt_entry_t *opt_get_entry(const ir_op *op, hmap_opt_entry_t *hmap)
        elem->op = op;
 
        return (opt_entry_t*)pset_insert(hmap, elem, op->code);
-}  /* opt_get_entry */
+}
 
 /**
  * clears all counter in a block_entry_t
@@ -374,7 +374,7 @@ static void block_clear_entry(block_entry_t *elem)
 
        for (i = 0; i < _bcnt_last; ++i)
                cnt_clr(&elem->cnt[i]);
-}  /* block_clear_entry */
+}
 
 /**
  * Returns the associated block_entry_t for an block.
@@ -401,7 +401,7 @@ static block_entry_t *block_get_entry(struct obstack *obst, long block_nr, hmap_
        elem->block_nr = block_nr;
 
        return (block_entry_t*)pset_insert(hmap, elem, block_nr);
-}  /* block_get_entry */
+}
 
 /**
  * Clear all sets in be_block_entry_t.
@@ -420,7 +420,7 @@ static void be_block_clear_entry(be_block_entry_t *elem)
        elem->reg_pressure    = new_pset(reg_pressure_cmp, 5);
        elem->sched_ready     = stat_new_int_distrib_tbl();
        elem->perm_class_stat = new_pset(perm_class_cmp, 5);
-}  /* be_block_clear_entry */
+}
 
 /**
  * Returns the associated be_block_entry_t for an block.
@@ -447,7 +447,7 @@ static be_block_entry_t *be_block_get_entry(struct obstack *obst, long block_nr,
        elem->block_nr = block_nr;
 
        return (be_block_entry_t*)pset_insert(hmap, elem, block_nr);
-}  /* be_block_get_entry */
+}
 
 /**
  * clears all sets in perm_class_entry_t
@@ -458,7 +458,7 @@ static void perm_class_clear_entry(perm_class_entry_t *elem)
                del_pset(elem->perm_stat);
 
        elem->perm_stat = new_pset(perm_stat_cmp, 5);
-}  /* perm_class_clear_entry */
+}
 
 /**
  * Returns the associated perm_class entry for a register class.
@@ -486,7 +486,7 @@ static perm_class_entry_t *perm_class_get_entry(struct obstack *obst, const char
        elem->class_name = class_name;
 
        return (perm_class_entry_t*)pset_insert(hmap, elem, hash_ptr(class_name));
-}  /* perm_class_get_entry */
+}
 
 /**
  * clears all sets in perm_stat_entry_t
@@ -501,7 +501,7 @@ static void perm_stat_clear_entry(perm_stat_entry_t *elem)
 
        elem->chains = stat_new_int_distrib_tbl();
        elem->cycles = stat_new_int_distrib_tbl();
-}  /* perm_stat_clear_entry */
+}
 
 /**
  * Returns the associated perm_stat entry for a perm.
@@ -528,7 +528,7 @@ static perm_stat_entry_t *perm_stat_get_entry(struct obstack *obst, ir_node *per
        elem->perm = perm;
 
        return (perm_stat_entry_t*)pset_insert(hmap, elem, hash_ptr(perm));
-}  /* perm_stat_get_entry */
+}
 
 /**
  * Clear optimizations counter,
@@ -559,31 +559,31 @@ static ir_op *stat_get_irn_op(ir_node *node)
                } else if (get_irn_mode(node) == mode_M) {
                        /* special case, a Memory Phi node, count on extra counter */
                        op = status->op_PhiM ? status->op_PhiM : op;
-               }  /* if */
+               }
                break;
        case iro_Proj:
                if (get_irn_mode(node) == mode_M) {
                        /* special case, a Memory Proj node, count on extra counter */
                        op = status->op_ProjM ? status->op_ProjM : op;
-               }  /* if */
+               }
                break;
        case iro_Mul:
                if (is_Const(get_Mul_left(node)) || is_Const(get_Mul_right(node))) {
                        /* special case, a Multiply by a const, count on extra counter */
                        op = status->op_MulC ? status->op_MulC : op;
-               }  /* if */
+               }
                break;
        case iro_Div:
                if (is_Const(get_Div_right(node))) {
                        /* special case, a division by a const, count on extra counter */
                        op = status->op_DivC ? status->op_DivC : op;
-               }  /* if */
+               }
                break;
        case iro_Mod:
                if (is_Const(get_Mod_right(node))) {
                        /* special case, a module by a const, count on extra counter */
                        op = status->op_ModC ? status->op_ModC : op;
-               }  /* if */
+               }
                break;
        case iro_Sel:
                if (is_Sel(get_Sel_ptr(node))) {
@@ -592,15 +592,15 @@ static ir_op *stat_get_irn_op(ir_node *node)
                        if (is_Sel(get_Sel_ptr(get_Sel_ptr(node)))) {
                                /* special case, a Sel of a Sel of a Sel, count on extra counter */
                                op = status->op_SelSelSel ? status->op_SelSelSel : op;
-                       }  /* if */
-               }  /* if */
+                       }
+               }
                break;
        default:
                break;
-       }  /* switch */
+       }
 
        return op;
-}  /* stat_get_irn_op */
+}
 
 /**
  * update the block counter
@@ -629,9 +629,9 @@ static void undate_block_info(ir_node *node, graph_entry_t *graph)
 
                        cnt_inc(&b_entry->cnt[bcnt_in_edges]);  /* an edge coming from another block */
                        cnt_inc(&b_entry_other->cnt[bcnt_out_edges]);
-               }  /* for */
+               }
                return;
-       }  /* if */
+       }
 
        block   = get_nodes_block(node);
        b_entry = block_get_entry(&graph->recalc_cnts, get_irn_node_nr(block), graph->block_hash);
@@ -639,7 +639,7 @@ static void undate_block_info(ir_node *node, graph_entry_t *graph)
        if (is_Phi(node) && mode_is_datab(get_irn_mode(node))) {
                /* count data Phi per block */
                cnt_inc(&b_entry->cnt[bcnt_phi_data]);
-       }  /* if */
+       }
 
        /* we have a new node in our block */
        cnt_inc(&b_entry->cnt[bcnt_nodes]);
@@ -663,9 +663,9 @@ static void undate_block_info(ir_node *node, graph_entry_t *graph)
 
                        cnt_inc(&b_entry->cnt[bcnt_in_edges]);  /* an edge coming from another block */
                        cnt_inc(&b_entry_other->cnt[bcnt_out_edges]);
-               }  /* if */
-       }  /* for */
-}  /* undate_block_info */
+               }
+       }
+}
 
 /**
  * Calculates how many arguments of the call are const, updates
@@ -692,7 +692,7 @@ static void analyse_params_of_Call(graph_entry_t *graph, ir_node *call)
                                ++num_local_adr;
                }
 
-       }  /* for */
+       }
 
        if (num_const_args > 0)
                cnt_inc(&graph->cnt[gcnt_call_with_cnst_arg]);
@@ -702,7 +702,7 @@ static void analyse_params_of_Call(graph_entry_t *graph, ir_node *call)
                cnt_inc(&graph->cnt[gcnt_call_with_local_adr]);
 
        stat_inc_int_distrib_tbl(status->dist_param_cnt, n);
-}  /* analyse_params_of_Call */
+}
 
 /**
  * Update info on calls.
@@ -741,14 +741,14 @@ static void stat_update_call(ir_node *call, graph_entry_t *graph)
                                graph->is_recursive = 1;
                        if (callee == NULL)
                                cnt_inc(&graph->cnt[gcnt_external_calls]);
-               }  /* if */
+               }
        } else {
                /* indirect call, be could not predict */
                cnt_inc(&graph->cnt[gcnt_indirect_calls]);
 
                /* NOT a leaf call */
                graph->is_leaf_call = LCS_NON_LEAF_CALL;
-       }  /* if */
+       }
 
        /* check, if it's a chain-call: Then, the call-block
         * must dominate the end block. */
@@ -761,7 +761,7 @@ static void stat_update_call(ir_node *call, graph_entry_t *graph)
 
                        if (! curr || !is_Block(curr))
                                break;
-               }  /* for */
+               }
 
                if (curr != block)
                        graph->is_chain_call = 0;
@@ -774,11 +774,11 @@ static void stat_update_call(ir_node *call, graph_entry_t *graph)
                if (called->is_analyzed) {
                        if (! called->is_leaf)
                                graph->is_leaf_call = LCS_NON_LEAF_CALL;
-               }  /* if */
-       }  /* if */
+               }
+       }
 
        analyse_params_of_Call(graph, call);
-}  /* stat_update_call */
+}
 
 /**
  * Update info on calls for graphs on the wait queue.
@@ -803,8 +803,8 @@ static void stat_update_call_2(ir_node *call, graph_entry_t *graph)
                        /* ok, we seems to know the entity */
                        ent = get_SymConst_entity(ptr);
                        callee = get_entity_irg(ent);
-               }  /* if */
-       }  /* if */
+               }
+       }
 
        /* check, if the callee is a leaf */
        if (callee) {
@@ -816,7 +816,7 @@ static void stat_update_call_2(ir_node *call, graph_entry_t *graph)
                        graph->is_leaf_call = LCS_NON_LEAF_CALL;
        } else
                graph->is_leaf_call = LCS_NON_LEAF_CALL;
-}  /* stat_update_call_2 */
+}
 
 /**
  * Find the base address and entity of an Sel node.
@@ -834,7 +834,7 @@ static ir_node *find_base_adr(ir_node *sel)
                ptr = get_Sel_ptr(sel);
        }
        return ptr;
-}  /* find_base_adr */
+}
 
 /**
  * Update info on Load/Store address statistics.
@@ -870,21 +870,21 @@ static void stat_update_address(ir_node *node, graph_entry_t *graph)
                                                        /* THIS pointer */
                                                        cnt_inc(&graph->cnt[gcnt_this_adr]);
                                                        goto end_parameter;
-                                               }  /* if */
-                                       }  /* if */
-                               }  /* if */
+                                               }
+                                       }
+                               }
                                /* other parameter */
                                cnt_inc(&graph->cnt[gcnt_param_adr]);
 end_parameter: ;
                        } else {
                                /* unknown Pointer access */
                                cnt_inc(&graph->cnt[gcnt_other_adr]);
-                       }  /* if */
-               }  /* if */
+                       }
+               }
        default:
                break;
-       }  /* switch */
-}  /* stat_update_address */
+       }
+}
 
 /**
  * Walker for reachable nodes count.
@@ -932,7 +932,7 @@ static void update_node_stat(ir_node *node, void *env)
                }
        default:
                break;
-       }  /* switch */
+       }
 
        /* we want to count the constant IN nodes, not the CSE'ed constant's itself */
        if (status->stat_options & FIRMSTAT_COUNT_CONSTS) {
@@ -944,10 +944,10 @@ static void update_node_stat(ir_node *node, void *env)
                        if (is_Const(pred)) {
                                /* check properties of constants */
                                stat_update_const(status, pred, graph);
-                       }  /* if */
-               }  /* for */
-       }  /* if */
-}  /* update_node_stat */
+                       }
+               }
+       }
+}
 
 /**
  * Walker for reachable nodes count for graphs on the wait_q.
@@ -959,7 +959,7 @@ static void update_node_stat_2(ir_node *node, void *env)
        /* check for properties that depends on calls like recursion/leaf/indirect call */
        if (is_Call(node))
                stat_update_call_2(node, graph);
-}  /* update_node_stat_2 */
+}
 
 /**
  * Get the current address mark.
@@ -970,7 +970,7 @@ static unsigned get_adr_mark(graph_entry_t *graph, ir_node *node)
        address_mark_entry_t *value = set_find(address_mark_entry_t, graph->address_mark, &val, sizeof(val), hash_ptr(node));
 
        return value ? value->mark : 0;
-}  /* get_adr_mark */
+}
 
 /**
  * Set the current address mark.
@@ -979,7 +979,7 @@ static void set_adr_mark(graph_entry_t *graph, ir_node *node, unsigned val)
 {
        address_mark_entry_t const value = { node, val };
        (void)set_insert(address_mark_entry_t, graph->address_mark, &value, sizeof(value), hash_ptr(node));
-}  /* set_adr_mark */
+}
 
 #undef DUMP_ADR_MODE
 
@@ -1007,7 +1007,7 @@ static int stat_adr_mark_hook(FILE *F, ir_node *node, ir_node *local)
 
        /* I know the color! */
        return 1;
-}  /* stat_adr_mark_hook */
+}
 #endif /* DUMP_ADR_MODE */
 
 /**
@@ -1028,8 +1028,8 @@ static ir_mode *get_irn_op_mode(ir_node *node)
                /* Cmp is no address calculation, or is it? */
        default:
                return get_irn_mode(node);
-       }  /* switch */
-}  /* get_irn_op_mode */
+       }
+}
 
 /**
  * Post-walker that marks every node that is an address calculation.
@@ -1062,8 +1062,8 @@ static void mark_address_calc(ir_node *node, void *env)
                         * referenced by address calculations
                         */
                        mark_preds = MARK_REF_ADR;
-               }  /* if */
-       }  /* if */
+               }
+       }
 
        /* mark all predecessors */
        for (i = 0, n = get_irn_arity(node); i < n; ++i) {
@@ -1074,8 +1074,8 @@ static void mark_address_calc(ir_node *node, void *env)
                        continue;
 
                set_adr_mark(graph, pred, get_adr_mark(graph, pred) | mark_preds);
-       }  /* for */
-}  /* mark_address_calc */
+       }
+}
 
 /**
  * Post-walker that marks every node that is an address calculation.
@@ -1095,7 +1095,7 @@ static void count_adr_ops(ir_node *node, void *env)
                cnt_inc(&graph->cnt[gcnt_pure_adr_ops]);
        else if ((mark & (MARK_REF_ADR | MARK_REF_NON_ADR)) == (MARK_REF_ADR|MARK_REF_NON_ADR))
                cnt_inc(&graph->cnt[gcnt_all_adr_ops]);
-}  /* count_adr_ops */
+}
 
 /**
  * Called for every graph when the graph is either deleted or stat_dump_snapshot()
@@ -1111,7 +1111,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
        /* clear first the alive counter in the graph */
        foreach_pset(graph->opcode_hash, node_entry_t, entry) {
                cnt_clr(&entry->cnt_alive);
-       }  /* foreach_pset */
+       }
 
        /* set pessimistic values */
        graph->is_leaf       = 1;
@@ -1126,7 +1126,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
        /* we need dominator info */
        if (graph->irg != get_const_code_irg()) {
                assure_doms(graph->irg);
-       }  /* if */
+       }
 
        /* count the nodes in the graph */
        irg_walk_graph(graph->irg, update_node_stat, NULL, graph);
@@ -1150,7 +1150,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
 
                /* update the node counter */
                cnt_add(&g_entry->cnt_alive, &entry->cnt_alive);
-       }  /* foreach_pset */
+       }
 
        /* count the number of address calculation */
        if (graph->irg != get_const_code_irg()) {
@@ -1171,7 +1171,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
 #endif /* DUMP_ADR_MODE */
 
                irg_walk_graph(graph->irg, NULL, count_adr_ops, graph);
-       }  /* if */
+       }
 
        /* count the DAG's */
        if (status->stat_options & FIRMSTAT_COUNT_DAG)
@@ -1186,7 +1186,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
        else if (graph->is_leaf_call == LCS_UNKNOWN) {
                /* we still don't know if this graph calls leaf-functions, so enqueue */
                pdeq_putl(status->wait_q, graph);
-       }  /* if */
+       }
 
        /* we have analyzed this graph */
        graph->is_analyzed = 1;
@@ -1194,7 +1194,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
        /* accumulate all counter's */
        for (i = 0; i < _gcnt_last; ++i)
                cnt_add(&global->cnt[i], &graph->cnt[i]);
-}  /* update_graph_stat */
+}
 
 /**
  * Called for every graph that was on the wait_q in stat_dump_snapshot()
@@ -1217,8 +1217,8 @@ static void update_graph_stat_2(graph_entry_t *global, graph_entry_t *graph)
 
                if (graph->is_leaf_call == LCS_UNKNOWN)
                        graph->is_leaf_call = LCS_LEAF_CALL;
-       }  /* if */
-}  /* update_graph_stat_2 */
+       }
+}
 
 /**
  * Register a dumper.
@@ -1233,7 +1233,7 @@ static void stat_register_dumper(const dumper_t *dumper)
        status->dumper = p;
 
        /* FIXME: memory leak */
-}  /* stat_register_dumper */
+}
 
 /**
  * Dumps the statistics of an IR graph.
@@ -1245,8 +1245,8 @@ static void stat_dump_graph(graph_entry_t *entry)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->dump_graph)
                        dumper->dump_graph(dumper, entry);
-       }  /* for */
-}  /* stat_dump_graph */
+       }
+}
 
 /**
  * Calls all registered dumper functions.
@@ -1259,9 +1259,9 @@ static void stat_dump_registered(graph_entry_t *entry)
                if (dumper->func_map) {
                        foreach_pset(dumper->func_map, dump_graph_FUNC, func)
                                func(dumper, entry);
-               }  /* if */
-       }  /* for */
-}  /* stat_dump_registered */
+               }
+       }
+}
 
 /**
  * Dumps a constant table.
@@ -1273,8 +1273,8 @@ static void stat_dump_consts(const constant_info_t *tbl)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->dump_const_tbl)
                        dumper->dump_const_tbl(dumper, tbl);
-       }  /* for */
-}  /* stat_dump_consts */
+       }
+}
 
 /**
  * Dumps the parameter distribution
@@ -1286,8 +1286,8 @@ static void stat_dump_param_tbl(const distrib_tbl_t *tbl, graph_entry_t *global)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->dump_param_tbl)
                        dumper->dump_param_tbl(dumper, tbl, global);
-       }  /* for */
-}  /* stat_dump_param_tbl */
+       }
+}
 
 /**
  * Dumps the optimization counter
@@ -1299,8 +1299,8 @@ static void stat_dump_opt_cnt(const counter_t *tbl, unsigned len)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->dump_opt_cnt)
                        dumper->dump_opt_cnt(dumper, tbl, len);
-       }  /* for */
-}  /* stat_dump_opt_cnt */
+       }
+}
 
 /**
  * Initialize the dumper.
@@ -1312,8 +1312,8 @@ static void stat_dump_init(const char *name)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->init)
                        dumper->init(dumper, name);
-       }  /* for */
-}  /* stat_dump_init */
+       }
+}
 
 /**
  * Finish the dumper.
@@ -1325,8 +1325,8 @@ static void stat_dump_finish(void)
        for (dumper = status->dumper; dumper; dumper = dumper->next) {
                if (dumper->finish)
                        dumper->finish(dumper);
-       }  /* for */
-}  /* stat_dump_finish */
+       }
+}
 
 /**
  * Register an additional function for all dumper.
@@ -1339,8 +1339,8 @@ void stat_register_dumper_func(dump_graph_FUNC *const func)
                if (! dumper->func_map)
                        dumper->func_map = pset_new_ptr(3);
                pset_insert_ptr(dumper->func_map, (void*)func);
-       }  /* for */
-}  /* stat_register_dumper_func */
+       }
+}
 
 /* ---------------------------------------------------------------------- */
 
@@ -1350,7 +1350,7 @@ void stat_register_dumper_func(dump_graph_FUNC *const func)
 ir_op *stat_get_op_from_opcode(unsigned code)
 {
        return opcode_find_entry((ir_opcode)code, status->ir_op_hash);
-}  /* stat_get_op_from_opcode */
+}
 
 /**
  * Hook: A new IR op is registered.
@@ -1374,7 +1374,7 @@ static void stat_new_ir_op(void *ctx, ir_op *op)
                pset_insert(status->ir_op_hash, op, op->code);
        }
        STAT_LEAVE;
-}  /* stat_new_ir_op */
+}
 
 /**
  * Hook: An IR op is freed.
@@ -1393,7 +1393,7 @@ static void stat_free_ir_op(void *ctx, ir_op *op)
        {
        }
        STAT_LEAVE;
-}  /* stat_free_ir_op */
+}
 
 /**
  * Hook: A new node is created.
@@ -1430,7 +1430,7 @@ static void stat_new_node(void *ctx, ir_graph *irg, ir_node *node)
                cnt_inc(&entry->new_node);
        }
        STAT_LEAVE;
-}  /* stat_new_node */
+}
 
 /**
  * Hook: A node is changed into a Id node
@@ -1461,7 +1461,7 @@ static void stat_turn_into_id(void *ctx, ir_node *node)
                cnt_inc(&entry->into_Id);
        }
        STAT_LEAVE;
-}  /* stat_turn_into_id */
+}
 
 /**
  * Hook: A node is normalized
@@ -1492,7 +1492,7 @@ static void stat_normalize(void *ctx, ir_node *node)
                cnt_inc(&entry->normalized);
        }
        STAT_LEAVE;
-}  /* stat_normalize */
+}
 
 /**
  * Hook: A new graph was created
@@ -1522,7 +1522,7 @@ static void stat_new_graph(void *ctx, ir_graph *irg, ir_entity *ent)
                graph->is_analyzed   = 0;
        }
        STAT_LEAVE;
-}  /* stat_new_graph */
+}
 
 /**
  * Hook: A graph will be deleted
@@ -1550,10 +1550,10 @@ static void stat_free_graph(void *ctx, ir_graph *irg)
                if (status->stat_options & FIRMSTAT_COUNT_DELETED) {
                        /* count the nodes of the graph yet, it will be destroyed later */
                        update_graph_stat(global, graph);
-               }  /* if */
+               }
        }
        STAT_LEAVE;
-}  /* stat_free_graph */
+}
 
 /**
  * Hook: A walk over a graph is initiated. Do not count walks from statistic code.
@@ -1578,7 +1578,7 @@ static void stat_irg_walk(void *ctx, ir_graph *irg, generic_func *pre, generic_f
                cnt_inc(&graph->cnt[gcnt_acc_walked]);
        }
        STAT_LEAVE;
-}  /* stat_irg_walk */
+}
 
 /**
  * Hook: A walk over a graph in block-wise order is initiated. Do not count walks from statistic code.
@@ -1592,7 +1592,7 @@ static void stat_irg_walk_blkwise(void *ctx, ir_graph *irg, generic_func *pre, g
 {
        /* for now, do NOT differentiate between blockwise and normal */
        stat_irg_walk(ctx, irg, pre, post);
-}  /* stat_irg_walk_blkwise */
+}
 
 /**
  * Hook: A walk over the graph's blocks is initiated. Do not count walks from statistic code.
@@ -1619,7 +1619,7 @@ static void stat_irg_block_walk(void *ctx, ir_graph *irg, ir_node *node, generic
                cnt_inc(&graph->cnt[gcnt_acc_walked_blocks]);
        }
        STAT_LEAVE;
-}  /* stat_irg_block_walk */
+}
 
 /**
  * Called for every node that is removed due to an optimization.
@@ -1640,7 +1640,7 @@ static void removed_due_opt(ir_node *n, hmap_opt_entry_t *hmap, hook_opt_kind ki
        /* increase global value */
        entry = opt_get_entry(op, hmap);
        cnt_inc(&entry->count);
-}  /* removed_due_opt */
+}
 
 /**
  * Hook: Some nodes were optimized into some others due to an optimization.
@@ -1672,7 +1672,7 @@ static void stat_merge_nodes(
                        for (j = 0; j < new_num_entries; ++j) {
                                if (old_node_array[i] == new_node_array[j])
                                        break;
-                       }  /* for */
+                       }
                        if (j >= new_num_entries) {
                                int xopt = opt;
 
@@ -1681,14 +1681,14 @@ static void stat_merge_nodes(
                                        ir_node *const irn = new_node_array[0];
                                        if (is_Const(irn) || is_SymConst(irn))
                                                xopt = HOOK_OPT_CONFIRM_C;
-                               }  /* if */
+                               }
 
                                removed_due_opt(old_node_array[i], graph->opt_hash[xopt], (hook_opt_kind)xopt);
-                       }  /* if */
-               }  /* for */
+                       }
+               }
        }
        STAT_LEAVE;
-}  /* stat_merge_nodes */
+}
 
 /**
  * Hook: Reassociation is started/stopped.
@@ -1707,7 +1707,7 @@ static void stat_reassociate(void *ctx, int flag)
                status->reassoc_run = flag;
        }
        STAT_LEAVE;
-}  /* stat_reassociate */
+}
 
 /**
  * Hook: A node was lowered into other nodes
@@ -1728,7 +1728,7 @@ static void stat_lower(void *ctx, ir_node *node)
                removed_due_opt(node, graph->opt_hash[HOOK_LOWERED], HOOK_LOWERED);
        }
        STAT_LEAVE;
-}  /* stat_lower */
+}
 
 /**
  * Hook: A graph was inlined.
@@ -1754,7 +1754,7 @@ static void stat_inline(void *ctx, ir_node *call, ir_graph *called_irg)
                cnt_inc(&i_graph->cnt[gcnt_acc_was_inlined]);
        }
        STAT_LEAVE;
-}  /* stat_inline */
+}
 
 /**
  * Hook: A graph with tail-recursions was optimized.
@@ -1774,7 +1774,7 @@ static void stat_tail_rec(void *ctx, ir_graph *irg, int n_calls)
                graph->num_tail_recursion += n_calls;
        }
        STAT_LEAVE;
-}  /* stat_tail_rec */
+}
 
 /**
  * Strength reduction was performed on an iteration variable.
@@ -1795,7 +1795,7 @@ static void stat_strength_red(void *ctx, ir_graph *irg, ir_node *strong)
                removed_due_opt(strong, graph->opt_hash[HOOK_OPT_STRENGTH_RED], HOOK_OPT_STRENGTH_RED);
        }
        STAT_LEAVE;
-}  /* stat_strength_red */
+}
 
 /**
  * Hook: Start/Stop the dead node elimination.
@@ -1810,7 +1810,7 @@ static void stat_dead_node_elim(void *ctx, ir_graph *irg, int start)
                return;
 
        status->in_dead_node_elim = (start != 0);
-}  /* stat_dead_node_elim */
+}
 
 /**
  * Hook: if-conversion was tried.
@@ -1832,7 +1832,7 @@ static void stat_if_conversion(void *context, ir_graph *irg, ir_node *phi,
                cnt_inc(&graph->cnt[gcnt_if_conv + reason]);
        }
        STAT_LEAVE;
-}  /* stat_if_conversion */
+}
 
 /**
  * Hook: real function call was optimized.
@@ -1851,7 +1851,7 @@ static void stat_func_call(void *context, ir_graph *irg, ir_node *call)
                cnt_inc(&graph->cnt[gcnt_acc_real_func_call]);
        }
        STAT_LEAVE;
-}  /* stat_func_call */
+}
 
 /**
  * Hook: A multiply was replaced by a series of Shifts/Adds/Subs.
@@ -1870,7 +1870,7 @@ static void stat_arch_dep_replace_mul_with_shifts(void *ctx, ir_node *mul)
                removed_due_opt(mul, graph->opt_hash[HOOK_OPT_ARCH_DEP], HOOK_OPT_ARCH_DEP);
        }
        STAT_LEAVE;
-}  /* stat_arch_dep_replace_mul_with_shifts */
+}
 
 /**
  * Hook: A division by const was replaced.
@@ -1890,7 +1890,7 @@ static void stat_arch_dep_replace_division_by_const(void *ctx, ir_node *node)
                removed_due_opt(node, graph->opt_hash[HOOK_OPT_ARCH_DEP], HOOK_OPT_ARCH_DEP);
        }
        STAT_LEAVE;
-}  /* stat_arch_dep_replace_division_by_const */
+}
 
 /*
  * Update the register pressure of a block.
@@ -1920,7 +1920,7 @@ void stat_be_block_regpressure(ir_graph *irg, ir_node *block, int pressure, cons
                pset_insert(block_ent->reg_pressure, rp_ent, hash_ptr(class_name));
        }
        STAT_LEAVE;
-}  /* stat_be_block_regpressure */
+}
 
 /**
  * Update the distribution of ready nodes of a block
@@ -1945,7 +1945,7 @@ void stat_be_block_sched_ready(ir_graph *irg, ir_node *block, int num_ready)
                stat_inc_int_distrib_tbl(block_ent->sched_ready, num_ready);
        }
        STAT_LEAVE;
-}  /* stat_be_block_sched_ready */
+}
 
 /**
  * Update the permutation statistic of a block.
@@ -1981,7 +1981,7 @@ void stat_be_block_stat_perm(const char *class_name, int n_regs, ir_node *perm,
                ps_ent->real_size = real_size;
        }
        STAT_LEAVE;
-}  /* stat_be_block_stat_perm */
+}
 
 /**
  * Update the permutation statistic of a single perm.
@@ -2016,10 +2016,10 @@ void stat_be_block_stat_permcycle(const char *class_name, ir_node *perm, ir_node
                } else {
                        ps_ent->n_exchg += n_ops;
                        stat_inc_int_distrib_tbl(ps_ent->cycles, size);
-               }  /* if */
+               }
        }
        STAT_LEAVE;
-}  /* stat_be_block_stat_permcycle */
+}
 
 /* Dumps a statistics snapshot. */
 void stat_dump_snapshot(const char *name, const char *phase)
@@ -2068,7 +2068,7 @@ void stat_dump_snapshot(const char *name, const char *phase)
                } else {
                        fname[0] = '\0';
                        p = name;
-               }  /* if */
+               }
                strncat(fname, "firmstat-", sizeof(fname)-strlen(fname)-1);
                strncat(fname, phase,       sizeof(fname)-strlen(fname)-1);
                strncat(fname, "-",         sizeof(fname)-strlen(fname)-1);
@@ -2081,37 +2081,37 @@ void stat_dump_snapshot(const char *name, const char *phase)
                        if (entry->irg == NULL) {
                                /* special entry for the global count */
                                continue;
-                       }  /* if */
+                       }
                        if (! entry->is_deleted) {
                                /* the graph is still alive, count the nodes on it */
                                update_graph_stat(global, entry);
-                       }  /* if */
-               }  /* for */
+                       }
+               }
 
                /* some calculations are dependent, we pushed them on the wait_q */
                while (! pdeq_empty(status->wait_q)) {
                        graph_entry_t *const entry = (graph_entry_t*)pdeq_getr(status->wait_q);
 
                        update_graph_stat_2(global, entry);
-               }  /* while */
+               }
 
                /* dump per graph */
                foreach_pset(status->irg_hash, graph_entry_t, entry) {
                        if (entry->irg == NULL) {
                                /* special entry for the global count */
                                continue;
-                       }  /* if */
+                       }
 
                        if (! entry->is_deleted || status->stat_options & FIRMSTAT_COUNT_DELETED) {
                                stat_dump_graph(entry);
                                stat_dump_registered(entry);
-                       }  /* if */
+                       }
 
                        if (! entry->is_deleted) {
                                /* clear the counter that are not accumulated */
                                graph_clear_entry(entry, 0);
-                       }  /* if */
-               }  /* for */
+                       }
+               }
 
                /* dump global */
                stat_dump_graph(global);
@@ -2134,12 +2134,12 @@ void stat_dump_snapshot(const char *name, const char *phase)
                /* clear the global counters here */
                foreach_pset(global->opcode_hash, node_entry_t, entry) {
                        opcode_clear_entry(entry);
-               }  /* for */
+               }
                /* clear all global counter */
                graph_clear_entry(global, /*all=*/1);
        }
        STAT_LEAVE;
-}  /* stat_dump_snapshot */
+}
 
 typedef struct pass_t {
        ir_prog_pass_t pass;
@@ -2157,7 +2157,7 @@ static int stat_dump_snapshot_wrapper(ir_prog *irp, void *context)
        (void)irp;
        stat_dump_snapshot(pass->fname, pass->phase);
        return 0;
-}  /* stat_dump_snapshot_wrapper */
+}
 
 /**
  * Ensure that no verifier is run from the wrapper.
@@ -2195,7 +2195,7 @@ ir_prog_pass_t *stat_dump_snapshot_pass(
        pass->pass.verify_irprog = no_verify;
 
        return &pass->pass;
-}  /* stat_dump_snapshot_pass */
+}
 
 /** the hook entries for the Firm statistics module */
 static hook_entry_t stat_hooks[hook_last];
@@ -2283,7 +2283,7 @@ void firm_init_stat(void)
                status->op_MulC    = NULL;
                status->op_DivC    = NULL;
                status->op_ModC    = NULL;
-       }  /* if */
+       }
 
        /* for Florian: count the Sel depth */
        if (stat_options & FIRMSTAT_COUNT_SELS) {
@@ -2298,7 +2298,7 @@ void firm_init_stat(void)
        } else {
                status->op_SelSel    = NULL;
                status->op_SelSelSel = NULL;
-       }  /* if */
+       }
 
        /* register the dumper */
        stat_register_dumper(&simple_dumper);
@@ -2320,7 +2320,7 @@ void firm_init_stat(void)
 
 #undef HOOK
 #undef X
-}  /* firm_init_stat */
+}
 
 /**
  * Frees all dumper structures.
@@ -2336,8 +2336,8 @@ static void stat_term_dumper(void)
                next_dumper = dumper->next;
                free(dumper);
                dumper = next_dumper;
-       }  /* for */
-}  /* stat_term_dumper */
+       }
+}
 
 
 /* Terminates the statistics module, frees all memory. */
@@ -2352,13 +2352,13 @@ void stat_term(void)
                xfree(status);
                status = (stat_info_t *)&status_disable;
        }
-}  /* stat_term */
+}
 
 /* returns 1 if statistics were initialized, 0 otherwise */
 int stat_is_active(void)
 {
        return status != (stat_info_t *)&status_disable;
-}  /* stat_is_active */
+}
 
 void init_stat(void)
 {
index c215556..b9ca3b8 100644 (file)
@@ -136,7 +136,7 @@ static int pattern_count_cmp(const void *elt, const void *key)
        cmp = cnt_cmp(&(*e2)->count, &(*e1)->count);
 
        return cmp;
-}  /* pattern_count_cmp */
+}
 
 /**
  * Compare two pattern for its pattern hash.
@@ -150,7 +150,7 @@ static int pattern_cmp(const void *elt, const void *key)
                return memcmp(e1->buf, e2->buf, e1->len);
 
        return e1->len < e2->len ? -1 : +1;
-}  /* pattern_cmp */
+}
 
 /**
  * Initialize a code buffer.
@@ -166,7 +166,7 @@ static void init_buf(CODE_BUFFER *buf, BYTE *data, size_t len)
        buf->end     = data + len;
        buf->hash    = 0x2BAD4;      /* An arbitrary seed. */
        buf->overrun = 0;
-}  /* init_buf */
+}
 
 /**
  * Put a byte into the buffer.
@@ -184,7 +184,7 @@ static inline void put_byte(CODE_BUFFER *buf, BYTE byte)
        } else {
                buf->overrun = 1;
        }
-}  /* put_byte */
+}
 
 /**
  * Returns the current length of a buffer.
@@ -196,7 +196,7 @@ static inline void put_byte(CODE_BUFFER *buf, BYTE byte)
 static size_t buf_lenght(const CODE_BUFFER *buf)
 {
        return buf->next - buf->start;
-}  /* buf_lenght */
+}
 
 /**
  * Returns the current content of a buffer.
@@ -208,7 +208,7 @@ static size_t buf_lenght(const CODE_BUFFER *buf)
 static const BYTE *buf_content(const CODE_BUFFER *buf)
 {
        return buf->start;
-}  /* buf_content */
+}
 
 /**
  * Returns the hash value of a buffer.
@@ -220,7 +220,7 @@ static const BYTE *buf_content(const CODE_BUFFER *buf)
 static unsigned buf_hash(const CODE_BUFFER *buf)
 {
        return buf->hash;
-}  /* buf_hash */
+}
 
 /**
  * Returns non-zero if a buffer overrun has occurred.
@@ -230,7 +230,7 @@ static unsigned buf_hash(const CODE_BUFFER *buf)
 static unsigned buf_overrun(const CODE_BUFFER *buf)
 {
        return buf->overrun;
-}  /* buf_overrun */
+}
 
 /**
  * Returns the next byte from the buffer WITHOUT dropping.
@@ -244,7 +244,7 @@ static inline BYTE look_byte(CODE_BUFFER *buf)
        if (buf->next < buf->end)
                return *buf->next;
        return VLC_TAG_END;
-}  /* look_byte */
+}
 
 /**
  * Returns the next byte from the buffer WITH dropping.
@@ -258,7 +258,7 @@ static inline BYTE get_byte(CODE_BUFFER *buf)
        if (buf->next < buf->end)
                return *buf->next++;
        return VLC_TAG_END;
-}  /* get_byte */
+}
 
 #define BITS(n)   (1 << (n))
 
@@ -290,8 +290,8 @@ static void put_code(CODE_BUFFER *buf, unsigned code)
                put_byte(buf, code >> 16);
                put_byte(buf, code >> 8);
                put_byte(buf, code);
-       }  /* if */
-}  /* put_code */
+       }
+}
 
 #define BIT_MASK(n) ((1 << (n)) - 1)
 
@@ -314,23 +314,23 @@ static unsigned get_code(CODE_BUFFER *buf)
                code  = ((code & BIT_MASK(5)) << 16) | (get_byte(buf) << 8);
                code |= get_byte(buf);
                return code;
-       }  /* if */
+       }
        if (code < VLC_32BIT) {
                code  = ((code & BIT_MASK(4)) << 24) | (get_byte(buf) << 16);
                code |= get_byte(buf) <<  8;
                code |= get_byte(buf);
                return code;
-       }  /* if */
+       }
        if (code == VLC_32BIT) {
                code  = get_byte(buf) << 24;
                code |= get_byte(buf) << 16;
                code |= get_byte(buf) <<  8;
                code |= get_byte(buf);
                return code;
-       }  /* if */
+       }
        /* should not happen */
        panic("Wrong code in buffer");
-}  /* get_code */
+}
 
 /**
  * Put a tag into the buffer.
@@ -343,7 +343,7 @@ static void put_tag(CODE_BUFFER *buf, BYTE tag)
        assert(tag >= VLC_TAG_FIRST && "invalid tag");
 
        put_byte(buf, tag);
-}  /* put_tag */
+}
 
 /**
  * Returns the next tag or zero if the next code isn't a tag.
@@ -359,7 +359,7 @@ static BYTE next_tag(CODE_BUFFER *buf)
        if (b >= VLC_TAG_FIRST)
                return get_byte(buf);
        return 0;
-}  /* next_tag */
+}
 
 /**
  * An Environment for the pattern encoder.
@@ -390,7 +390,7 @@ static int addr_cmp(const void *p1, const void *p2, size_t size)
        (void) size;
 
        return e1->addr != e2->addr;
-}  /* addr_cmp */
+}
 
 /**
  * Return the index of a (existing) mode.
@@ -438,7 +438,7 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env)
        } else {
                /* a new entry, proceed */
                ++env->curr_id;
-       }  /* if */
+       }
 
        put_code(env->buf, (unsigned)code);
 
@@ -450,7 +450,7 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env)
                        put_code(env->buf, find_mode_index(mode));
                else
                        put_tag(env->buf, VLC_TAG_EMPTY);
-       }  /* if */
+       }
 
        /* do we need integer constants */
        if (env->options & OPT_WITH_ICONST) {
@@ -462,16 +462,16 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env)
 
                                put_tag(env->buf, VLC_TAG_ICONST);
                                put_code(env->buf, v);
-                       }  /* if */
-               }  /* if */
-       }  /* if */
+                       }
+               }
+       }
 
        --max_depth;
 
        if (max_depth <= 0) {
                put_code(env->buf, 0);
                return max_depth;
-       } /* if */
+       }
 
        preds = get_irn_arity(node);
        put_code(env->buf, preds);
@@ -489,7 +489,7 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env)
                } else if (opcode_diff == 0 && l != r) {
                        /* Both nodes have the same opcode, but are different.
                           Need a better method here to decide which goes to the left side. */
-               }  /* if */
+               }
 
                /* special handling for commutative operators */
                depth = _encode_node(l, max_depth, env);
@@ -505,10 +505,10 @@ static int _encode_node(ir_node *node, int max_depth, codec_env_t *env)
                        depth = _encode_node(n, max_depth, env);
                        if (depth < res)
                                res = depth;
-               }  /* for */
-       }  /* if */
+               }
+       }
        return res;
-}  /* _encode_node */
+}
 
 /**
  * Encode a DAG starting by the IR-node node.
@@ -539,7 +539,7 @@ static int encode_node(ir_node *node, CODE_BUFFER *buf, int max_depth)
        if (env.options) {
                put_tag(buf, VLC_TAG_OPTION);
                put_code(buf, env.options);
-       }  /* if */
+       }
 
        res = _encode_node(node, max_depth, &env);
 
@@ -547,7 +547,7 @@ static int encode_node(ir_node *node, CODE_BUFFER *buf, int max_depth)
                del_set(env.id_set);
 
        return max_depth - res;
-}  /* encode_node */
+}
 
 /**
  * Decode an IR-node, recursive walker.
@@ -573,13 +573,13 @@ static void _decode_node(unsigned parent, int position, codec_env_t *env)
                         * we don't know the target here, it's a ref.
                         */
                        pattern_dump_edge(env->dmp, code, parent, position, edge_mode);
-               }  /* if */
+               }
 
                /* dump the node ref */
                pattern_dump_ref(env->dmp, code);
 
                return;
-       }  /* if */
+       }
 
        /* get the opcode */
        op_code = get_code(env->buf);
@@ -588,14 +588,14 @@ static void _decode_node(unsigned parent, int position, codec_env_t *env)
        if (env->options & OPT_WITH_MODE) {
                if (next_tag(env->buf) != VLC_TAG_EMPTY) {
                        mode_code = get_code(env->buf);
-               }  /* if */
-       }  /* if */
+               }
+       }
 
        /* check, if a ICONST attribute is given */
        if (next_tag(env->buf) == VLC_TAG_ICONST) {
                iconst = get_code(env->buf);
                attr   = &iconst;
-       }  /* if */
+       }
 
        /* dump the edge */
        if (parent) {
@@ -607,7 +607,7 @@ static void _decode_node(unsigned parent, int position, codec_env_t *env)
                 * we need it anyway for ref's.
                 */
                pattern_dump_edge(env->dmp, env->curr_id, parent, position, edge_mode);
-       }  /* if */
+       }
 
        /* dump the node */
        parent = env->curr_id;
@@ -626,11 +626,11 @@ static void _decode_node(unsigned parent, int position, codec_env_t *env)
                        pattern_start_children(env->dmp, parent);
                        for (i = 0; i < preds; ++i) {
                                _decode_node(parent, i, env);
-                       }  /* for */
+                       }
                        pattern_finish_children(env->dmp, parent);
-               }  /* if */
-       }  /* if */
-}  /* _decode_node */
+               }
+       }
+}
 
 /**
  * Decode an IR-node.
@@ -651,11 +651,11 @@ static void decode_node(BYTE *b, size_t len, pattern_dumper_t *dump)
        code = next_tag(&buf);
        if (code == VLC_TAG_OPTION) {
                options = get_code(&buf);
-       }  /* if */
+       }
        env.options = options;
 
        _decode_node(0, 0, &env);
-}  /* decode_node */
+}
 
 /**
  * The environment for the pattern calculation.
@@ -691,11 +691,11 @@ static pattern_entry_t *pattern_get_entry(CODE_BUFFER *buf, pset *set)
        if (elem != NULL) {
                obstack_free(&status->obst, key);
                return elem;
-       }  /* if */
+       }
 
        cnt_clr(&key->count);
        return (pattern_entry_t*)pset_insert(set, key, hash);
-}  /* pattern_get_entry */
+}
 
 /**
  * Increase the count for a pattern.
@@ -715,8 +715,8 @@ static void count_pattern(CODE_BUFFER *buf, int depth)
 
                /* increase count */
                cnt_inc(&entry->count);
-       }  /* if */
-}  /* count_pattern */
+       }
+}
 
 /**
  * Pre-walker for nodes pattern calculation.
@@ -735,7 +735,7 @@ static void calc_nodes_pattern(ir_node *node, void *ctx)
                lc_fprintf(stderr, "Pattern store: buffer overrun at size %zu. Pattern ignored.\n", sizeof(buffer));
        } else
                count_pattern(&buf, depth);
-}  /* calc_nodes_pattern */
+}
 
 /**
  * Store all collected patterns.
@@ -754,16 +754,16 @@ static void store_pattern(const char *fname)
        if (! f) {
                perror(fname);
                return;
-       }  /* if */
+       }
 
        fwrite("FPS1", 4, 1, f);
        fwrite(&count, sizeof(count), 1, f);
 
        foreach_pset(status->pattern_hash, pattern_entry_t, entry) {
                fwrite(entry, offsetof(pattern_entry_t, buf) + entry->len, 1, f);
-       }  /* for */
+       }
        fclose(f);
-}  /* store_pattern */
+}
 
 /**
  * Read collected patterns from a file.
@@ -786,7 +786,7 @@ static HASH_MAP(pattern_entry_t) *read_pattern(const char *fname)
        if (! f) {
                perror(fname);
                return NULL;
-       }  /* if */
+       }
 
        res = fread(magic, 4, 1, f);
        if (res != 1)
@@ -806,7 +806,7 @@ static HASH_MAP(pattern_entry_t) *read_pattern(const char *fname)
                        put_byte(&buf, fgetc(f));
                entry = pattern_get_entry(&buf, pattern_hash);
                entry->count = tmp.count;
-       }  /* for */
+       }
        fclose(f);
 
        lc_printf("Read %zu pattern from %s\n", count, fname);
@@ -818,7 +818,7 @@ read_error:
        fprintf(stderr, "Error: %s is not a Firm pattern store. Ignored.\n", fname);
        fclose(f);
        return NULL;
-}  /* read_pattern */
+}
 
 /**
  * Write the collected patterns to a VCG file for inspection.
@@ -843,7 +843,7 @@ static void pattern_output(const char *fname)
        i           = 0;
        foreach_pset(status->pattern_hash, pattern_entry_t, entry) {
                pattern_arr[i++] =  entry;
-       }  /* for */
+       }
        assert(count == i);
        count = i;
 
@@ -859,11 +859,11 @@ static void pattern_output(const char *fname)
                pattern_dump_new_pattern(dump, &entry->count);
                decode_node(entry->buf, entry->len, dump);
                pattern_dump_finish_pattern(dump);
-       }  /* for */
+       }
 
        /* destroy it */
        pattern_end(dump);
-}  /* pattern_output */
+}
 
 /*
  * Calculates the pattern history.
@@ -883,8 +883,8 @@ void stat_calc_pattern_history(ir_graph *irg)
        for (i = status->min_depth; i <= status->max_depth; ++i) {
                env.max_depth = i;
                irg_walk_graph(irg, calc_nodes_pattern, NULL, &env);
-       }  /* for */
-}  /* stat_calc_pattern_history */
+       }
+}
 
 /*
  * Initializes the pattern history.
@@ -910,7 +910,7 @@ void stat_init_pattern_history(int enable)
        if (pattern_hash == NULL)
                pattern_hash = new_pset(pattern_cmp, 8);
        status->pattern_hash = pattern_hash;
-}  /* stat_init_pattern_history */
+}
 
 /*
  * Finish the pattern history.
@@ -928,4 +928,4 @@ void stat_finish_pattern_history(const char *fname)
        obstack_free(&status->obst, NULL);
 
        status->enable = 0;
-}  /* stat_finish_pattern_history */
+}
index d03e767..02c9438 100644 (file)
@@ -84,7 +84,7 @@ static void vcg_dump_start(pattern_dumper_t *self)
                "  port_sharing: no\n"
                "  orientation: bottom_to_top\n"
                );
-}  /* vcg_dump_start */
+}
 
 /**
  * Ends a new VCG graph.
@@ -95,7 +95,7 @@ static void vcg_dump_end(pattern_dumper_t *self)
 
        fprintf(priv->f, "}\n");
        fclose(priv->f);
-}  /* vcg_dump_end */
+}
 
 /**
  * Starts a new pattern.
@@ -117,7 +117,7 @@ static void vcg_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt)
                "    node: {title: \"c%u\" label: \"cnt: %u\" color:red }\n",
                ++nr, cnt_to_uint(cnt)
        );
-}  /* vcg_dump_new_pattern */
+}
 
 /**
  * Finish the current pattern.
@@ -137,7 +137,7 @@ static void vcg_dump_finish_pattern(pattern_dumper_t *self)
                        priv->pattern_id - 1);
 
        ++priv->pattern_id;
-}  /* vcg_dump_finish_pattern */
+}
 
 /**
  * Dumps a node.
@@ -159,8 +159,8 @@ static void vcg_dump_node(pattern_dumper_t *self, unsigned id,
        } else {
                fprintf(priv->f, "    node: {title: \"n%u_%u\" label: \"%s%s n%u\" }\n",
                        priv->pattern_id, id, get_id_str(op->name), mode ? get_mode_name(mode) : "", id);
-       }  /* if */
-}  /* vcg_dump_node */
+       }
+}
 
 /**
  * Dumps an edge.
@@ -178,7 +178,7 @@ static void vcg_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, un
                priv->pattern_id, tgt,
                pos
        );
-}  /* vcg_dump_edge */
+}
 
 /**
  * The VCG dumper.
@@ -204,7 +204,7 @@ static void stdout_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt)
        FILE *f = (FILE*)self->data;
 
        fprintf(f, "%8u ", cnt_to_uint(cnt));
-}  /* stdout_dump_new_pattern */
+}
 
 
 /**
@@ -215,7 +215,7 @@ static void stdout_dump_finish_pattern(pattern_dumper_t *self)
        FILE *f = (FILE*)self->data;
 
        fprintf(f, "\n");
-}  /* stdout_dump_finish_pattern */
+}
 
 /**
  * Dumps a node.
@@ -234,7 +234,7 @@ static void stdout_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_co
 
        if (mode)
                fprintf(f, "%s", get_mode_name(mode));
-}  /* stdout_dump_node */
+}
 
 /**
  * Dump a ref
@@ -244,7 +244,7 @@ static void stdout_dump_ref(pattern_dumper_t *self, unsigned id)
        FILE *f = (FILE*)self->data;
 
        fprintf(f, "REF:%u", id);
-}  /* stdout_dump_ref */
+}
 
 /**
  * Dump an edge.
@@ -259,7 +259,7 @@ static void stdout_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src,
 
        if (pos > 0)
                fprintf(f, ", ");
-}  /* stdout_dump_edge */
+}
 
 /**
  * Start the children dumper.
@@ -270,7 +270,7 @@ static void stdout_start_children(pattern_dumper_t *self, unsigned id)
        (void) id;
 
        fprintf(f, "(");
-}  /* stdout_start_children */
+}
 
 /**
  * Finish the children dumper.
@@ -281,7 +281,7 @@ static void stdout_finish_children(pattern_dumper_t *self, unsigned id)
        (void) id;
 
        fprintf(f, ")");
-}  /* stdout_finish_children */
+}
 
 /**
  * The stdout dumper.
@@ -308,7 +308,7 @@ void pattern_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt)
 {
        if (self->dump_new_pattern)
                self->dump_new_pattern(self, cnt);
-}  /* pattern_dump_new_pattern */
+}
 
 
 /*
@@ -318,7 +318,7 @@ void pattern_dump_finish_pattern(pattern_dumper_t *self)
 {
        if (self->dump_finish_pattern)
                self->dump_finish_pattern(self);
-}  /* pattern_dump_finish_pattern */
+}
 
 
 /*
@@ -328,7 +328,7 @@ void pattern_dump_node(pattern_dumper_t *self, unsigned id, unsigned op_code, un
 {
        if (self->dump_node)
                self->dump_node(self, id, op_code, mode_code, attr);
-}  /* pattern_dump_node */
+}
 
 /*
  * Dump a ref.
@@ -337,7 +337,7 @@ void pattern_dump_ref(pattern_dumper_t *self, unsigned id)
 {
        if (self->dump_ref)
                self->dump_ref(self, id);
-}  /* pattern_dump_ref */
+}
 
 /*
  * Dump an edge.
@@ -346,7 +346,7 @@ void pattern_dump_edge(pattern_dumper_t *self, unsigned tgt, unsigned src, unsig
 {
        if (self->dump_edge)
                self->dump_edge(self, tgt, src, pos, mode_code);
-}  /* pattern_dump_edge */
+}
 
 /*
  * Start the children dumper.
@@ -355,7 +355,7 @@ void pattern_start_children(pattern_dumper_t *self, unsigned id)
 {
        if (self->dump_start_children)
                self->dump_start_children(self, id);
-}  /* pattern_start_children */
+}
 
 /*
  * Finish the the children dumper.
@@ -364,7 +364,7 @@ void pattern_finish_children(pattern_dumper_t *self, unsigned id)
 {
        if (self->dump_finish_children)
                self->dump_finish_children(self, id);
-}  /* pattern_finish_children */
+}
 
 /*
  * Finish the the dumper.
@@ -375,7 +375,7 @@ void pattern_end(pattern_dumper_t *self)
                self->dump_end(self);
 
        free(self);
-}  /* pattern_end */
+}
 
 /**
  * pattern dumper factory for text dumper
@@ -390,7 +390,7 @@ pattern_dumper_t *new_text_dumper(void)
        if (res->dump_start)
                res->dump_start(res);
        return res;
-}  /* new_text_dumper */
+}
 
 /**
  * pattern dumper factory for vcg dumper
@@ -416,7 +416,7 @@ pattern_dumper_t *new_vcg_dumper(const char *vcg_name, unsigned max_pattern)
 
                if (res->dump_start)
                        res->dump_start(res);
-       }  /* if */
+       }
 
        return res;
-}  /* new_vcg_dumper */
+}
index a41df26..9781ba9 100644 (file)
@@ -217,7 +217,7 @@ static void simple_dump_opcode_hash(dumper_t *dmp, pset *set)
                cnt_add(&f_new_node,  &entry->new_node);
                cnt_add(&f_Id,        &entry->into_Id);
                cnt_add(&f_normlized, &entry->normalized);
-       }  /* foreach_pset */
+       }
        fprintf(dmp->f, "-------------------------------------------\n");
        fprintf(dmp->f, "%-16s %8u %8u %8u %8u\n", "Sum",
                cnt_to_uint(&f_alive),
@@ -225,7 +225,7 @@ static void simple_dump_opcode_hash(dumper_t *dmp, pset *set)
                cnt_to_uint(&f_Id),
                cnt_to_uint(&f_normlized)
        );
-}  /* simple_dump_opcode_hash */
+}
 
 /**
  * Return the name of an optimization.
@@ -235,7 +235,7 @@ static const char *get_opt_name(int index)
        assert(index < (int) ARRAY_SIZE(opt_names) && "index out of range");
        assert((int) opt_names[index].kind == index && "opt_names broken");
        return opt_names[index].name;
-}  /* get_opt_name */
+}
 
 /**
  * dumps an optimization hash into human readable form
@@ -251,9 +251,9 @@ static void simple_dump_opt_hash(dumper_t *dmp, pset *set, int index)
                foreach_pset(set, opt_entry_t, entry) {
                        fprintf(dmp->f, "%-16s %8u\n",
                                get_id_str(entry->op->name), cnt_to_uint(&entry->count));
-               }  /* foreach_pset */
-       }  /* if */
-}  /* simple_dump_opt_hash */
+               }
+       }
+}
 
 /**
  * dumps the register pressure for each block and for each register class
@@ -280,15 +280,15 @@ static void simple_dump_be_block_reg_pressure(dumper_t *dmp, graph_entry_t *entr
                foreach_pset(b_entry->reg_pressure, reg_pressure_entry_t, rp_entry)
                        fprintf(dmp->f, "%15d", rp_entry->pressure);
                fprintf(dmp->f, "\n");
-       }  /* for */
-}  /* simple_dump_be_block_reg_pressure */
+       }
+}
 
 /** prints a distribution entry */
 static void simple_dump_distrib_entry(const distrib_entry_t *entry, void *env)
 {
        dumper_t *dmp = (dumper_t*)env;
        fprintf(dmp->f, "%12u", cnt_to_uint(&entry->cnt));
-}  /* simple_dump_distrib_entry */
+}
 
 /**
  * dumps the distribution of the amount of ready nodes for each block
@@ -311,9 +311,9 @@ static void simple_dump_be_block_sched_ready(dumper_t *dmp, graph_entry_t *entry
                        stat_iterate_distrib_tbl(b_entry->sched_ready, simple_dump_distrib_entry, dmp);
                        fprintf(dmp->f, "%12.2lf", stat_calc_avg_distrib_tbl(b_entry->sched_ready));
                        fprintf(dmp->f, "\n");
-               }  /* foreach_pset */
-       }  /* if */
-}  /* simple_dump_be_block_sched_ready */
+               }
+       }
+}
 
 /**
  * Adds the counter for given entry to another distribution table.
@@ -323,7 +323,7 @@ static void add_distrib_entry(const distrib_entry_t *entry, void *env)
        distrib_tbl_t *sum_tbl = (distrib_tbl_t*)env;
 
        stat_add_int_distrib_tbl(sum_tbl, (int)PTR_TO_INT(entry->object), &entry->cnt);
-}  /* add_distrib_entry */
+}
 
 /**
  * dumps permutation statistics for one and block and one class
@@ -359,7 +359,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
 
                /* sum up distribution table for cycles */
                stat_iterate_distrib_tbl(ps_ent->cycles, add_distrib_entry, sum_cycles);
-       }  /* foreach_pset */
+       }
 
        /* print chain distribution for all perms of this class in this block */
        fprintf(dmp->f, "chain distribution:\n");
@@ -369,7 +369,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
                snprintf(buf, sizeof(buf), "length %d", i);
                fprintf(dmp->f, "%12s", buf);
                stat_insert_int_distrib_tbl(sum_chains, i);
-       }  /* for */
+       }
        fprintf(dmp->f, "\n");
        stat_iterate_distrib_tbl(sum_chains, simple_dump_distrib_entry, dmp);
        fprintf(dmp->f, "\n");
@@ -382,7 +382,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
                snprintf(buf, sizeof(buf), "length %d", i);
                fprintf(dmp->f, "%12s", buf);
                stat_insert_int_distrib_tbl(sum_cycles, i);
-       }  /* for */
+       }
        fprintf(dmp->f, "\n");
        stat_iterate_distrib_tbl(sum_cycles, simple_dump_distrib_entry, dmp);
        fprintf(dmp->f, "\n");
@@ -391,7 +391,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
        stat_delete_distrib_tbl(sum_chains);
        stat_delete_distrib_tbl(sum_cycles);
 
-}  /* simple_dump_be_block_permstat_class */
+}
 
 /**
  * dumps statistics about perms
@@ -407,13 +407,13 @@ static void simple_dump_be_block_permstat(dumper_t *dmp, graph_entry_t *entry)
                                foreach_pset(b_entry->perm_class_stat, perm_class_entry_t, pc_ent) {
                                        fprintf(dmp->f, "register class %s:\n", pc_ent->class_name);
                                        simple_dump_be_block_permstat_class(dmp, pc_ent);
-                               }  /* foreach_pset */
-                       }  /* if */
-               }  /* foreach_pset */
+                               }
+                       }
+               }
 
                fprintf(dmp->f, "PERMUTATION STATISTICS END\n");
-       }  /* if */
-}  /* simple_dump_be_block_permstat */
+       }
+}
 
 /**
  * dumps the number of real_function_call optimization
@@ -426,8 +426,8 @@ static void simple_dump_real_func_calls(dumper_t *dmp, counter_t *cnt)
        if (! cnt_eq(cnt, 0)) {
                fprintf(dmp->f, "\nReal Function Calls optimized:\n");
                fprintf(dmp->f, "%-16s %8u\n", "Call", cnt_to_uint(cnt));
-       }  /* if */
-}  /* simple_dump_real_func_calls */
+       }
+}
 
 /**
  * dumps the number of tail_recursion optimization
@@ -440,8 +440,8 @@ static void simple_dump_tail_recursion(dumper_t *dmp, unsigned num_tail_recursio
        if (num_tail_recursion > 0) {
                fprintf(dmp->f, "\nTail recursion optimized:\n");
                fprintf(dmp->f, "%-16s %8u\n", "Call", num_tail_recursion);
-       }  /* if */
-}  /* simple_dump_tail_recursion */
+       }
+}
 
 /**
  * dumps the edges count
@@ -452,7 +452,7 @@ static void simple_dump_edges(dumper_t *dmp, counter_t *cnt)
                return;
 
        fprintf(dmp->f, "%-16s %8u\n", "Edges", cnt_to_uint(cnt));
-}  /* simple_dump_edges */
+}
 
 /**
  * dumps the IRG
@@ -475,7 +475,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                                fprintf(dmp->f, "\nEntity %s, Irg %p", get_entity_ld_name(entry->ent), (void *)entry->irg);
                        else
                                fprintf(dmp->f, "\nIrg %p", (void *)entry->irg);
-               }  /* if */
+               }
 
                fprintf(dmp->f, " %swalked %u over blocks %u:\n"
                        " was inlined               : %u\n"
@@ -506,12 +506,12 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
 
                for (i = 0; i < IF_RESULT_LAST; ++i) {
                        fprintf(dmp->f, " %s : %u\n", if_conv_names[i], cnt_to_uint(&entry->cnt[gcnt_if_conv + i]));
-               }  /* for */
+               }
        } else {
                fprintf(dmp->f, "\nGlobals counts:\n");
                fprintf(dmp->f, "--------------\n");
                dump_opts = 0;
-       }  /* if */
+       }
 
        /* address ops */
        fprintf(dmp->f,
@@ -547,7 +547,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
 
                for (i = 0; i != ARRAY_SIZE(entry->opt_hash); ++i) {
                        simple_dump_opt_hash(dmp, entry->opt_hash[i], i);
-               }  /* for */
+               }
 
                /* dump block info */
                fprintf(dmp->f, "\n%12s %12s %12s %12s %12s %12s %12s\n", "Block Nr", "Nodes", "intern E", "incoming E", "outgoing E", "Phi", "quot");
@@ -562,7 +562,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                                cnt_to_dbl(&b_entry->cnt[bcnt_edges]) / cnt_to_dbl(&b_entry->cnt[bcnt_nodes]),
                                b_entry->is_start ? "START" : (b_entry->is_end ? "END" : "")
                        );
-               }  /* foreach_pset */
+               }
 
                /* dump block reg pressure */
                simple_dump_be_block_reg_pressure(dmp, entry);
@@ -573,7 +573,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                /* dump block permutation statistics */
                simple_dump_be_block_permstat(dmp, entry);
        }
-}  /* simple_dump_graph */
+}
 
 /**
  * dumps the constant table
@@ -597,7 +597,7 @@ static void simple_dump_const_tbl(dumper_t *dmp, const constant_info_t *tbl)
        for (i = 0; i < ARRAY_SIZE(tbl->int_bits_count); ++i) {
                fprintf(dmp->f, "%5u %12u\n", (unsigned) (i + 1), cnt_to_uint(&tbl->int_bits_count[i]));
                cnt_add(&sum, &tbl->int_bits_count[i]);
-       }  /* for */
+       }
        fprintf(dmp->f, "-------------------------------\n");
 
        fprintf(dmp->f, "\nFloating point constants classification\n");
@@ -605,7 +605,7 @@ static void simple_dump_const_tbl(dumper_t *dmp, const constant_info_t *tbl)
        for (i = 0; i < ARRAY_SIZE(tbl->floats); ++i) {
                fprintf(dmp->f, "%-10s %12u\n", stat_fc_name((float_classify_t)i), cnt_to_uint(&tbl->floats[i]));
                cnt_add(&sum, &tbl->floats[i]);
-       }  /* for */
+       }
        fprintf(dmp->f, "--------------------------------------\n");
 
        fprintf(dmp->f, "other %12u\n", cnt_to_uint(&tbl->others));
@@ -613,7 +613,7 @@ static void simple_dump_const_tbl(dumper_t *dmp, const constant_info_t *tbl)
        fprintf(dmp->f, "-------------------------------\n");
 
        fprintf(dmp->f, "sum   %12u\n", cnt_to_uint(&sum));
-}  /* simple_dump_const_tbl */
+}
 
 /**
  * Dumps a line of the parameter table
@@ -624,7 +624,7 @@ static void dump_tbl_line(const distrib_entry_t *entry, void *env)
 
        fprintf(dmp->f, "%ld : %u\n", (long int)PTR_TO_INT(entry->object),
                cnt_to_uint(&entry->cnt));
-}  /* dump_tbl_line */
+}
 
 /**
  * dumps the parameter distribution table
@@ -643,7 +643,7 @@ static void simple_dump_param_tbl(dumper_t *dmp, const distrib_tbl_t *tbl, graph
        fprintf(dmp->f, "with const params         %12u\n", cnt_to_uint(&global->cnt[gcnt_call_with_cnst_arg]));
        fprintf(dmp->f, "with all const params     %12u\n", cnt_to_uint(&global->cnt[gcnt_call_with_all_cnst_arg]));
        fprintf(dmp->f, "with local var adr params %12u\n", cnt_to_uint(&global->cnt[gcnt_call_with_local_adr]));
-}  /* simple_dump_param_tbl */
+}
 
 /**
  * dumps the optimization counter table
@@ -662,7 +662,7 @@ static void simple_dump_opt_cnt(dumper_t *dmp, const counter_t *tbl, unsigned le
                        fprintf(dmp->f, "%8u %s\n", cnt, get_opt_name(i));
                }
        }
-}  /* simple_dump_opt_cnt */
+}
 
 /**
  * initialize the simple dumper
@@ -675,8 +675,8 @@ static void simple_init(dumper_t *dmp, const char *name)
        dmp->f = fopen(fname, "w");
        if (! dmp->f) {
                perror(fname);
-       }  /* if */
-}  /* simple_init */
+       }
+}
 
 /**
  * finishes the simple dumper
@@ -686,7 +686,7 @@ static void simple_finish(dumper_t *dmp)
        if (dmp->f)
                fclose(dmp->f);
        dmp->f = NULL;
-}  /* simple_finish */
+}
 
 /**
  * the simple human readable dumper
@@ -735,9 +735,9 @@ static void csv_count_nodes(dumper_t *dmp, graph_entry_t *graph, counter_t cnt[]
                } else {
                        /* all other nodes */
                        cnt_add(&cnt[0], &entry->cnt_alive);
-               }  /* if */
-       }  /* foreach_pset */
-}  /* csv_count_nodes */
+               }
+       }
+}
 
 /**
  * dumps the IRG
@@ -760,7 +760,7 @@ static void csv_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                                name = get_entity_name(entry->ent);
                        else
                                name = "<UNKNOWN IRG>";
-               }  /* if */
+               }
 
                csv_count_nodes(dmp, entry, cnt);
 
@@ -772,8 +772,8 @@ static void csv_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                        cnt_to_uint(&cnt[2]),
                        cnt_to_uint(&cnt[3])
                );
-       }  /* if */
-}  /* csv_dump_graph */
+       }
+}
 
 /**
  * dumps the IRG
@@ -783,7 +783,7 @@ static void csv_dump_const_tbl(dumper_t *dmp, const constant_info_t *tbl)
        (void) dmp;
        (void) tbl;
        /* FIXME: NYI */
-}  /* csv_dump_const_tbl */
+}
 
 /**
  * dumps the parameter distribution table
@@ -794,7 +794,7 @@ static void csv_dump_param_tbl(dumper_t *dmp, const distrib_tbl_t *tbl, graph_en
        (void) tbl;
        (void) global;
        /* FIXME: NYI */
-}  /* csv_dump_param_tbl */
+}
 
 /**
  * dumps the optimization counter
@@ -805,7 +805,7 @@ static void csv_dump_opt_cnt(dumper_t *dmp, const counter_t *tbl, unsigned len)
        (void) tbl;
        (void) len;
        /* FIXME: NYI */
-}  /* csv_dump_opt_cnt */
+}
 
 /**
  * initialize the simple dumper
@@ -818,7 +818,7 @@ static void csv_init(dumper_t *dmp, const char *name)
        dmp->f = fopen(fname, "a");
        if (! dmp->f)
                perror(fname);
-}  /* csv_init */
+}
 
 /**
  * finishes the simple dumper
@@ -828,7 +828,7 @@ static void csv_finish(dumper_t *dmp)
        if (dmp->f)
                fclose(dmp->f);
        dmp->f = NULL;
-}  /* csv_finish */
+}
 
 /**
  * the simple human readable dumper
index 3460126..da0fc9d 100644 (file)
@@ -53,7 +53,7 @@ static void debug(char *fmt, ...)
 
   OutputDebugString(buf);
   va_end(ap);
-}  /* debug */
+}
 
 /**
  * return the size of a firm object
@@ -82,7 +82,7 @@ int get_firm_object_size(firm_kind kind)
   default:
     return 0;
   }
-}  /* get_firm_object_size */
+}
 
 /**
  * returns the string length of a string in debuggee space
@@ -103,7 +103,7 @@ static int strlen_debuggee(DEBUGHELPER *pHelper, const void *address, size_t max
       return i;
   }
   return i;
-}  /* strlen_debuggee */
+}
 
 /**
  * Format an ident
@@ -131,7 +131,7 @@ HRESULT format_ident(DEBUGHELPER *pHelper, const void *address, char *pResult, s
 
   _tcsncpy(pResult, (const char *)data->dptr, max);
   return S_OK;
-}  /* format_ident */
+}
 
 /**
  * Format a tp_op
@@ -163,7 +163,7 @@ static HRESULT format_tp_op(DEBUGHELPER *pHelper, const void *addr, char *pResul
   }
 #undef X
 #undef Y
-}  /* format_tp_op */
+}
 
 /**
  * Checks whether a type is the global type
@@ -180,7 +180,7 @@ static HRESULT is_global_type(DEBUGHELPER *pHelper, const void *type, int *flag)
 
   *flag = tp.flags & tf_global_type;
   return S_OK;
-}  /* is_global_type */
+}
 
 /**
  * format an entity
@@ -228,7 +228,7 @@ static HRESULT format_entity(DEBUGHELPER *pHelper, int nBase, const void *addr,
   _tcsncat(pResult, name, max);
 
   return S_OK;
-}  /* format_entity */
+}
 
 /**
  * format an ir_mode
@@ -242,7 +242,7 @@ static HRESULT format_mode(DEBUGHELPER *pHelper, const void *addr, char *pResult
   if (format_ident(pHelper, mode.name, pResult, max) != S_OK)
     return E_FAIL;
   return S_OK;
-}  /* format_mode */
+}
 
 /**
  * format a type
@@ -286,7 +286,7 @@ static HRESULT format_type(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
   _tcsncat(pResult, name, max);
 
   return S_OK;
-}  /* format_type */
+}
 
 /**
  * format an irg
@@ -339,7 +339,7 @@ static HRESULT format_irg(DEBUGHELPER *pHelper, int nBase, const void *addr, cha
   }
   _tcsncat(pResult, name, max);
   return S_OK;
-}  /* format_irg */
+}
 
 /**
  * format an ir_op
@@ -353,7 +353,7 @@ HRESULT format_op(DEBUGHELPER *pHelper, const void *addr, char *pResult, size_t
   if (format_ident(pHelper, op.name, pResult, max) != S_OK)
     return E_FAIL;
   return S_OK;
-}  /* format_op */
+}
 
 /** get a temporary string */
 #define get_string(str)                                         \
@@ -473,7 +473,7 @@ static HRESULT format_tarval(DEBUGHELPER *pHelper, int nBase, const void *addr,
     }
   }
   return S_OK;
-}  /* format_tarval */
+}
 
 /**
  * format an ir_node
@@ -589,7 +589,7 @@ static HRESULT format_node(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
   _tcsncat(pResult, name, max);
 
   return S_OK;
-}  /* format_node */
+}
 
 /**
  * format a loop
@@ -601,7 +601,7 @@ static HRESULT format_loop(DEBUGHELPER *pHelper, const void *addr, char *pResult
   if (copy_from_debuggee(addr, pHelper, &loop, sizeof(loop)) != S_OK)
     return E_FAIL;
   return E_FAIL;
-}  /* format_loop */
+}
 
 /**
  * Get an array descriptor
@@ -613,7 +613,7 @@ static HRESULT get_array_desc(DEBUGHELPER *pHelper, const void *address, ir_arr_
     return E_FAIL;
 
   return S_OK;
-}  /* get_array_desc */
+}
 
 /**
  * format a ir_prog
@@ -653,7 +653,7 @@ static HRESULT format_prog(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
   _tcsncpy(pResult, name, max);
 
   return S_OK;
-}  /* format_prog */
+}
 
 /*
  * Format an array descriptor
@@ -690,7 +690,7 @@ HRESULT format_arr_descr(DEBUGHELPER *pHelper, int nBase, const void *addr, char
   _tcsncat(pResult, name, max);
 
   return S_OK;
-}  /* format_arr_descr */
+}
 
 /*
  * format a firm object
@@ -719,7 +719,7 @@ HRESULT FormatFirmObject(DEBUGHELPER *pHelper, int nBase, firm_kind kind, const
   default:
     return E_FAIL;
   }
-}  /* FormatFirmObject */
+}
 
 #define SEGMENT_SIZE_SHIFT     8
 #define SEGMENT_SIZE           (1 << SEGMENT_SIZE_SHIFT)
@@ -803,7 +803,7 @@ static HRESULT find_longest_pset_chain(DEBUGHELPER *pHelper, pset *set,
   *lenght = max_len;
   *size   = dyns;
   return S_OK;
-}  /* find_longest_pset_chain */
+}
 
 /**
  * Find the longest chain of a set
@@ -844,7 +844,7 @@ static HRESULT find_longest_set_chain(DEBUGHELPER *pHelper, set *set,
   *lenght = max_len;
   *size   = dyns;
   return S_OK;
-}  /* find_longest_set_chain */
+}
 
 /*
  * Format a pset
@@ -875,7 +875,7 @@ HRESULT format_pset(DEBUGHELPER *pHelper, int nBase, const void *address, char *
   _tcsncpy(pResult, name, max);
 
   return S_OK;
-}  /* format_pset */
+}
 
 /*
  * Format a set
@@ -906,7 +906,7 @@ HRESULT format_set(DEBUGHELPER *pHelper, int nBase, const void *address, char *p
   _tcsncpy(pResult, name, max);
 
   return S_OK;
-}  /* format_set */
+}
 
 struct pdeq {
   unsigned magic;       /**< debug magic, only available in DEBUG builds */
@@ -943,7 +943,7 @@ static int get_pdeq_len(DEBUGHELPER *pHelper, pdeq *dq)
   };
 
   return n;
-}  /* get_pdeq_len */
+}
 
 /*
  * Format a pdeq
@@ -974,7 +974,7 @@ HRESULT format_pdeq(DEBUGHELPER *pHelper, int nBase, const void *address, char *
   _tcsncpy(pResult, name, max);
 
   return S_OK;
-}  /* format_pdeq */
+}
 
 /** show the first 2 units */
 static HRESULT fill_bits(DEBUGHELPER *pHelper, bitset_t *bs, char *pResult)
@@ -1008,7 +1008,7 @@ end:
   }
   sprintf(pResult + l, "}");
   return S_OK;
-}  /* fill_bits */
+}
 
 /*
  * Format a bitset
@@ -1041,4 +1041,4 @@ HRESULT format_bitset(DEBUGHELPER *pHelper, int nBase, const void *address, char
   _tcsncpy(pResult, name, max);
 
   return S_OK;
-}  /* format_bitset */
+}