aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-08 04:56:18 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-08 04:56:18 +0000
commit4da896b292ef313d2c365eefc33c088f77f71baf (patch)
tree208424c6ec3b805174618dc54704dbe65bd2d6fc /gcc/except.c
parent8d170590175c07873ad68a42c5cc98457edba4d9 (diff)
downloadgcc-4da896b292ef313d2c365eefc33c088f77f71baf.zip
gcc-4da896b292ef313d2c365eefc33c088f77f71baf.tar.gz
gcc-4da896b292ef313d2c365eefc33c088f77f71baf.tar.bz2
cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc.
* cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc. * except.c (update_rethrow_references): Likewise. (init_eh_nesting_info): Likewise. * function.c (identify_blocks): Likewise. * gcse.c (dump_hash_table): Likewise. * graph.c (print_rtl_graph_with_bb): Likewise. * loop.c (combine_movables): Likewise. (move_movables): Likewise. (count_loop_regs_set): Likewise. (strength_reduce): Likewise. * profile.c (compute_branch_probabilities): New function, split out from ... (branch_prob): Here. Replace alloca with xmalloc/xcalloc. * regclass.c (regclass): Likewise. * regmove.c (regmove_optimize): Likewise. * toplev.c (compile_file): Likewise. (main): Don't mess with the stack rlimit. From-SVN: r30445
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/except.c b/gcc/except.c
index c6f7bf5..15bd28d 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2703,10 +2703,8 @@ update_rethrow_references ()
if (!flag_new_exceptions)
return;
- saw_region = (int *) alloca (current_func_eh_entry * sizeof (int));
- saw_rethrow = (int *) alloca (current_func_eh_entry * sizeof (int));
- bzero ((char *) saw_region, (current_func_eh_entry * sizeof (int)));
- bzero ((char *) saw_rethrow, (current_func_eh_entry * sizeof (int)));
+ saw_region = (int *) xcalloc (current_func_eh_entry, sizeof (int));
+ saw_rethrow = (int *) xcalloc (current_func_eh_entry, sizeof (int));
/* Determine what regions exist, and whether there are any rethrows
to those regions or not. */
@@ -2735,6 +2733,10 @@ update_rethrow_references ()
for (x = 0; x < current_func_eh_entry; x++)
if (saw_region[x])
function_eh_regions[x].rethrow_ref = saw_rethrow[x];
+
+ /* Clean up. */
+ free (saw_region);
+ free (saw_rethrow);
}
/* Various hooks for the DWARF 2 __throw routine. */
@@ -3155,9 +3157,7 @@ init_eh_nesting_info ()
info = (eh_nesting_info *) xmalloc (sizeof (eh_nesting_info));
info->region_index = (int *) xcalloc ((max_label_num () + 1), sizeof (int));
-
- nested_eh_region = (int *) alloca ((max_label_num () + 1) * sizeof (int));
- bzero ((char *) nested_eh_region, (max_label_num () + 1) * sizeof (int));
+ nested_eh_region = (int *) xcalloc (max_label_num () + 1, sizeof (int));
/* Create the nested_eh_region list. If indexed with a block number, it
returns the block number of the next outermost region, if any.
@@ -3189,6 +3189,7 @@ init_eh_nesting_info ()
{
free (info->region_index);
free (info);
+ free (nested_eh_region);
return NULL;
}
@@ -3205,6 +3206,10 @@ init_eh_nesting_info ()
process_nestinfo (x, info, nested_eh_region);
}
info->region_count = region_count;
+
+ /* Clean up. */
+ free (nested_eh_region);
+
return info;
}