lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream BINFO_BASE_ACCESSES...
authorJan Hubicka <hubicka@ucw.cz>
Fri, 22 Jun 2018 10:09:10 +0000 (12:09 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 22 Jun 2018 10:09:10 +0000 (10:09 +0000)
* 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

gcc/ChangeLog
gcc/lto-streamer-out.c
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
gcc/tree.c

index 89b8f92dbaa922d0c9280e4ea2d3656e2a65bda2..7cd1cc57ca5c2936e1f0e7ce774112e02c9dc839 100644 (file)
@@ -1,3 +1,13 @@
+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.
index d9f85bb8108e9b9513b62e71c7d3909b7f0db30b..313b76e5018bcd9ff033c1e586689dfe27a971cf 100644 (file)
@@ -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))
index 9fd9e721b5ba5fd602d623cf1f05006b5434dcf4..da3a7efbe5e43817eb89849ee901d1a057aca66d 100644 (file)
@@ -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.  */
 }
 
 
index 29bf06499518658a6853d354484fb0c6b1f8c27a..59db3b906af42918ba7c77603a7320ce117a7d87 100644 (file)
@@ -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.  */
 }
 
 
index 1cb51766aa8003f368b111db891250ee1df9215e..8fc206d0abb2228a8b41c61e49485bc3f1116eef 100644 (file)
@@ -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);