summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 22:58:29 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 22:58:29 +0000
commit786d45db7ebff269c37501cc38e1f3c7960c4815 (patch)
tree52208f13553d9abd4e95b2d4e1d9fbb2d75f2bc8 /gcc/tree.h
parent7f26fdb576960b81d2e15ce06ef96ee7feda9370 (diff)
downloadgcc-786d45db7ebff269c37501cc38e1f3c7960c4815.tar.gz
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'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82864 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 03c6415d275..8cdcd92aeeb 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -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. */