diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-25 12:52:10 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-25 12:52:10 +0000 |
commit | 1e184c6266c80288102856881c4804188698f184 (patch) | |
tree | 850c21e1d1ad635fe18c45a463e69c71a2247561 | |
parent | f308a9b22d9b6e02dc85b192f9785703966d5462 (diff) | |
download | gcc-1e184c6266c80288102856881c4804188698f184.tar.gz |
move TS_EXP to be a substructure of TS_TYPED
gcc/
* tree.h (struct tree_exp): Inherit from struct tree_typed.
* tree.c (initialize_tree_contains_struct): Mark TS_EXP as TS_TYPED
instead of TS_COMMON.
gcc/lto/
* lto.c (lto_ft_typed): New function.
(lto_ft_common): Call it.
(lto_ft_constructor): Likewise.
(lto_ft_expr): Likewise.
(lto_fixup_prevailing_decls): Check for TS_COMMON before accessing
TREE_CHAIN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174192 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/lto/lto.c | 19 | ||||
-rw-r--r-- | gcc/tree.c | 2 | ||||
-rw-r--r-- | gcc/tree.h | 2 |
5 files changed, 30 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03f6792099c..8811e14b5a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-25 Nathan Froyd <froydnj@codesourcery.com> + + * tree.h (struct tree_exp): Inherit from struct tree_typed. + * tree.c (initialize_tree_contains_struct): Mark TS_EXP as TS_TYPED + instead of TS_COMMON. + 2011-05-25 Bernd Schmidt <bernds@codesourcery.com> * libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 893997a6881..aa8859c405d 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,12 @@ +2011-05-25 Nathan Froyd <froydnj@codesourcery.com> + + * lto.c (lto_ft_typed): New function. + (lto_ft_common): Call it. + (lto_ft_constructor): Likewise. + (lto_ft_expr): Likewise. + (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing + TREE_CHAIN. + 2011-05-20 Richard Guenther <rguenther@suse.de> * lto.c (lto_ft_common): Remove pointer-to chain teardown. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index d64ba18d592..1067b51c948 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -254,14 +254,20 @@ remember_with_vars (tree t) static void lto_fixup_types (tree); -/* Fix up fields of a tree_common T. */ +/* Fix up fields of a tree_typed T. */ static void -lto_ft_common (tree t) +lto_ft_typed (tree t) { - /* Fixup our type. */ LTO_FIXUP_TREE (TREE_TYPE (t)); +} + +/* Fix up fields of a tree_common T. */ +static void +lto_ft_common (tree t) +{ + lto_ft_typed (t); LTO_FIXUP_TREE (TREE_CHAIN (t)); } @@ -398,7 +404,7 @@ lto_ft_constructor (tree t) unsigned HOST_WIDE_INT idx; constructor_elt *ce; - LTO_FIXUP_TREE (TREE_TYPE (t)); + lto_ft_typed (t); for (idx = 0; VEC_iterate(constructor_elt, CONSTRUCTOR_ELTS (t), idx, ce); @@ -415,7 +421,7 @@ static void lto_ft_expr (tree t) { int i; - lto_ft_common (t); + lto_ft_typed (t); for (i = TREE_OPERAND_LENGTH (t) - 1; i >= 0; --i) LTO_FIXUP_TREE (TREE_OPERAND (t, i)); } @@ -2029,7 +2035,8 @@ lto_fixup_prevailing_decls (tree t) { enum tree_code code = TREE_CODE (t); LTO_NO_PREVAIL (TREE_TYPE (t)); - LTO_NO_PREVAIL (TREE_CHAIN (t)); + if (CODE_CONTAINS_STRUCT (code, TS_COMMON)) + LTO_NO_PREVAIL (TREE_CHAIN (t)); if (DECL_P (t)) { LTO_NO_PREVAIL (DECL_NAME (t)); diff --git a/gcc/tree.c b/gcc/tree.c index 63f50b0ad41..1dfad04174a 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -380,6 +380,7 @@ initialize_tree_contains_struct (void) case TS_COMPLEX: case TS_SSA_NAME: case TS_CONSTRUCTOR: + case TS_EXP: MARK_TS_TYPED (code); break; @@ -388,7 +389,6 @@ initialize_tree_contains_struct (void) case TS_TYPE_COMMON: case TS_LIST: case TS_VEC: - case TS_EXP: case TS_BLOCK: case TS_BINFO: case TS_STATEMENT_LIST: diff --git a/gcc/tree.h b/gcc/tree.h index 805fe0694fc..142237feb82 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1917,7 +1917,7 @@ enum omp_clause_default_kind (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_DEFAULT)->omp_clause.subcode.default_kind) struct GTY(()) tree_exp { - struct tree_common common; + struct tree_typed typed; location_t locus; tree block; tree GTY ((special ("tree_exp"), |