diff options
author | brolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-08-25 11:02:51 +0000 |
---|---|---|
committer | brolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-08-25 11:02:51 +0000 |
commit | 829c0ce92dd2c87f9fd398ccf8ec3cab5df4e6f5 (patch) | |
tree | be9b4cfb8c41132f388bc870d0c9b533cdb592ee /gcc/stupid.c | |
parent | 2aafe30f59b3f3c08be3a28d2e649640acb08aa2 (diff) | |
download | gcc-829c0ce92dd2c87f9fd398ccf8ec3cab5df4e6f5.tar.gz |
PR gcc/16300
Tue Aug 25 13:19:46 1998 Dave Brolley <brolley@cygnus.com>
* regclass.c (regclass): Use xmalloc/free instead of alloca.
* stupid.c (stupid_life_analysis): Ditto.
* reload1.c (reload): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stupid.c')
-rw-r--r-- | gcc/stupid.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/gcc/stupid.c b/gcc/stupid.c index 718c39b6c04..dbb0ffeccc9 100644 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -135,7 +135,7 @@ stupid_life_analysis (f, nregs, file) bzero (regs_ever_live, sizeof regs_ever_live); - regs_live = (char *) alloca (nregs); + regs_live = (char *) xmalloc (nregs); /* First find the last real insn, and count the number of insns, and assign insns their suids. */ @@ -145,7 +145,7 @@ stupid_life_analysis (f, nregs, file) i = INSN_UID (insn); max_uid = i + 1; - uid_suid = (int *) alloca ((i + 1) * sizeof (int)); + uid_suid = (int *) xmalloc ((i + 1) * sizeof (int)); /* Compute the mapping from uids to suids. Suids are numbers assigned to insns, like uids, @@ -168,19 +168,19 @@ stupid_life_analysis (f, nregs, file) /* Allocate tables to record info about regs. */ - reg_where_dead = (int *) alloca (nregs * sizeof (int)); + reg_where_dead = (int *) xmalloc (nregs * sizeof (int)); bzero ((char *) reg_where_dead, nregs * sizeof (int)); - reg_where_born = (int *) alloca (nregs * sizeof (int)); + reg_where_born = (int *) xmalloc (nregs * sizeof (int)); bzero ((char *) reg_where_born, nregs * sizeof (int)); - reg_order = (int *) alloca (nregs * sizeof (int)); + reg_order = (int *) xmalloc (nregs * sizeof (int)); bzero ((char *) reg_order, nregs * sizeof (int)); - regs_change_size = (char *) alloca (nregs * sizeof (char)); + regs_change_size = (char *) xmalloc (nregs * sizeof (char)); bzero ((char *) regs_change_size, nregs * sizeof (char)); - regs_crosses_setjmp = (char *) alloca (nregs * sizeof (char)); + regs_crosses_setjmp = (char *) xmalloc (nregs * sizeof (char)); bzero ((char *) regs_crosses_setjmp, nregs * sizeof (char)); /* Allocate the reg_renumber array */ @@ -189,7 +189,7 @@ stupid_life_analysis (f, nregs, file) reg_renumber[i] = i; after_insn_hard_regs - = (HARD_REG_SET *) alloca (max_suid * sizeof (HARD_REG_SET)); + = (HARD_REG_SET *) xmalloc (max_suid * sizeof (HARD_REG_SET)); bzero ((char *) after_insn_hard_regs, max_suid * sizeof (HARD_REG_SET)); @@ -316,6 +316,15 @@ stupid_life_analysis (f, nregs, file) if (file) dump_flow_info (file); + + free (regs_live); + free (uid_suid); + free (reg_where_dead); + free (reg_where_born); + free (reg_order); + free (regs_change_size); + free (regs_crosses_setjmp); + free (after_insn_hard_regs); } /* Comparison function for qsort. |