- C99 features removed
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 9 Sep 2008 09:54:42 +0000 (09:54 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 9 Sep 2008 09:54:42 +0000 (09:54 +0000)
- renamed second var i

[r21771]

ir/be/bespillbelady3.c
ir/be/beverify.c

index 57a50f6..53e719a 100644 (file)
@@ -422,8 +422,8 @@ static void val_used(worklist_t *worklist, ir_node *value, ir_node *sched_point)
 
 static void worklist_remove(worklist_t *worklist, ir_node *value)
 {
-       ir_fprintf(stderr, "removing %+F\n", value);
        worklist_entry_t *entry = get_irn_link(value);
+       ir_fprintf(stderr, "removing %+F\n", value);
        assert(entry != NULL);
        list_del(&entry->head);
        --worklist->n_live_values;
@@ -757,6 +757,8 @@ static void push_unused_livethrough(loop_info_t *loop_info, ir_node *value)
 
 static void push_unused_livethroughs(loop_info_t *loop_info)
 {
+       loop_edge_t *edge;
+
        /* we can only push unused livethroughs if register pressure inside the loop
         * was low enough */
        if (loop_info->max_register_pressure >= n_regs)
@@ -765,25 +767,26 @@ static void push_unused_livethroughs(loop_info_t *loop_info)
        /* find unused livethroughs: register pressure in the loop was low enough
         * which means that we had no spills which implies that at every point in
         * the loop all*/
-       loop_edge_t *edge = loop_info->exit_edges;
-       for ( ; edge != NULL; edge = edge->next) {
+       for (edge = loop_info->exit_edges; edge != NULL; edge = edge->next) {
                ir_node            *block          = edge->block;
                const block_info_t *info           = get_block_info(block);
                worklist_t         *start_worklist = info->start_worklist;
+               ir_node            *exit_block;
+               const block_info_t *exit_info;
+               worklist_t         *end_worklist;
+               struct list_head   *entry;
 
                if (start_worklist == NULL)
                        continue;
 
-               ir_node            *exit_block
-                       = get_Block_cfgpred_block(edge->block, edge->pos);
-               const block_info_t *exit_info    = get_block_info(exit_block);
-               worklist_t         *end_worklist = exit_info->end_worklist;
+               exit_block   = get_Block_cfgpred_block(edge->block, edge->pos);
+               exit_info    = get_block_info(exit_block);
+               end_worklist = exit_info->end_worklist;
 
                activate_worklist(end_worklist);
                /* all values contained in the start_worklist, which are not available
                 * in the end_worklist, must be unused livethroughs */
 
-               struct list_head *entry;
                list_for_each(entry, &start_worklist->live_values) {
                        worklist_entry_t *wl_entry
                                = list_entry(entry, worklist_entry_t, head);
index 4666220..a18a821 100644 (file)
@@ -822,20 +822,18 @@ static void verify_block_register_allocation(ir_node *block, void *data) {
        nregclasses = arch_env_get_n_reg_class(arch_env);
        for (i = 0; i < nregclasses; ++i) {
                ir_node               *node;
-               int                    i2;
+               int                   i2, lv_idx, n_regs;
 
                regclass = arch_env_get_reg_class(arch_env, i);
 
-               int i;
-
                assert(lv->nodes && "live sets must be computed");
 
-               int n_regs = arch_register_class_n_regs(regclass);
-               registers  = alloca(n_regs * sizeof(registers[0]));
+               n_regs    = arch_register_class_n_regs(regclass);
+               registers = alloca(n_regs * sizeof(registers[0]));
                memset(registers, 0, n_regs * sizeof(registers[0]));
 
-               be_lv_foreach(lv, block, be_lv_state_end, i) {
-                       ir_node *node = be_lv_get_irn(lv, block, i);
+               be_lv_foreach(lv, block, be_lv_state_end, lv_idx) {
+                       ir_node *node = be_lv_get_irn(lv, block, lv_idx);
                        value_used(node);
                }