aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-in.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-streamer-in.c')
-rw-r--r--gcc/tree-streamer-in.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index 450f40d..d2e45e3 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -487,9 +487,13 @@ streamer_read_tree_bitfields (class lto_input_block *ib,
/* The first word in BP contains the code of the tree that we
are about to read. */
- 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)));
+ 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
the types and sizes of each of the fields being packed. */
@@ -1107,11 +1111,14 @@ streamer_get_pickled_tree (class lto_input_block *ib, class data_in *data_in)
enum LTO_tags expected_tag;
ix = streamer_read_uhwi (ib);
- expected_tag = streamer_read_enum (ib, LTO_tags, LTO_NUM_TAGS);
-
result = streamer_tree_cache_get_tree (data_in->reader_cache, ix);
- gcc_assert (result
- && TREE_CODE (result) == lto_tag_to_tree_code (expected_tag));
+
+ 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;
}