summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.h
diff options
context:
space:
mode:
authorrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-22 20:36:22 +0000
committerrus <rus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-22 20:36:22 +0000
commit19f10e6299103d689242595814fbfbe645e43d2b (patch)
tree991c568e6cc349d332410fed35b5307113d81e83 /gcc/tree-ssa-alias.h
parentbf32534d44b15c2e38cf759146dbc72053532f0b (diff)
downloadgcc-19f10e6299103d689242595814fbfbe645e43d2b.tar.gz
merge from trunk latest revision 151935
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/profile-stdlib@152045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.h')
-rw-r--r--gcc/tree-ssa-alias.h74
1 files changed, 47 insertions, 27 deletions
diff --git a/gcc/tree-ssa-alias.h b/gcc/tree-ssa-alias.h
index bc96712f790..49706925836 100644
--- a/gcc/tree-ssa-alias.h
+++ b/gcc/tree-ssa-alias.h
@@ -24,26 +24,6 @@
#include "coretypes.h"
-/* The reasons a variable may escape a function. */
-enum escape_type
-{
- NO_ESCAPE = 0, /* Doesn't escape. */
- ESCAPE_STORED_IN_GLOBAL = 1 << 0,
- ESCAPE_TO_ASM = 1 << 1, /* Passed by address to an assembly
- statement. */
- ESCAPE_TO_CALL = 1 << 2, /* Escapes to a function call. */
- ESCAPE_BAD_CAST = 1 << 3, /* Cast from pointer to integer */
- ESCAPE_TO_RETURN = 1 << 4, /* Returned from function. */
- ESCAPE_TO_PURE_CONST = 1 << 5, /* Escapes to a pure or constant
- function call. */
- ESCAPE_IS_GLOBAL = 1 << 6, /* Is a global variable. */
- ESCAPE_IS_PARM = 1 << 7, /* Is an incoming function argument. */
- ESCAPE_UNKNOWN = 1 << 8 /* We believe it escapes for
- some reason not enumerated
- above. */
-};
-
-
/* The points-to solution.
The points-to solution is a union of pt_vars and the abstract
@@ -69,25 +49,62 @@ struct GTY(()) pt_solution
/* Nonzero if the pt_vars bitmap includes a global variable. */
unsigned int vars_contains_global : 1;
+ /* Nonzero if the pt_vars bitmap includes a restrict tag variable. */
+ unsigned int vars_contains_restrict : 1;
+
/* Set of variables that this pointer may point to. */
bitmap vars;
};
+/* Simplified and cached information about a memory reference tree.
+ Used by the alias-oracle internally and externally in alternate
+ interfaces. */
+typedef struct ao_ref_s
+{
+ /* The original full memory reference tree or NULL_TREE if that is
+ not available. */
+ tree ref;
+
+ /* The following fields are the decomposed reference as returned
+ by get_ref_base_and_extent. */
+ /* The base object of the memory reference or NULL_TREE if all of
+ the following fields are not yet computed. */
+ tree base;
+ /* The offset relative to the base. */
+ HOST_WIDE_INT offset;
+ /* The size of the access. */
+ HOST_WIDE_INT size;
+ /* The maximum possible extent of the access or -1 if unconstrained. */
+ HOST_WIDE_INT max_size;
+
+ /* The alias set of the access or -1 if not yet computed. */
+ alias_set_type ref_alias_set;
+
+ /* The alias set of the base object or -1 if not yet computed. */
+ alias_set_type base_alias_set;
+} ao_ref;
+
+
/* In tree-ssa-alias.c */
-extern enum escape_type is_escape_site (gimple);
+extern void ao_ref_init (ao_ref *, tree);
+extern void ao_ref_init_from_ptr_and_size (ao_ref *, tree, tree);
+extern tree ao_ref_base (ao_ref *);
+extern alias_set_type ao_ref_alias_set (ao_ref *);
extern bool ptr_deref_may_alias_global_p (tree);
extern bool refs_may_alias_p (tree, tree);
+extern bool refs_may_alias_p_1 (ao_ref *, ao_ref *, bool);
extern bool refs_anti_dependent_p (tree, tree);
extern bool refs_output_dependent_p (tree, tree);
extern bool ref_maybe_used_by_stmt_p (gimple, tree);
extern bool stmt_may_clobber_ref_p (gimple, tree);
-extern void *walk_non_aliased_vuses (tree, tree,
- void *(*)(tree, tree, void *),
- void *(*)(tree *, tree, void *), void *);
-extern unsigned int walk_aliased_vdefs (tree, tree,
- bool (*)(tree, tree, void *), void *,
- bitmap *);
+extern bool stmt_may_clobber_ref_p_1 (gimple, ao_ref *);
+extern void *walk_non_aliased_vuses (ao_ref *, tree,
+ void *(*)(ao_ref *, tree, void *),
+ void *(*)(ao_ref *, tree, void *), void *);
+extern unsigned int walk_aliased_vdefs (ao_ref *, tree,
+ bool (*)(ao_ref *, tree, void *),
+ void *, bitmap *);
extern struct ptr_info_def *get_ptr_info (tree);
extern void dump_alias_info (FILE *);
extern void debug_alias_info (void);
@@ -103,7 +120,10 @@ extern void delete_alias_heapvars (void);
extern bool pt_solution_includes_global (struct pt_solution *);
extern bool pt_solution_includes (struct pt_solution *, const_tree);
extern bool pt_solutions_intersect (struct pt_solution *, struct pt_solution *);
+extern bool pt_solutions_same_restrict_base (struct pt_solution *,
+ struct pt_solution *);
extern void pt_solution_reset (struct pt_solution *);
+extern void pt_solution_set (struct pt_solution *, bitmap);
extern void dump_pta_stats (FILE *);