diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-05 19:33:55 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-05 19:33:55 +0000 |
commit | a306ee43540f4e4782dff4a4e09d1befa205405e (patch) | |
tree | 42fdab63279de985eda1b5dc05468e61bbddbb5d /gcc/tree-flow-inline.h | |
parent | d03ba86f0cc373f30e8838c73e598cc767491b92 (diff) | |
download | gcc-a306ee43540f4e4782dff4a4e09d1befa205405e.tar.gz |
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-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 7bc21b8bd3d..d8593bd19d3 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -1725,7 +1725,30 @@ var_can_have_subvars (const_tree v) return false; } - + +/* Return true, if the two ranges [POS1, SIZE1] and [POS2, SIZE2] + overlap. SIZE1 and/or SIZE2 can be (unsigned)-1 in which case the + range is open-ended. Otherwise return false. */ + +static inline bool +ranges_overlap_p (unsigned HOST_WIDE_INT pos1, + unsigned HOST_WIDE_INT size1, + unsigned HOST_WIDE_INT pos2, + unsigned HOST_WIDE_INT size2) +{ + if (pos1 >= pos2 + && (size2 == (unsigned HOST_WIDE_INT)-1 + || pos1 < (pos2 + size2))) + return true; + if (pos2 >= pos1 + && (size1 == (unsigned HOST_WIDE_INT)-1 + || pos2 < (pos1 + size1))) + return true; + + return false; +} + + /* Return true if OFFSET and SIZE define a range that overlaps with some portion of the range of SV, a subvar. If there was an exact overlap, *EXACT will be set to true upon return. */ |