From: Jan Hubicka Date: Fri, 22 Jun 2018 10:09:10 +0000 (+0200) Subject: lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream BINFO_BASE_ACCESSES... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c172706f4c49a3015ecd248b90ddbbb62dbedec;p=gcc.git lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD. * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD. * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise. (lto_input_ts_binfo_tree_pointers): Likewise. * tree-streamer-out.c (streamer_write_tree_bitfields, write_ts_binfo_tree_pointers): Likewise. * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD. From-SVN: r261885 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89b8f92dbaa..7cd1cc57ca5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2018-06-22 Jan Hubicka + + * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream + BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD. + * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise. + (lto_input_ts_binfo_tree_pointers): Likewise. + * tree-streamer-out.c (streamer_write_tree_bitfields, + write_ts_binfo_tree_pointers): Likewise. + * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD. + 2018-06-22 Jan Hubicka * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs. diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index d9f85bb8108..313b76e5018 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -939,15 +939,10 @@ DFS::DFS_write_tree_body (struct output_block *ob, DFS_follow_tree_edge (t); DFS_follow_tree_edge (BINFO_OFFSET (expr)); DFS_follow_tree_edge (BINFO_VTABLE (expr)); - DFS_follow_tree_edge (BINFO_VPTR_FIELD (expr)); - /* The number of BINFO_BASE_ACCESSES has already been emitted in - EXPR's bitfield section. */ - FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_ACCESSES (expr), i, t) - DFS_follow_tree_edge (t); - - /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX - and BINFO_VPTR_INDEX; these are used by C++ FE only. */ + /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX, + BINFO_BASE_ACCESSES and BINFO_VPTR_INDEX; these are used + by C++ FE only. */ } if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) @@ -1332,11 +1327,9 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map *map, visit (b); visit (BINFO_OFFSET (t)); visit (BINFO_VTABLE (t)); - visit (BINFO_VPTR_FIELD (t)); - FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_ACCESSES (t), i, b) - visit (b); /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX - and BINFO_VPTR_INDEX; these are used by C++ FE only. */ + BINFO_BASE_ACCESSES and BINFO_VPTR_INDEX; these are used + by C++ FE only. */ } if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 9fd9e721b5b..da3a7efbe5e 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -532,13 +532,6 @@ streamer_read_tree_bitfields (struct lto_input_block *ib, if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION)) cl_optimization_stream_in (&bp, TREE_OPTIMIZATION (expr)); - if (CODE_CONTAINS_STRUCT (code, TS_BINFO)) - { - unsigned HOST_WIDE_INT length = bp_unpack_var_len_unsigned (&bp); - if (length > 0) - vec_safe_grow (BINFO_BASE_ACCESSES (expr), length); - } - if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) { unsigned HOST_WIDE_INT length = bp_unpack_var_len_unsigned (&bp); @@ -964,7 +957,6 @@ static void lto_input_ts_binfo_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, tree expr) { - unsigned i; tree t; /* Note that the number of slots in EXPR was read in @@ -982,17 +974,10 @@ lto_input_ts_binfo_tree_pointers (struct lto_input_block *ib, BINFO_OFFSET (expr) = stream_read_tree (ib, data_in); BINFO_VTABLE (expr) = stream_read_tree (ib, data_in); - BINFO_VPTR_FIELD (expr) = stream_read_tree (ib, data_in); - /* The vector of BINFO_BASE_ACCESSES is pre-allocated during - unpacking the bitfield section. */ - for (i = 0; i < vec_safe_length (BINFO_BASE_ACCESSES (expr)); i++) - { - tree a = stream_read_tree (ib, data_in); - (*BINFO_BASE_ACCESSES (expr))[i] = a; - } - /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX - and BINFO_VPTR_INDEX; these are used by C++ FE only. */ + /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX, + BINFO_BASE_ACCESSES and BINFO_VPTR_INDEX; these are used by C++ FE + only. */ } diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 29bf0649951..59db3b906af 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -468,9 +468,6 @@ streamer_write_tree_bitfields (struct output_block *ob, tree expr) if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION)) cl_optimization_stream_out (&bp, TREE_OPTIMIZATION (expr)); - if (CODE_CONTAINS_STRUCT (code, TS_BINFO)) - bp_pack_var_len_unsigned (&bp, vec_safe_length (BINFO_BASE_ACCESSES (expr))); - if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) bp_pack_var_len_unsigned (&bp, CONSTRUCTOR_NELTS (expr)); @@ -812,15 +809,9 @@ write_ts_binfo_tree_pointers (struct output_block *ob, tree expr, bool ref_p) stream_write_tree (ob, BINFO_OFFSET (expr), ref_p); stream_write_tree (ob, BINFO_VTABLE (expr), ref_p); - stream_write_tree (ob, BINFO_VPTR_FIELD (expr), ref_p); - - /* The number of BINFO_BASE_ACCESSES has already been emitted in - EXPR's bitfield section. */ - FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_ACCESSES (expr), i, t) - stream_write_tree (ob, t, ref_p); - /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX - and BINFO_VPTR_INDEX; these are used by C++ FE only. */ + /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX, + BINFO_BASE_ACCESSES and BINFO_VPTR_INDEX; these are used by C++ FE only. */ } diff --git a/gcc/tree.c b/gcc/tree.c index 1cb51766aa8..8fc206d0abb 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5073,6 +5073,7 @@ free_lang_data_in_binfo (tree binfo) BINFO_BASE_ACCESSES (binfo) = NULL; BINFO_INHERITANCE_CHAIN (binfo) = NULL_TREE; BINFO_SUBVTT_INDEX (binfo) = NULL_TREE; + BINFO_VPTR_FIELD (binfo) = NULL_TREE; FOR_EACH_VEC_ELT (*BINFO_BASE_BINFOS (binfo), i, t) free_lang_data_in_binfo (t);