diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-06-09 22:58:29 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-06-09 18:58:29 -0400 |
commit | 313679b0b954e72f851877fb2d4d23afb149b47a (patch) | |
tree | 52208f13553d9abd4e95b2d4e1d9fbb2d75f2bc8 /gcc/tree.h | |
parent | 8041d6ab144891243a56c55dd1702a32aeb3f484 (diff) | |
download | gcc-313679b0b954e72f851877fb2d4d23afb149b47a.zip gcc-313679b0b954e72f851877fb2d4d23afb149b47a.tar.gz gcc-313679b0b954e72f851877fb2d4d23afb149b47a.tar.bz2 |
Move SSA_NAME annotations into tree_ssa_name.
* tree-dfa.c (create_ssa_name_ann): Remove.
* tree-flow-inline.h (ssa_name_ann, get_ssa_name_ann): Remove.
* tree-flow.h (enum tree_ann_type): Remove SSA_NAME_ANN.
(struct ssa_name_ann_d): Remove.
(union tree_ann_d): Update.
(ssa_name_ann_t): Remove.
* tree-ssa-alias.c: (get_ptr_info): New local function.
Replace references to ssa_name_ann_t with struct ptr_info_def.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree.h (SSA_NAME_PTR_INFO): Define.
(struct ptr_info_def): Declare.
(struct tree_ssa_name): Add field 'ptr_info'.
From-SVN: r82864
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 36 |
1 files changed, 35 insertions, 1 deletions
@@ -1174,12 +1174,43 @@ struct tree_exp GTY(()) #define SSA_NAME_OCCURS_IN_ABNORMAL_PHI(NODE) \ SSA_NAME_CHECK (NODE)->common.asm_written_flag -/* Nonzero if this SSA_NAME expression is currently on the freelist of +/* Nonzero if this SSA_NAME expression is currently on the free list of SSA_NAMES. Using NOTHROW_FLAG seems reasonably safe since throwing has no meaning for an SSA_NAME. */ #define SSA_NAME_IN_FREE_LIST(NODE) \ SSA_NAME_CHECK (NODE)->common.nothrow_flag +/* Attributes for SSA_NAMEs for pointer-type variables. */ +#define SSA_NAME_PTR_INFO(N) \ + SSA_NAME_CHECK (N)->ssa_name.ptr_info + +#ifndef GCC_BITMAP_H +struct bitmap_head_def; +#endif + +/* Aliasing information for SSA_NAMEs representing pointer variables. */ +struct ptr_info_def GTY(()) +{ + /* Nonzero if points-to analysis couldn't determine where this pointer + is pointing to. */ + unsigned int pt_anything : 1; + + /* Nonzero if this pointer is the result of a call to malloc. */ + unsigned int pt_malloc : 1; + + /* Nonzero if the value of this pointer escapes the current function. */ + unsigned int value_escapes_p : 1; + + /* Set of variables that this pointer may point to. */ + struct bitmap_head_def *pt_vars; + + /* If this pointer has been dereferenced, and points-to information is + more precise than type-based aliasing, indirect references to this + pointer will be represented by this memory tag, instead of the type + tag computed by TBAA. */ + tree name_mem_tag; +}; + struct tree_ssa_name GTY(()) { struct tree_common common; @@ -1189,6 +1220,9 @@ struct tree_ssa_name GTY(()) /* SSA version number. */ unsigned int version; + + /* Pointer attributes used for alias analysis. */ + struct ptr_info_def *ptr_info; }; /* In a PHI_NODE node. */ |