d1b382088a
2009-04-21 Taras Glek <tglek@mozilla.com> * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise From-SVN: r146607
107 lines
3.7 KiB
C
107 lines
3.7 KiB
C
/* Tree based alias analysis and alias oracle.
|
|
Copyright (C) 2008 Free Software Foundation, Inc.
|
|
Contributed by Richard Guenther <rguenther@suse.de>
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
GCC is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING3. If not see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef TREE_SSA_ALIAS_H
|
|
#define TREE_SSA_ALIAS_H
|
|
|
|
#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
|
|
sets specified by the flags. */
|
|
struct GTY(()) pt_solution
|
|
{
|
|
/* Nonzero if points-to analysis couldn't determine where this pointer
|
|
is pointing to. */
|
|
unsigned int anything : 1;
|
|
|
|
/* Nonzero if the points-to set includes any global memory. Note that
|
|
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. */
|
|
unsigned int escaped : 1;
|
|
|
|
/* Nonzero if the points-to set includes 'nothing', the points-to set
|
|
includes memory at address NULL. */
|
|
unsigned int null : 1;
|
|
|
|
|
|
/* 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;
|
|
};
|
|
|
|
|
|
/* In tree-ssa-alias.c */
|
|
extern enum escape_type is_escape_site (gimple);
|
|
extern bool ptr_deref_may_alias_global_p (tree);
|
|
extern bool refs_may_alias_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 *);
|
|
extern unsigned int walk_aliased_vdefs (tree, tree,
|
|
bool (*)(tree, 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);
|
|
extern void dump_points_to_info_for (FILE *, tree);
|
|
extern void debug_points_to_info_for (tree);
|
|
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_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 dump_pta_stats (FILE *);
|
|
|
|
|
|
#endif /* TREE_SSA_ALIAS_H */
|