summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 15:19:27 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 15:19:27 +0000
commit84e39114ef36f4f202028695936e3725b9a08474 (patch)
tree1b76344540036a57ec23806ad0e4e22b62c916c3 /gcc/tree-ssa-structalias.c
parentf778423557464b07c76cbf36e2032cccb94c02bc (diff)
downloadgcc-84e39114ef36f4f202028695936e3725b9a08474.tar.gz
2008-03-11 Basile Starynkevitch <basile@starynkevitch.net>
merged with trunk r133107 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133113 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 70a9d3212c6..31ab38f8cfa 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -2630,25 +2630,6 @@ bitpos_of_field (const tree fdecl)
}
-/* Return true if an access to [ACCESSPOS, ACCESSSIZE]
- overlaps with a field at [FIELDPOS, FIELDSIZE] */
-
-static bool
-offset_overlaps_with_access (const unsigned HOST_WIDE_INT fieldpos,
- const unsigned HOST_WIDE_INT fieldsize,
- const unsigned HOST_WIDE_INT accesspos,
- const unsigned HOST_WIDE_INT accesssize)
-{
- if (fieldpos == accesspos && fieldsize == accesssize)
- return true;
- if (accesspos >= fieldpos && accesspos < (fieldpos + fieldsize))
- return true;
- if (accesspos < fieldpos && (accesspos + accesssize > fieldpos))
- return true;
-
- return false;
-}
-
/* Given a COMPONENT_REF T, return the constraint_expr for it. */
static void
@@ -2713,8 +2694,8 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results)
varinfo_t curr;
for (curr = get_varinfo (result->var); curr; curr = curr->next)
{
- if (offset_overlaps_with_access (curr->offset, curr->size,
- result->offset, bitmaxsize))
+ if (ranges_overlap_p (curr->offset, curr->size,
+ result->offset, bitmaxsize))
{
result->var = curr->id;
break;