+2018-06-22 Jan Hubicka <hubicka@ucw.cz>
+
+ * 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 <hubicka@ucw.cz>
* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
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))
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))
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);
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
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. */
}
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));
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. */
}
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);