diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 9b00248..798a2f7 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6586,11 +6586,11 @@ fixup_loop_arrays_after_move (struct function *fn1, struct function *fn2, struct loop *loop) { /* Discard it from the old loop array. */ - (*fn1->x_current_loops->larray)[loop->num] = NULL; + (*get_loops (fn1))[loop->num] = NULL; /* Place it in the new loop array, assigning it a new number. */ - loop->num = vec_safe_length (fn2->x_current_loops->larray); - vec_safe_push (fn2->x_current_loops->larray, loop); + loop->num = number_of_loops (fn2); + vec_safe_push (loops_for_fn (fn2)->larray, loop); /* Recurse to children. */ for (loop = loop->inner; loop; loop = loop->next) @@ -6717,9 +6717,10 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb, } /* Initialize an empty loop tree. */ - dest_cfun->x_current_loops = ggc_alloc_cleared_loops (); - init_loops_structure (dest_cfun, dest_cfun->x_current_loops, 1); - dest_cfun->x_current_loops->state = LOOPS_MAY_HAVE_MULTIPLE_LATCHES; + struct loops *loops = ggc_alloc_cleared_loops (); + init_loops_structure (dest_cfun, loops, 1); + loops->state = LOOPS_MAY_HAVE_MULTIPLE_LATCHES; + set_loops_for_fn (dest_cfun, loops); /* Move the outlined loop tree part. */ FOR_EACH_VEC_ELT (bbs, i, bb) @@ -6729,25 +6730,25 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb, { struct loop *loop = bb->loop_father; flow_loop_tree_node_remove (bb->loop_father); - flow_loop_tree_node_add (dest_cfun->x_current_loops->tree_root, loop); + flow_loop_tree_node_add (get_loop (dest_cfun, 0), loop); fixup_loop_arrays_after_move (saved_cfun, cfun, loop); } /* Remove loop exits from the outlined region. */ - if (saved_cfun->x_current_loops->exits) + if (loops_for_fn (saved_cfun)->exits) FOR_EACH_EDGE (e, ei, bb->succs) { void **slot = htab_find_slot_with_hash - (saved_cfun->x_current_loops->exits, e, + (loops_for_fn (saved_cfun)->exits, e, htab_hash_pointer (e), NO_INSERT); if (slot) - htab_clear_slot (saved_cfun->x_current_loops->exits, slot); + htab_clear_slot (loops_for_fn (saved_cfun)->exits, slot); } } /* Adjust the number of blocks in the tree root of the outlined part. */ - dest_cfun->x_current_loops->tree_root->num_nodes = bbs.length () + 2; + get_loop (dest_cfun, 0)->num_nodes = bbs.length () + 2; /* Setup a mapping to be used by move_block_to_fn. */ loop->aux = current_loops->tree_root; @@ -7226,7 +7227,7 @@ debug_loop (struct loop *loop, int verbosity) DEBUG_FUNCTION void debug_loop_num (unsigned num, int verbosity) { - debug_loop (get_loop (num), verbosity); + debug_loop (get_loop (cfun, num), verbosity); } /* Return true if BB ends with a call, possibly followed by some |