diff options
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r-- | gcc/ira-build.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 09e22d74f6b..f9258ee3728 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -138,9 +138,10 @@ create_loop_tree_nodes (void) ira_bb_nodes = ((struct ira_loop_tree_node *) - ira_allocate (sizeof (struct ira_loop_tree_node) * last_basic_block)); - last_basic_block_before_change = last_basic_block; - for (i = 0; i < (unsigned int) last_basic_block; i++) + ira_allocate (sizeof (struct ira_loop_tree_node) + * last_basic_block_for_fn (cfun))); + last_basic_block_before_change = last_basic_block_for_fn (cfun); + for (i = 0; i < (unsigned int) last_basic_block_for_fn (cfun); i++) { ira_bb_nodes[i].regno_allocno_map = NULL; memset (ira_bb_nodes[i].reg_pressure, 0, @@ -2605,8 +2606,10 @@ remove_unnecessary_regions (bool all_p) mark_all_loops_for_removal (); else mark_loops_for_removal (); - children_vec.create (last_basic_block + number_of_loops (cfun)); - removed_loop_vec.create (last_basic_block + number_of_loops (cfun)); + children_vec.create (last_basic_block_for_fn (cfun) + + number_of_loops (cfun)); + removed_loop_vec.create (last_basic_block_for_fn (cfun) + + number_of_loops (cfun)); remove_uneccesary_loop_nodes_from_loop_tree (ira_loop_tree_root); children_vec.release (); if (all_p) |