]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it refers to...
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>
Mon, 3 Feb 2003 20:56:29 +0000 (20:56 +0000)
committerFranz Sirl <sirl@gcc.gnu.org>
Mon, 3 Feb 2003 20:56:29 +0000 (20:56 +0000)
2003-02-03  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

Backport following patch:

2002-08-01  Richard Henderson  <rth@redhat.com>

* integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it
refers to a subroutine parameter.

From-SVN: r62342

gcc/ChangeLog
gcc/integrate.c

index ff6b5a639e588354bffa2aebfd31eda0be9937a7..65ce1a4144550e7af0a507d7cdc2721778746f8a 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-03  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       Backport following patch:
+
+       2002-08-01  Richard Henderson  <rth@redhat.com>
+
+       * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it
+       refers to a subroutine parameter.
+
 2003-02-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * cfgcleanup.c (try_forward_edges): Check for null insn.
index d90e776637f0e92ba8a6eb028bbb2ad65d0709c1..ce2962d2cce78c0306de05bcd98cdc15737ec25a 100644 (file)
@@ -2320,6 +2320,13 @@ copy_rtx_and_substitute (orig, map, for_lhs)
       if (inlining && !for_lhs)
        RTX_UNCHANGING_P (copy) = 0;
 
+      /* If inlining, squish aliasing data that references the subroutine's
+        parameter list, since that's no longer applicable.  */
+      if (inlining && MEM_EXPR (copy)
+         && TREE_CODE (MEM_EXPR (copy)) == INDIRECT_REF
+         && TREE_CODE (TREE_OPERAND (MEM_EXPR (copy), 0)) == PARM_DECL)
+       set_mem_expr (copy, NULL_TREE);
+
       return copy;
 
     default: