summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2013-10-09 13:42:17 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2013-10-09 13:42:17 +0000
commitcc524fc7b800bff51dc86d05d8ce80d9c5524ef3 (patch)
tree40318ce4bf8ae61fbdc6507579e982b6008fb23f /gcc/tree-ssa-alias.h
parent713438778be52a0cb0533fad271c05481435b519 (diff)
downloadgcc-cc524fc7b800bff51dc86d05d8ce80d9c5524ef3.tar.gz
tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h.
* tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h. (struct int_tree_map): Move to tree-hasher.h (SCALE, LABEL, PERCENT): Move to gimple.h * tree-flow-inline.h: Delete. Move functions to other files. (unmodifiable_var_p, ref_contains_array_ref): Unused, so delete. * gimple-ssa.h (tm_restart_node, gimple_df): Relocate from tree-flow.h. (gimple_in_ssa_p, gimple_vop): Relocate from tree-flow-inline.h * gimple.h (imple_stmt_max_uid, set_gimple_stmt_max_uid, inc_gimple_stmt_max_uid, get_lineno): Relocate from tree-flow-inline.h. (SCALE, LABEL, PERCENT): Relocate from tree-flow.h * tree-hasher.h: Don't include tree-flow.h. (struct int_tree_map): Relocate from tree-flow.h. * tree-sra.c (contains_view_convert_expr_p): Relocate from tree-flow-inline.h and make static. * tree-ssa-alias.h (ranges_overlap_p): Relocate from tree-flow-inline.h. * tree-ssa-operands.c (gimple_ssa_operands): Relocate from tree-flow-inline.h and make static. * tree.h (is_global_var, may_be_aliased): Relocate from tree-flow-inline.h. * Makefile.in (GTFILES): Remove tree-flow.h and add gimple-ssa.h. * value-prof.c: No longer include tree-flow-inline.h. * tree-switch-conversion.c: No longer include tree-flow-inline.h. From-SVN: r203318
Diffstat (limited to 'gcc/tree-ssa-alias.h')
-rw-r--r--gcc/tree-ssa-alias.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.h b/gcc/tree-ssa-alias.h
index e560685028b..831cffebecb 100644
--- a/gcc/tree-ssa-alias.h
+++ b/gcc/tree-ssa-alias.h
@@ -141,5 +141,28 @@ extern void dump_pta_stats (FILE *);
extern GTY(()) struct pt_solution ipa_escaped_pt;
+/* 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;
+}
+
+
#endif /* TREE_SSA_ALIAS_H */