diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 13:48:55 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 13:48:55 +0000 |
commit | 8f2eb9e1858f98693c41c75e15c960f449eec8b6 (patch) | |
tree | 9e6dc2ef0a353ee5307b5cc9dd22f5a40e3da76e /gcc/lto-streamer-out.c | |
parent | 8ebd8f29e96a1b18c27d84866b0b28ac0b344dea (diff) | |
download | gcc-8f2eb9e1858f98693c41c75e15c960f449eec8b6.tar.gz |
split tree_type
gcc/ada/
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
(TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
gcc/cp/
* cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use
TYPE_VALUES_RAW.
(UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise.
(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise.
(TEMPLATE_TYPE_PARM_INDEX): Likewise.
gcc/
* ggc-page.c (extra_order_size_table): Use struct
tree_type_non_common.
* lto-streamer-in.c (unpack_ts_type_value_fields): Rename to...
(unpack_ts_type_common_value_fields): ...this. Update comment.
(unpack_value_fields): Adjust for renaming.
(lto_input_ts_type_tree_pointers): Split into...
(lto_input_ts_type_common_tree_pointer): ...this and...
(lto_input_ts_type_non_common_tree_pointers): ...this.
(lto_input_tree_pointers): Adjust for above split.
* lto-streamer-out.c (pack_ts_type_value_fields): Rename to...
(pack_ts_type_common_value_fields): ...this. Update comment.
(lto_output_ts_type_tree_pointers): Split into...
(lto_output_ts_type_common_tree_pointers): ...this and...
(lto_output_ts_type_non_common_tree_pointers): ...this.
(lto_output_tree_pointers): Adjust for above split.
* lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON,
TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled.
* stor-layout.c (vector_type_mode): Adjust location of mode field.
* tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC):
Define.
(struct tree_type): Split into...
(struct tree_type_common: ...this and...
(struct tree_type_with_lang_specific): ...this and...
(struct tree_type_non_common): ...this. Adjust accessor macros
accordingly.
(TYPE_VALUES_RAW): Define.
(union tree_node): Update for above changes.
* tree.c (tree_node_structure_for_code) [tcc_type]: Return
TS_TYPE_NON_COMMON.
(initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON.
Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON.
(tree_code_size) [tcc_type]: Use struct tree_type_non_common.
* treestructu.def (TS_TYPE): Remove.
(TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON):
Define.
gcc/java/
* java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
gcc/lto/
* lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust
location of binfo field.
(lto_fixup_prevailing_decls): Likewise.
gcc/objc/
* objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors.
(CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise.
(PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173658 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 48ab36d486f..da1983c8ca7 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -488,11 +488,11 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) } -/* Pack all the non-pointer fields of the TS_TYPE structure +/* Pack all the non-pointer fields of the TS_TYPE_COMMON structure of expression EXPR into bitpack BP. */ static void -pack_ts_type_value_fields (struct bitpack_d *bp, tree expr) +pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr) { bp_pack_value (bp, TYPE_PRECISION (expr), 10); bp_pack_value (bp, TYPE_MODE (expr), 8); @@ -560,8 +560,8 @@ pack_value_fields (struct bitpack_d *bp, tree expr) if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL)) pack_ts_function_decl_value_fields (bp, expr); - if (CODE_CONTAINS_STRUCT (code, TS_TYPE)) - pack_ts_type_value_fields (bp, expr); + if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON)) + pack_ts_type_common_value_fields (bp, expr); if (CODE_CONTAINS_STRUCT (code, TS_BLOCK)) pack_ts_block_value_fields (bp, expr); @@ -949,13 +949,36 @@ lto_output_ts_function_decl_tree_pointers (struct output_block *ob, tree expr, } -/* Write all pointer fields in the TS_TYPE structure of EXPR to output - block OB. If REF_P is true, write a reference to EXPR's pointer - fields. */ +/* Write all pointer fields in the TS_TYPE_COMMON structure of EXPR to + output block OB. If REF_P is true, write a reference to EXPR's + pointer fields. */ static void -lto_output_ts_type_tree_pointers (struct output_block *ob, tree expr, - bool ref_p) +lto_output_ts_type_common_tree_pointers (struct output_block *ob, tree expr, + bool ref_p) +{ + lto_output_tree_or_ref (ob, TYPE_SIZE (expr), ref_p); + lto_output_tree_or_ref (ob, TYPE_SIZE_UNIT (expr), ref_p); + lto_output_tree_or_ref (ob, TYPE_ATTRIBUTES (expr), ref_p); + lto_output_tree_or_ref (ob, TYPE_NAME (expr), ref_p); + /* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO. They will be + reconstructed during fixup. */ + /* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists + during fixup. */ + lto_output_tree_or_ref (ob, TYPE_MAIN_VARIANT (expr), ref_p); + lto_output_tree_or_ref (ob, TYPE_CONTEXT (expr), ref_p); + /* TYPE_CANONICAL is re-computed during type merging, so no need + to stream it here. */ + lto_output_tree_or_ref (ob, TYPE_STUB_DECL (expr), ref_p); +} + +/* Write all pointer fields in the TS_TYPE_NON_COMMON structure of EXPR + to output block OB. If REF_P is true, write a reference to EXPR's + pointer fields. */ + +static void +lto_output_ts_type_non_common_tree_pointers (struct output_block *ob, + tree expr, bool ref_p) { if (TREE_CODE (expr) == ENUMERAL_TYPE) lto_output_tree_or_ref (ob, TYPE_VALUES (expr), ref_p); @@ -967,24 +990,11 @@ lto_output_ts_type_tree_pointers (struct output_block *ob, tree expr, || TREE_CODE (expr) == METHOD_TYPE) lto_output_tree_or_ref (ob, TYPE_ARG_TYPES (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_SIZE (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_SIZE_UNIT (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_ATTRIBUTES (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_NAME (expr), ref_p); - /* Do not stream TYPE_POINTER_TO or TYPE_REFERENCE_TO nor - TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO. */ if (!POINTER_TYPE_P (expr)) lto_output_tree_or_ref (ob, TYPE_MINVAL (expr), ref_p); lto_output_tree_or_ref (ob, TYPE_MAXVAL (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_MAIN_VARIANT (expr), ref_p); - /* Do not stream TYPE_NEXT_VARIANT, we reconstruct the variant lists - during fixup. */ if (RECORD_OR_UNION_TYPE_P (expr)) lto_output_tree_or_ref (ob, TYPE_BINFO (expr), ref_p); - lto_output_tree_or_ref (ob, TYPE_CONTEXT (expr), ref_p); - /* TYPE_CANONICAL is re-computed during type merging, so no need - to stream it here. */ - lto_output_tree_or_ref (ob, TYPE_STUB_DECL (expr), ref_p); } @@ -1183,8 +1193,11 @@ lto_output_tree_pointers (struct output_block *ob, tree expr, bool ref_p) if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL)) lto_output_ts_function_decl_tree_pointers (ob, expr, ref_p); - if (CODE_CONTAINS_STRUCT (code, TS_TYPE)) - lto_output_ts_type_tree_pointers (ob, expr, ref_p); + if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON)) + lto_output_ts_type_common_tree_pointers (ob, expr, ref_p); + + if (CODE_CONTAINS_STRUCT (code, TS_TYPE_NON_COMMON)) + lto_output_ts_type_non_common_tree_pointers (ob, expr, ref_p); if (CODE_CONTAINS_STRUCT (code, TS_LIST)) lto_output_ts_list_tree_pointers (ob, expr, ref_p); |