summaryrefslogtreecommitdiffstats
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-05 19:33:55 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-05 19:33:55 +0000
commita306ee43540f4e4782dff4a4e09d1befa205405e (patch)
tree42fdab63279de985eda1b5dc05468e61bbddbb5d /gcc/tree-ssa-structalias.c
parentd03ba86f0cc373f30e8838c73e598cc767491b92 (diff)
downloadppe42-gcc-a306ee43540f4e4782dff4a4e09d1befa205405e.tar.gz
ppe42-gcc-a306ee43540f4e4782dff4a4e09d1befa205405e.zip
2008-03-05 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (get_constraint_for_component_ref): Use ranges_overlap_p. (offset_overlaps_with_access): Rename to ranges_overlap_p and move ... * tree-flow-inline.h (ranges_overlap_p): ... here. * tree.h (get_inner_reference, handled_component_p): Update comments. * tree.h (record_component_aliases, get_alias_set, alias_sets_conflict_p, alias_sets_must_conflict_p, objects_must_conflict_p): Move declarations ... * alias.h (record_component_aliases, get_alias_set, alias_sets_conflict_p, alias_sets_must_conflict_p, objects_must_conflict_p): ... here. Include coretypes.h. * Makefile.in (ALIAS_H): Add coretypes.h dependency. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132950 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;
OpenPOWER on IntegriCloud