aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-05-14 10:21:54 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-05-14 10:21:54 -0700
commita70f7bb27e99a4e028cf4b60738fe548d947808d (patch)
tree8c775ffd1410d30839ff5822787252b925ee563f /gcc
parentec193993f9d1ac17f5489056059c37a7cfb2788e (diff)
downloadgcc-a70f7bb27e99a4e028cf4b60738fe548d947808d.zip
gcc-a70f7bb27e99a4e028cf4b60738fe548d947808d.tar.gz
gcc-a70f7bb27e99a4e028cf4b60738fe548d947808d.tar.bz2
(expand_inline_function): Set map->integrating.
(copy_rtx_and_substitute, case MEM): Don't copy RTX_UNCHANGING_P when doing function inlining. From-SVN: r4453
Diffstat (limited to 'gcc')
-rw-r--r--gcc/integrate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 6a7fef5..6ad951e 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1289,6 +1289,8 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
map->min_insnno = 0;
map->max_insnno = INSN_UID (header);
+ map->integrating = 1;
+
/* const_equiv_map maps pseudos in our routine to constants, so it needs to
be large enough for all our pseudos. This is the number we are currently
using plus the number in the called routine, plus 15 for each arg,
@@ -2157,7 +2159,15 @@ copy_rtx_and_substitute (orig, map)
XEXP (copy, 0) = copy_rtx_and_substitute (XEXP (orig, 0), map);
MEM_IN_STRUCT_P (copy) = MEM_IN_STRUCT_P (orig);
MEM_VOLATILE_P (copy) = MEM_VOLATILE_P (orig);
- RTX_UNCHANGING_P (copy) = RTX_UNCHANGING_P (orig);
+
+ /* If doing function inlining, this MEM might not be const in the
+ function that it is being inlined into, and thus may not be
+ unchanging after function inlining. Constant pool references are
+ handled elsewhere, so this doesn't lose RTX_UNCHANGING_P bits
+ for them. */
+ if (! map->integrating)
+ RTX_UNCHANGING_P (copy) = RTX_UNCHANGING_P (orig);
+
return copy;
}