diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-11-08 04:56:18 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-11-08 04:56:18 +0000 |
commit | 4da896b292ef313d2c365eefc33c088f77f71baf (patch) | |
tree | 208424c6ec3b805174618dc54704dbe65bd2d6fc /gcc/toplev.c | |
parent | 8d170590175c07873ad68a42c5cc98457edba4d9 (diff) | |
download | gcc-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/toplev.c')
-rw-r--r-- | gcc/toplev.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 89bef06..ef5a1fc 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3240,7 +3240,7 @@ compile_file (name) { int len = list_length (globals); - tree *vec = (tree *) alloca (sizeof (tree) * len); + tree *vec = (tree *) xmalloc (sizeof (tree) * len); int i; tree decl; @@ -3267,6 +3267,9 @@ compile_file (name) output_exception_table (); check_global_declarations (vec, len); + + /* Clean up. */ + free (vec); } /* Write out any pending weak symbol declarations. */ @@ -5289,18 +5292,6 @@ main (argc, argv) --p; progname = p; -#if defined (RLIMIT_STACK) && defined (HAVE_GETRLIMIT) && defined (HAVE_SETRLIMIT) - /* Get rid of any avoidable limit on stack size. */ - { - struct rlimit rlim; - - /* Set the stack limit huge so that alloca does not fail. */ - getrlimit (RLIMIT_STACK, &rlim); - rlim.rlim_cur = rlim.rlim_max; - setrlimit (RLIMIT_STACK, &rlim); - } -#endif - #ifdef HAVE_LC_MESSAGES setlocale (LC_MESSAGES, ""); #endif |