OSDN Git Service

Delete remaining references to sparc little-endian support.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-alias.h
index 115d393..7492123 100644 (file)
@@ -1,5 +1,5 @@
 /* Tree based alias analysis and alias oracle.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    Contributed by Richard Guenther  <rguenther@suse.de>
 
    This file is part of GCC.
 #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
@@ -58,9 +38,14 @@ struct GTY(()) pt_solution
      even if this is zero pt_vars can still include global variables.  */
   unsigned int nonlocal : 1;
 
-  /* Nonzero if the points-to set includes any escaped local variable.  */
+  /* Nonzero if the points-to set includes the local escaped solution by
+     reference.  */
   unsigned int escaped : 1;
 
+  /* Nonzero if the points-to set includes the IPA escaped solution by
+     reference.  */
+  unsigned int ipa_escaped : 1;
+
   /* Nonzero if the points-to set includes 'nothing', the points-to set
      includes memory at address NULL.  */
   unsigned int null : 1;
@@ -69,6 +54,7 @@ struct GTY(()) pt_solution
   /* Nonzero if the pt_vars bitmap includes a global variable.  */
   unsigned int vars_contains_global : 1;
 
+
   /* Set of variables that this pointer may point to.  */
   bitmap vars;
 };
@@ -105,22 +91,27 @@ typedef struct ao_ref_s
 
 /* In tree-ssa-alias.c  */
 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 enum escape_type is_escape_site (gimple);
 extern bool ptr_deref_may_alias_global_p (tree);
+extern bool ptr_derefs_may_alias_p (tree, 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 bool stmt_may_clobber_ref_p_1 (gimple, ao_ref *);
+extern bool call_may_clobber_ref_p (gimple, tree);
+extern bool stmt_kills_ref_p (gimple, tree);
+extern tree get_continuation_for_phi (gimple, ao_ref *, bitmap *);
 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 (tree, tree,
-                                       bool (*)(tree, tree, void *), void *,
-                                       bitmap *);
+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);
@@ -132,12 +123,18 @@ extern void dump_alias_stats (FILE *);
 
 /* In tree-ssa-structalias.c  */
 extern unsigned int compute_may_aliases (void);
-extern void delete_alias_heapvars (void);
+extern bool pt_solution_empty_p (struct pt_solution *);
+extern bool pt_solution_singleton_p (struct pt_solution *, unsigned *);
 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 void pt_solution_reset (struct pt_solution *);
+extern void pt_solution_set (struct pt_solution *, bitmap, bool);
+extern void pt_solution_set_var (struct pt_solution *, tree);
+
 extern void dump_pta_stats (FILE *);
 
+extern GTY(()) struct pt_solution ipa_escaped_pt;
+
 
 #endif /* TREE_SSA_ALIAS_H  */