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/regmove.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/regmove.c')
-rw-r--r-- | gcc/regmove.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 7b0b74a..8b047ea 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -1099,10 +1099,10 @@ regmove_optimize (f, nregs, regmove_dump_file) can supress some optimizations in those zones. */ mark_flags_life_zones (discover_flags_reg ()); - regno_src_regno = (int *)alloca (sizeof *regno_src_regno * nregs); + regno_src_regno = (int *) xmalloc (sizeof *regno_src_regno * nregs); for (i = nregs; --i >= 0; ) regno_src_regno[i] = -1; - regmove_bb_head = (int *)alloca (sizeof (int) * (old_max_uid + 1)); + regmove_bb_head = (int *) xmalloc (sizeof (int) * (old_max_uid + 1)); for (i = old_max_uid; i >= 0; i--) regmove_bb_head[i] = -1; for (i = 0; i < n_basic_blocks; i++) regmove_bb_head[INSN_UID (BLOCK_HEAD (i))] = i; @@ -1114,7 +1114,7 @@ regmove_optimize (f, nregs, regmove_dump_file) for (pass = 0; pass <= 2; pass++) { if (! flag_regmove && pass >= flag_expensive_optimizations) - return; + goto done; if (regmove_dump_file) fprintf (regmove_dump_file, "Starting %s pass...\n", @@ -1574,6 +1574,11 @@ regmove_optimize (f, nregs, regmove_dump_file) new = next, next = NEXT_INSN (new); BLOCK_END (i) = new; } + + done: + /* Clean up. */ + free (regno_src_regno); + free (regmove_bb_head); } /* Returns nonzero if INSN's pattern has matching constraints for any operand. |