diff options
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r-- | gcc/ira-build.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c index 09e22d74f6b..0396f379f00 100644 --- a/gcc/ira-build.c +++ b/gcc/ira-build.c @@ -1,5 +1,5 @@ /* Building internal representation for IRA. - Copyright (C) 2006-2013 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmakarov@redhat.com>. This file is part of GCC. @@ -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, @@ -340,7 +341,7 @@ form_loop_tree (void) /* We can not use loop/bb node access macros because of potential checking and because the nodes are not initialized enough yet. */ - FOR_EACH_BB (bb) + FOR_EACH_BB_FN (bb, cfun) { bb_node = &ira_bb_nodes[bb->index]; bb_node->bb = bb; @@ -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) |