summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 16:45:44 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 16:45:44 +0000
commit3cafcd208bc63954c0440da210594850c46af23f (patch)
tree43b7642e6ba0465e4a784b763d07ca8ebb802582 /gcc/tree-ssa-alias.c
parent81acd162118ee452e748ec3af1630742e79457bc (diff)
downloadgcc-3cafcd208bc63954c0440da210594850c46af23f.tar.gz
2009-09-16 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 151762 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 9522b28c548..e619190386c 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -208,6 +208,14 @@ ptr_deref_may_alias_decl_p (tree ptr, tree decl)
if (!pi)
return true;
+ /* If the decl can be used as a restrict tag and we have a restrict
+ pointer and that pointers points-to set doesn't contain this decl
+ then they can't alias. */
+ if (DECL_RESTRICTED_P (decl)
+ && TYPE_RESTRICT (TREE_TYPE (ptr))
+ && pi->pt.vars_contains_restrict)
+ return bitmap_bit_p (pi->pt.vars, DECL_UID (decl));
+
return pt_solution_includes (&pi->pt, decl);
}