aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-06-22 12:09:10 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-06-22 10:09:10 +0000
commit0c172706f4c49a3015ecd248b90ddbbb62dbedec (patch)
tree4a0fdd8ff760fafdc98062a920540db2dc74ec33
parent31dd69b7ff60979b615e45229f759613873989e6 (diff)
downloadgcc-0c172706f4c49a3015ecd248b90ddbbb62dbedec.zip
gcc-0c172706f4c49a3015ecd248b90ddbbb62dbedec.tar.gz
gcc-0c172706f4c49a3015ecd248b90ddbbb62dbedec.tar.bz2
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
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/lto-streamer-out.c17
-rw-r--r--gcc/tree-streamer-in.c21
-rw-r--r--gcc/tree-streamer-out.c13
-rw-r--r--gcc/tree.c1
5 files changed, 21 insertions, 41 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 89b8f92..7cd1cc5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,15 @@
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.
2018-06-22 Martin Liska <mliska@suse.cz>
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index d9f85bb..313b76e 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<tree, hashval_t> *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 9fd9e72..da3a7ef 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 29bf064..59db3b9 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 1cb51766..8fc206d 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);