From: Franz Sirl Date: Mon, 3 Feb 2003 20:56:29 +0000 (+0000) Subject: backport: integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it refers to... X-Git-Tag: releases/gcc-3.2.2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33b2a2e04ae9067ac53c21ff317dc1b8526b20bb;p=thirdparty%2Fgcc.git backport: integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it refers to a subroutine parameter. 2003-02-03 Franz Sirl Backport following patch: 2002-08-01 Richard Henderson * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it refers to a subroutine parameter. From-SVN: r62342 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ff6b5a639e58..65ce1a414455 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-02-03 Franz Sirl + + Backport following patch: + + 2002-08-01 Richard Henderson + + * integrate.c (copy_rtx_and_substitute): Squash MEM_EXPR when it + refers to a subroutine parameter. + 2003-02-03 Eric Botcazou * cfgcleanup.c (try_forward_edges): Check for null insn. diff --git a/gcc/integrate.c b/gcc/integrate.c index d90e776637f0..ce2962d2cce7 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -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: