]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR115394] Remove streamer_debugging and it's uses.
authorPrathamesh Kulkarni <prathameshk@nvidia.com>
Wed, 10 Jul 2024 11:28:20 +0000 (16:58 +0530)
committerPrathamesh Kulkarni <prathameshk@nvidia.com>
Wed, 10 Jul 2024 11:39:01 +0000 (17:09 +0530)
gcc/ChangeLog:
PR lto/115394
* lto-streamer.h: Remove streamer_debugging definition.
* lto-streamer-out.cc (stream_write_tree_ref): Remove use of streamer_debugging.
(lto_output_tree): Likewise.
* tree-streamer-in.cc (streamer_read_tree_bitfields): Likewise.
(streamer_get_pickled_tree): Likewise.
* tree-streamer-out.cc (pack_ts_base_value_fields): Likewise.

Signed-off-by: Prathamesh Kulkarni <prathameshk@nvidia.com>
gcc/lto-streamer-out.cc
gcc/lto-streamer.h
gcc/tree-streamer-in.cc
gcc/tree-streamer-out.cc

index d4f728094ed5783e98f349ab4b90dcb95ebc20d3..8b4bf9659cb30c4f39c6b2476a4bbd19910d13fb 100644 (file)
@@ -487,8 +487,6 @@ stream_write_tree_ref (struct output_block *ob, tree t)
            gcc_checking_assert (tag == LTO_global_stream_ref);
          streamer_write_hwi (ob, -(int)(ix * 2 + id + 1));
        }
-      if (streamer_debugging)
-       streamer_write_uhwi (ob, TREE_CODE (t));
     }
 }
 
@@ -1839,9 +1837,6 @@ lto_output_tree (struct output_block *ob, tree expr,
         will instantiate two different nodes for the same object.  */
       streamer_write_record_start (ob, LTO_tree_pickle_reference);
       streamer_write_uhwi (ob, ix);
-      if (streamer_debugging)
-       streamer_write_enum (ob->main_stream, LTO_tags, LTO_NUM_TAGS,
-                            lto_tree_code_to_tag (TREE_CODE (expr)));
       lto_stats.num_pickle_refs_output++;
     }
   else
@@ -1882,9 +1877,6 @@ lto_output_tree (struct output_block *ob, tree expr,
            }
          streamer_write_record_start (ob, LTO_tree_pickle_reference);
          streamer_write_uhwi (ob, ix);
-         if (streamer_debugging)
-           streamer_write_enum (ob->main_stream, LTO_tags, LTO_NUM_TAGS,
-                                lto_tree_code_to_tag (TREE_CODE (expr)));
        }
       in_dfs_walk = false;
       lto_stats.num_pickle_refs_output++;
index e8dbba471edb3f113f0b11eb6f13c059a68f37ef..79c44d2cae718fad98e35ca95eebf6aebc79a3fe 100644 (file)
@@ -126,10 +126,6 @@ along with GCC; see the file COPYING3.  If not see
 
 typedef unsigned char  lto_decl_flags_t;
 
-/* Stream additional data to LTO object files to make it easier to debug
-   streaming code.  This changes object files.  */
-static const bool streamer_debugging = false;
-
 /* Tags representing the various IL objects written to the bytecode file
    (GIMPLE statements, basic blocks, EH regions, tree nodes, etc).
 
index 35341a2b2b6886c42f939035eb0cc00e2ccd084f..c248a74f7a1a0b3ca6a37eb91a08123e8d9de13c 100644 (file)
@@ -485,15 +485,6 @@ streamer_read_tree_bitfields (class lto_input_block *ib,
 
   /* Read the bitpack of non-pointer values from IB.  */
   bp = streamer_read_bitpack (ib);
-
-  /* The first word in BP contains the code of the tree that we
-     are about to read.  */
-  if (streamer_debugging)
-    {
-      code = (enum tree_code) bp_unpack_value (&bp, 16);
-      lto_tag_check (lto_tree_code_to_tag (code),
-                    lto_tree_code_to_tag (TREE_CODE (expr)));
-    }
   code = TREE_CODE (expr);
 
   /* Note that all these functions are highly sensitive to changes in
@@ -1110,17 +1101,8 @@ streamer_get_pickled_tree (class lto_input_block *ib, class data_in *data_in)
 {
   unsigned HOST_WIDE_INT ix;
   tree result;
-  enum LTO_tags expected_tag;
 
   ix = streamer_read_uhwi (ib);
   result = streamer_tree_cache_get_tree (data_in->reader_cache, ix);
-
-  if (streamer_debugging)
-    {
-      expected_tag = streamer_read_enum (ib, LTO_tags, LTO_NUM_TAGS);
-      gcc_assert (result
-                 && TREE_CODE (result) == lto_tag_to_tree_code (expected_tag));
-    }
-
   return result;
 }
index c30ab62a585642424c54af45cb5760b4e1597457..b7205287ffb6afb472fba907c608558645198571 100644 (file)
@@ -71,8 +71,6 @@ write_identifier (struct output_block *ob,
 static inline void
 pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
 {
-  if (streamer_debugging)
-    bp_pack_value (bp, TREE_CODE (expr), 16);
   if (!TYPE_P (expr))
     {
       bp_pack_value (bp, TREE_SIDE_EFFECTS (expr), 1);