diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-22 00:23:47 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-22 00:23:47 +0000 |
commit | 2d8fe5d004f9b3fb52ea63fc74aca6d70f1f5fa9 (patch) | |
tree | 270dccb5bfc81ab3da7eb1b086e39f7ee7bdafe0 /gcc/alias.c | |
parent | f4dbfb4e9e3e291fd9218c829ff31b87b4af70af (diff) | |
download | gcc-2d8fe5d004f9b3fb52ea63fc74aca6d70f1f5fa9.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55633 138bc75d-0d04-0410-961f-82ee72b054a4
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 2e6a2b084e1..68a827224fa 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; |