aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2005-12-06 04:22:11 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2005-12-06 04:22:11 +0000
commit326eda4b252e23e9c9b2ee1f0ad484c2175e7534 (patch)
tree88dba83e793d94c96e1d4866470453d1f88073c6 /gcc/tree.c
parent45c76dbb43ff77f9d8fd89271033784a9bfbd4c5 (diff)
downloadgcc-326eda4b252e23e9c9b2ee1f0ad484c2175e7534.zip
gcc-326eda4b252e23e9c9b2ee1f0ad484c2175e7534.tar.gz
gcc-326eda4b252e23e9c9b2ee1f0ad484c2175e7534.tar.bz2
In gcc/ 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
In gcc/ 2005-12-05 Daniel Berlin <dberlin@dberlin.org> * print-tree.c (print_node): Ditto. * tree-dfa.c (add_referenced_var): Tag's don't have DECL_INITIAL. * tree-dump.c (dequeue_and_dump): Check for decl_common structure before accessing DECL_ARTIFICIAL. Handle new tag tree codes. * tree-flow-inline.h (clear_call_clobbered): Update for tag changes. (unmodifiable_var_p): Ditto. * tree-flow.h (mem_tag_kind): Remove. (struct var_ann_d): Remove mem_tag_kind member. * tree-gimple.c (is_gimple_reg): Tags are not gimple registers. * tree-pretty-print.c (dump_generic_node): Handle memory tags. * tree-ssa-alias.c (init_alias_info): Update for memory tag changes. (group_aliases): Ditto. (setup_pointers_and_addressables): Ditto. (is_escape_site): Ditto. (may_alias_p): Ditto. (create_tag_raw): New function. (create_memory_tag): Use it. (dump_alias_info): Update for tags. (may_be_aliased): Ditto. (add_type_alias): Ditto. (new_type_alias): Ditto. (create_sft): Ditto. (create_structure_vars): Ditto. * tree-ssa-ccp.c (get_default_value): Ditto. * tree-ssa-operands.c (get_expr_operands): Ditto. (add_stmt_operand): Ditto. (add_call_clobber_ops): Remove duplicated condition. * tree-ssa.c (verify_flow_insensitive_alias_info): Update for tags. * tree-tailcall.c (suitable_for_tail_opt_p): Ditto. * tree-vect-transform.c (vect_create_data_ref_ptr): Ditto. * tree.c (init_ttree): Update structures for new tree codes. (tree_code_size): Update sizes for new tree codes. (make_node_stat): Don't try to set common things on minimal structures. (tree_node_structure): Update for tags. (is_global_var): Ditto. * tree.def: Add new tree codes. * tree.h (MTAG_P): New macro. (TREE_MEMORY_TAG_CHECK): Ditto. (SSA_VAR_P): Update for tags. (struct tree_memory_tag): New structure. (MTAG_GLOBAL): New macro. (union tree_node): Add memory tag member. * treestruct.def (TS_MEMORY_TAG): New. In gcc/cp 2005-12-05 Daniel Berlin <dberlin@dberlin.org> * ptree.c (cxx_print_decl): Update to check for decl_common structure. From-SVN: r108102
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 6a97e41..324e833 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -230,6 +230,13 @@ init_ttree (void)
tree_contains_struct[TRANSLATION_UNIT_DECL][TS_DECL_MINIMAL] = 1;
tree_contains_struct[LABEL_DECL][TS_DECL_MINIMAL] = 1;
tree_contains_struct[FIELD_DECL][TS_DECL_MINIMAL] = 1;
+ tree_contains_struct[STRUCT_FIELD_TAG][TS_DECL_MINIMAL] = 1;
+ tree_contains_struct[NAME_MEMORY_TAG][TS_DECL_MINIMAL] = 1;
+ tree_contains_struct[TYPE_MEMORY_TAG][TS_DECL_MINIMAL] = 1;
+
+ tree_contains_struct[STRUCT_FIELD_TAG][TS_MEMORY_TAG] = 1;
+ tree_contains_struct[NAME_MEMORY_TAG][TS_MEMORY_TAG] = 1;
+ tree_contains_struct[TYPE_MEMORY_TAG][TS_MEMORY_TAG] = 1;
tree_contains_struct[VAR_DECL][TS_DECL_WITH_VIS] = 1;
tree_contains_struct[FUNCTION_DECL][TS_DECL_WITH_VIS] = 1;
@@ -288,6 +295,10 @@ tree_code_size (enum tree_code code)
return sizeof (struct tree_type_decl);
case FUNCTION_DECL:
return sizeof (struct tree_function_decl);
+ case NAME_MEMORY_TAG:
+ case TYPE_MEMORY_TAG:
+ case STRUCT_FIELD_TAG:
+ return sizeof (struct tree_memory_tag);
default:
return sizeof (struct tree_decl_non_common);
}
@@ -479,13 +490,16 @@ make_node_stat (enum tree_code code MEM_STAT_DECL)
break;
case tcc_declaration:
- if (code != FUNCTION_DECL)
- DECL_ALIGN (t) = 1;
- DECL_USER_ALIGN (t) = 0;
if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
DECL_IN_SYSTEM_HEADER (t) = in_system_header;
- /* We have not yet computed the alias set for this declaration. */
- DECL_POINTER_ALIAS_SET (t) = -1;
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
+ {
+ if (code != FUNCTION_DECL)
+ DECL_ALIGN (t) = 1;
+ DECL_USER_ALIGN (t) = 0;
+ /* We have not yet computed the alias set for this declaration. */
+ DECL_POINTER_ALIAS_SET (t) = -1;
+ }
DECL_SOURCE_LOCATION (t) = input_location;
DECL_UID (t) = next_decl_uid++;
@@ -1979,6 +1993,10 @@ tree_node_structure (tree t)
return TS_TYPE_DECL;
case FUNCTION_DECL:
return TS_FUNCTION_DECL;
+ case TYPE_MEMORY_TAG:
+ case NAME_MEMORY_TAG:
+ case STRUCT_FIELD_TAG:
+ return TS_MEMORY_TAG;
default:
return TS_DECL_NON_COMMON;
}
@@ -6630,7 +6648,10 @@ in_array_bounds_p (tree ref)
bool
is_global_var (tree t)
{
- return (TREE_STATIC (t) || DECL_EXTERNAL (t));
+ if (MTAG_P (t))
+ return (TREE_STATIC (t) || MTAG_GLOBAL (t));
+ else
+ return (TREE_STATIC (t) || DECL_EXTERNAL (t));
}
/* Return true if T (assumed to be a DECL) must be assigned a memory