diff options
author | Richard Henderson <rth@redhat.com> | 2002-07-21 17:23:47 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-07-21 17:23:47 -0700 |
commit | c67a1cf6a842249a064d479b455321e6663e4708 (patch) | |
tree | 270dccb5bfc81ab3da7eb1b086e39f7ee7bdafe0 /gcc/alias.c | |
parent | b68daef415643d8b384f939917b8802e300f1893 (diff) | |
download | gcc-c67a1cf6a842249a064d479b455321e6663e4708.zip gcc-c67a1cf6a842249a064d479b455321e6663e4708.tar.gz gcc-c67a1cf6a842249a064d479b455321e6663e4708.tar.bz2 |
emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL when flag_argument_noalias == 2.
* emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL
when flag_argument_noalias == 2.
* alias.c (nonoverlapping_memrefs_p): Handle that.
* print-rtl.c (print_mem_expr): Likewise.
From-SVN: r55633
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 2e6a2b0..68a8272 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1957,6 +1957,14 @@ nonoverlapping_memrefs_p (x, y) moffsetx = adjust_offset_for_component_ref (exprx, moffsetx); exprx = t; } + else if (TREE_CODE (exprx) == INDIRECT_REF) + { + exprx = TREE_OPERAND (exprx, 0); + if (flag_argument_noalias < 2 + || TREE_CODE (exprx) != PARM_DECL) + return 0; + } + moffsety = MEM_OFFSET (y); if (TREE_CODE (expry) == COMPONENT_REF) { @@ -1966,6 +1974,13 @@ nonoverlapping_memrefs_p (x, y) moffsety = adjust_offset_for_component_ref (expry, moffsety); expry = t; } + else if (TREE_CODE (expry) == INDIRECT_REF) + { + expry = TREE_OPERAND (expry, 0); + if (flag_argument_noalias < 2 + || TREE_CODE (expry) != PARM_DECL) + return 0; + } if (! DECL_P (exprx) || ! DECL_P (expry)) return 0; |