aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.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/cse.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/cse.c')
-rw-r--r--gcc/cse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index bac710b..2071bd2 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7364,7 +7364,7 @@ delete_trivially_dead_insns (insns, nreg)
rtx insns;
int nreg;
{
- int *counts = (int *) alloca (nreg * sizeof (int));
+ int *counts;
rtx insn, prev;
#ifdef HAVE_cc0
rtx tem;
@@ -7373,7 +7373,7 @@ delete_trivially_dead_insns (insns, nreg)
int in_libcall = 0, dead_libcall = 0;
/* First count the number of times each register is used. */
- bzero ((char *) counts, sizeof (int) * nreg);
+ counts = (int *) xcalloc (nreg, sizeof (int));
for (insn = next_real_insn (insns); insn; insn = next_real_insn (insn))
count_reg_usage (insn, counts, NULL_RTX, 1);
@@ -7508,4 +7508,7 @@ delete_trivially_dead_insns (insns, nreg)
dead_libcall = 0;
}
}
+
+ /* Clean up. */
+ free (counts);
}