aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1997-10-25 00:50:35 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1997-10-24 20:50:35 -0400
commitf15e65f1fe52a4c44d77988516308812e18b56bd (patch)
treece44fb46b63f097c1206fe21b2c6af6470c40723
parent17ad8a3bb9d5d8ccee55b08abba6fb154e5cf32b (diff)
downloadgcc-f15e65f1fe52a4c44d77988516308812e18b56bd.zip
gcc-f15e65f1fe52a4c44d77988516308812e18b56bd.tar.gz
gcc-f15e65f1fe52a4c44d77988516308812e18b56bd.tar.bz2
integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.
* integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc. fixes many of the inlining problems causing various suite++ and perennial test failures, among others From-SVN: r16171
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/integrate.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d26d464..37fc943 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+Fri Oct 24 17:49:10 1997 Jim Wilson <wilson@cygnus.com>
+
+ * integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.
+
Fri Oct 24 17:40:34 1997 Jeffrey A Law (law@cygnus.com)
* mn10200.c (indirect_memory_operand): Delete unused function.
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 27aa4df..c629050 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -413,6 +413,7 @@ save_for_inline_copying (fndecl)
int max_uid;
rtx first_nonparm_insn;
char *new, *new1;
+ rtx *new2;
/* Make and emit a return-label if we have not already done so.
Do this before recording the bounds on label numbers. */
@@ -538,6 +539,16 @@ save_for_inline_copying (fndecl)
XEXP (regno_reg_rtx[i], 0)
= copy_for_inline (XEXP (regno_reg_rtx[i], 0));
+ /* Copy the parm_reg_stack_loc array, and substitute for all of the rtx
+ contained in it. */
+ new2 = savealloc (max_parm_reg * sizeof (rtx));
+ bcopy ((char *) parm_reg_stack_loc, (char *) new2,
+ max_parm_reg * sizeof (rtx));
+ parm_reg_stack_loc = new2;
+ for (i = LAST_VIRTUAL_REGISTER + 1; i < max_parm_reg; ++i)
+ if (parm_reg_stack_loc[i])
+ parm_reg_stack_loc[i] = copy_for_inline (parm_reg_stack_loc[i]);
+
/* Copy the tree of subblocks of the function, and the decls in them.
We will use the copy for compiling this function, then restore the original
subblocks and decls for use when inlining this function.