diff options
author | Richard Guenther <rguenther@suse.de> | 2008-03-05 19:33:55 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-03-05 19:33:55 +0000 |
commit | 63d195d54831cf004606e99dff8ca706939635f4 (patch) | |
tree | 42fdab63279de985eda1b5dc05468e61bbddbb5d /gcc/tree-ssa-structalias.c | |
parent | ea7e6d5ae0e3b5d14740bd33d55302a73f6d2b32 (diff) | |
download | gcc-63d195d54831cf004606e99dff8ca706939635f4.zip gcc-63d195d54831cf004606e99dff8ca706939635f4.tar.gz gcc-63d195d54831cf004606e99dff8ca706939635f4.tar.bz2 |
tree-ssa-structalias.c (get_constraint_for_component_ref): Use ranges_overlap_p.
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.
From-SVN: r132950
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 70a9d32..31ab38f 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; |