]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/lto-streamer.h
gcc/
[thirdparty/gcc.git] / gcc / lto-streamer.h
CommitLineData
7bfefa9d 1/* Data structures and declarations used for reading and writing
2 GIMPLE to a file stream.
3
d353bf18 4 Copyright (C) 2009-2015 Free Software Foundation, Inc.
7bfefa9d 5 Contributed by Doug Kwan <dougkwan@google.com>
6
7This file is part of GCC.
8
9GCC is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
11Software Foundation; either version 3, or (at your option) any later
12version.
13
14GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17for more details.
18
19You should have received a copy of the GNU General Public License
20along with GCC; see the file COPYING3. If not see
21<http://www.gnu.org/licenses/>. */
22
23#ifndef GCC_LTO_STREAMER_H
24#define GCC_LTO_STREAMER_H
25
26#include "plugin-api.h"
7bfefa9d 27#include "target.h"
a33890d0 28#include "alloc-pool.h"
c470c5a9 29#include "gcov-io.h"
2541503d 30#include "diagnostic.h"
a0605d65 31
7bfefa9d 32/* Define when debugging the LTO streamer. This causes the writer
33 to output the numeric value for the memory address of the tree node
34 being emitted. When debugging a problem in the reader, check the
35 original address that the writer was emitting using lto_orig_address_get.
36 With this value, set a breakpoint in the writer (e.g., lto_output_tree)
37 to trace how the faulty node is being emitted. */
38/* #define LTO_STREAMER_DEBUG 1 */
39
40/* The encoding for a function consists of the following sections:
41
42 1) The header.
43 2) FIELD_DECLS.
44 3) FUNCTION_DECLS.
45 4) global VAR_DECLS.
46 5) type_decls
47 6) types.
48 7) Names for the labels that have names
49 8) The SSA names.
50 9) The control flow graph.
51 10-11)Gimple for local decls.
52 12) Gimple for the function.
53 13) Strings.
54
55 1) THE HEADER.
56 2-6) THE GLOBAL DECLS AND TYPES.
57
58 The global decls and types are encoded in the same way. For each
59 entry, there is word with the offset within the section to the
60 entry.
61
48e1416a 62 7) THE LABEL NAMES.
7bfefa9d 63
64 Since most labels do not have names, this section my be of zero
65 length. It consists of an array of string table references, one
66 per label. In the lto code, the labels are given either
67 positive or negative indexes. the positive ones have names and
68 the negative ones do not. The positive index can be used to
69 find the name in this array.
70
48e1416a 71 9) THE CFG.
7bfefa9d 72
73 10) Index into the local decls. Since local decls can have local
74 decls inside them, they must be read in randomly in order to
48e1416a 75 properly restore them.
7bfefa9d 76
77 11-12) GIMPLE FOR THE LOCAL DECLS AND THE FUNCTION BODY.
78
79 The gimple consists of a set of records.
80
81 THE FUNCTION
48e1416a 82
7bfefa9d 83 At the top level of (8) is the function. It consists of five
84 pieces:
85
86 LTO_function - The tag.
87 eh tree - This is all of the exception handling regions
88 put out in a post order traversial of the
89 tree. Siblings are output as lists terminated
90 by a 0. The set of fields matches the fields
91 defined in except.c.
92
93 last_basic_block - in uleb128 form.
94
95 basic blocks - This is the set of basic blocks.
96
97 zero - The termination of the basic blocks.
98
99 BASIC BLOCKS
100
101 There are two forms of basic blocks depending on if they are
102 empty or not.
103
104 The basic block consists of:
105
106 LTO_bb1 or LTO_bb0 - The tag.
107
108 bb->index - the index in uleb128 form.
109
110 #succs - The number of successors un uleb128 form.
111
112 the successors - For each edge, a pair. The first of the
113 pair is the index of the successor in
114 uleb128 form and the second are the flags in
115 uleb128 form.
116
117 the statements - A gimple tree, as described above.
118 These are only present for LTO_BB1.
119 Following each statement is an optional
120 exception handling record LTO_eh_region
121 which contains the region number (for
122 regions >= 0).
123
124 zero - This is only present for LTO_BB1 and is used
125 to terminate the statements and exception
126 regions within this block.
127
128 12) STRINGS
129
130 String are represented in the table as pairs, a length in ULEB128
131 form followed by the data for the string. */
132
82e24ec3 133#define LTO_major_version 4
3dbd6a28 134#define LTO_minor_version 0
7bfefa9d 135
136typedef unsigned char lto_decl_flags_t;
137
138
7bfefa9d 139/* Tags representing the various IL objects written to the bytecode file
140 (GIMPLE statements, basic blocks, EH regions, tree nodes, etc).
141
142 NOTE, when adding new LTO tags, also update lto_tag_name. */
48e1416a 143enum LTO_tags
7bfefa9d 144{
145 LTO_null = 0,
146
e09e0df2 147 /* Special for streamer. Reference to previously-streamed node. */
148 LTO_tree_pickle_reference,
149
7bfefa9d 150 /* Reserve enough entries to fit all the tree and gimple codes handled
151 by the streamer. This guarantees that:
152
153 1- Given a tree code C:
154 enum LTO_tags tag == C + 1
155
156 2- Given a gimple code C:
157 enum LTO_tags tag == C + NUM_TREE_CODES + 1
158
159 Conversely, to map between LTO tags and tree/gimple codes, the
160 reverse operation must be applied. */
bb35cf1e 161 LTO_bb0 = 1 + MAX_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE,
7bfefa9d 162 LTO_bb1,
163
164 /* EH region holding the previous statement. */
165 LTO_eh_region,
166
167 /* An MD or NORMAL builtin. Only the code and class are streamed out. */
168 LTO_builtin_decl,
169
42603940 170 /* Shared INTEGER_CST node. */
171 LTO_integer_cst,
172
7bfefa9d 173 /* Function body. */
174 LTO_function,
175
176 /* EH table. */
177 LTO_eh_table,
178
179 /* EH region types. These mirror enum eh_region_type. */
180 LTO_ert_cleanup,
181 LTO_ert_try,
182 LTO_ert_allowed_exceptions,
183 LTO_ert_must_not_throw,
184
185 /* EH landing pad. */
186 LTO_eh_landing_pad,
187
188 /* EH try/catch node. */
189 LTO_eh_catch,
190
8ceff600 191 /* Special for global streamer. A blob of unnamed tree nodes. */
192 LTO_tree_scc,
193
7bfefa9d 194 /* References to indexable tree nodes. These objects are stored in
195 tables that are written separately from the function bodies that
196 reference them. This way they can be instantiated even when the
197 referencing functions aren't (e.g., during WPA) and it also allows
198 functions to be copied from one file to another without having
199 to unpickle the body first (the references are location
200 independent).
201
202 NOTE, do not regroup these values as the grouping is exposed
203 in the range checks done in lto_input_tree. */
204 LTO_field_decl_ref, /* Do not change. */
205 LTO_function_decl_ref,
206 LTO_label_decl_ref,
207 LTO_namespace_decl_ref,
208 LTO_result_decl_ref,
209 LTO_ssa_name_ref,
210 LTO_type_decl_ref,
211 LTO_type_ref,
212 LTO_const_decl_ref,
213 LTO_imported_decl_ref,
23bdc9ca 214 LTO_translation_unit_decl_ref,
c40a5c1b 215 LTO_global_decl_ref,
216 LTO_namelist_decl_ref, /* Do not change. */
7bfefa9d 217
218 /* This tag must always be last. */
219 LTO_NUM_TAGS
220};
221
222
223/* Set of section types that are in an LTO file. This list will grow
224 as the number of IPA passes grows since each IPA pass will need its
225 own section type to store its summary information.
226
227 When adding a new section type, you must also extend the
228 LTO_SECTION_NAME array in lto-section-in.c. */
229enum lto_section_type
230{
231 LTO_section_decls = 0,
232 LTO_section_function_body,
233 LTO_section_static_initializer,
02b699d5 234 LTO_section_symtab,
8d810329 235 LTO_section_refs,
65d1b157 236 LTO_section_asm,
8867b500 237 LTO_section_jump_functions,
7bfefa9d 238 LTO_section_ipa_pure_const,
239 LTO_section_ipa_reference,
9e179a64 240 LTO_section_ipa_profile,
02b699d5 241 LTO_section_symtab_nodes,
7bfefa9d 242 LTO_section_opts,
1bf41320 243 LTO_section_cgraph_opt_sum,
c7b2cc59 244 LTO_section_inline_summary,
803a7988 245 LTO_section_ipcp_transform,
52200d03 246 LTO_section_ipa_icf,
dccabdd1 247 LTO_section_offload_table,
2e971afd 248 LTO_section_mode_table,
7bfefa9d 249 LTO_N_SECTION_TYPES /* Must be last. */
250};
251
252/* Indices to the various function, type and symbol streams. */
b3e7c666 253enum lto_decl_stream_e_t
7bfefa9d 254{
255 LTO_DECL_STREAM_TYPE = 0, /* Must be first. */
256 LTO_DECL_STREAM_FIELD_DECL,
257 LTO_DECL_STREAM_FN_DECL,
258 LTO_DECL_STREAM_VAR_DECL,
259 LTO_DECL_STREAM_TYPE_DECL,
260 LTO_DECL_STREAM_NAMESPACE_DECL,
261 LTO_DECL_STREAM_LABEL_DECL,
262 LTO_N_DECL_STREAMS
b3e7c666 263};
7bfefa9d 264
265typedef enum ld_plugin_symbol_resolution ld_plugin_symbol_resolution_t;
7bfefa9d 266
267
268/* Macro to define convenience functions for type and decl streams
48e1416a 269 in lto_file_decl_data. */
7bfefa9d 270#define DEFINE_DECL_STREAM_FUNCS(UPPER_NAME, name) \
271static inline tree \
272lto_file_decl_data_get_ ## name (struct lto_file_decl_data *data, \
273 unsigned int idx) \
274{ \
275 struct lto_in_decl_state *state = data->current_decl_state; \
5ecbd52e 276 return (*state->streams[LTO_DECL_STREAM_## UPPER_NAME])[idx]; \
7bfefa9d 277} \
278\
279static inline unsigned int \
280lto_file_decl_data_num_ ## name ## s (struct lto_file_decl_data *data) \
281{ \
282 struct lto_in_decl_state *state = data->current_decl_state; \
5ecbd52e 283 return vec_safe_length (state->streams[LTO_DECL_STREAM_## UPPER_NAME]); \
7bfefa9d 284}
285
286
287/* Return a char pointer to the start of a data stream for an lto pass
288 or function. The first parameter is the file data that contains
289 the information. The second parameter is the type of information
290 to be obtained. The third parameter is the name of the function
48e1416a 291 and is only used when finding a function body; otherwise it is
7bfefa9d 292 NULL. The fourth parameter is the length of the data returned. */
48e1416a 293typedef const char* (lto_get_section_data_f) (struct lto_file_decl_data *,
7bfefa9d 294 enum lto_section_type,
48e1416a 295 const char *,
7bfefa9d 296 size_t *);
297
298/* Return the data found from the above call. The first three
299 parameters are the same as above. The fourth parameter is the data
9d75589a 300 itself and the fifth is the length of the data. */
48e1416a 301typedef void (lto_free_section_data_f) (struct lto_file_decl_data *,
7bfefa9d 302 enum lto_section_type,
303 const char *,
304 const char *,
305 size_t);
306
da6f3259 307/* The location cache holds expanded locations for streamed in trees.
308 This is done to reduce memory usage of libcpp linemap that strongly preffers
309 locations to be inserted in the soruce order. */
310
311class lto_location_cache
312{
313public:
314 /* Apply all changes in location cache. Add locations into linemap and patch
315 trees. */
316 bool apply_location_cache ();
317 /* Tree merging did not suceed; mark all changes in the cache as accepted. */
318 void accept_location_cache ();
319 /* Tree merging did suceed; throw away recent changes. */
320 void revert_location_cache ();
321 void input_location (location_t *loc, struct bitpack_d *bp,
322 struct data_in *data_in);
323 lto_location_cache ()
324 : loc_cache (), accepted_length (0), current_file (NULL), current_line (0),
325 current_col (0), current_loc (UNKNOWN_LOCATION)
326 {
327 gcc_assert (!current_cache);
328 current_cache = this;
329 }
330 ~lto_location_cache ()
331 {
332 apply_location_cache ();
333 gcc_assert (current_cache == this);
334 current_cache = NULL;
335 }
336
337 /* There can be at most one instance of location cache (combining multiple
338 would bring it out of sync with libcpp linemap); point to current
339 one. */
340 static lto_location_cache *current_cache;
341
342private:
343 static int cmp_loc (const void *pa, const void *pb);
344
345 struct cached_location
346 {
347 const char *file;
348 location_t *loc;
349 int line, col;
350 };
351
352 /* The location cache. */
353
31942707 354 auto_vec<cached_location> loc_cache;
da6f3259 355
356 /* Accepted entries are ones used by trees that are known to be not unified
357 by tree merging. */
358
359 int accepted_length;
360
361 /* Bookkeeping to remember state in between calls to lto_apply_location_cache
362 When streaming gimple, the location cache is not used and thus
363 lto_apply_location_cache happens per location basis. It is then
364 useful to avoid redundant calls of linemap API. */
365
366 const char *current_file;
367 int current_line;
368 int current_col;
369 location_t current_loc;
370};
371
7bfefa9d 372/* Structure used as buffer for reading an LTO file. */
472ca566 373class lto_input_block
7bfefa9d 374{
472ca566 375public:
376 /* Special constructor for the string table, it abuses this to
377 do random access but use the uhwi decoder. */
2e971afd 378 lto_input_block (const char *data_, unsigned int p_, unsigned int len_,
379 const unsigned char *mode_table_)
380 : data (data_), mode_table (mode_table_), p (p_), len (len_) {}
381 lto_input_block (const char *data_, unsigned int len_,
382 const unsigned char *mode_table_)
383 : data (data_), mode_table (mode_table_), p (0), len (len_) {}
472ca566 384
7bfefa9d 385 const char *data;
2e971afd 386 const unsigned char *mode_table;
7bfefa9d 387 unsigned int p;
388 unsigned int len;
389};
390
7bfefa9d 391
392/* The is the first part of the record for a function or constructor
393 in the .o file. */
394struct lto_header
395{
396 int16_t major_version;
397 int16_t minor_version;
7bfefa9d 398};
399
472ca566 400/* The is the first part of the record in an LTO file for many of the
401 IPA passes. */
402struct lto_simple_header : lto_header
7bfefa9d 403{
472ca566 404 /* Size of main gimple body of function. */
405 int32_t main_size;
406};
7bfefa9d 407
472ca566 408struct lto_simple_header_with_strings : lto_simple_header
409{
7bfefa9d 410 /* Size of main gimple body of function. */
411 int32_t main_size;
412
413 /* Size of the string table. */
414 int32_t string_size;
415};
416
472ca566 417/* The header for a function body. */
418struct lto_function_header : lto_simple_header_with_strings
419{
420 /* Size of the cfg. */
421 int32_t cfg_size;
422};
423
7bfefa9d 424
425/* Structure describing a symbol section. */
472ca566 426struct lto_decl_header : lto_simple_header_with_strings
7bfefa9d 427{
7bfefa9d 428 /* Size of region for decl state. */
429 int32_t decl_state_size;
430
431 /* Number of nodes in globals stream. */
432 int32_t num_nodes;
65d1b157 433};
434
435
7bfefa9d 436/* Statistics gathered during LTO, WPA and LTRANS. */
437struct lto_stats_d
438{
439 unsigned HOST_WIDE_INT num_input_cgraph_nodes;
5cf7e051 440 unsigned HOST_WIDE_INT num_output_symtab_nodes;
7bfefa9d 441 unsigned HOST_WIDE_INT num_input_files;
442 unsigned HOST_WIDE_INT num_output_files;
443 unsigned HOST_WIDE_INT num_cgraph_partitions;
444 unsigned HOST_WIDE_INT section_size[LTO_N_SECTION_TYPES];
445 unsigned HOST_WIDE_INT num_function_bodies;
446 unsigned HOST_WIDE_INT num_trees[NUM_TREE_CODES];
447 unsigned HOST_WIDE_INT num_output_il_bytes;
448 unsigned HOST_WIDE_INT num_compressed_il_bytes;
449 unsigned HOST_WIDE_INT num_input_il_bytes;
450 unsigned HOST_WIDE_INT num_uncompressed_il_bytes;
8ceff600 451 unsigned HOST_WIDE_INT num_tree_bodies_output;
452 unsigned HOST_WIDE_INT num_pickle_refs_output;
7bfefa9d 453};
454
5cf7e051 455/* Entry of LTO symtab encoder. */
b3e7c666 456struct lto_encoder_entry
5cf7e051 457{
452659af 458 symtab_node *node;
5cf7e051 459 /* Is the node in this partition (i.e. ltrans of this partition will
460 be responsible for outputting it)? */
461 unsigned int in_partition:1;
462 /* Do we encode body in this partition? */
463 unsigned int body:1;
464 /* Do we encode initializer in this partition?
465 For example the readonly variable initializers are encoded to aid
466 constant folding even if they are not in the partition. */
467 unsigned int initializer:1;
b3e7c666 468};
5cf7e051 469
5cf7e051 470
7bfefa9d 471/* Encoder data structure used to stream callgraph nodes. */
70225339 472struct lto_symtab_encoder_d
7bfefa9d 473{
f1f41a6c 474 vec<lto_encoder_entry> nodes;
06ecf488 475 hash_map<symtab_node *, size_t> *map;
a238367f 476};
70225339 477
478typedef struct lto_symtab_encoder_d *lto_symtab_encoder_t;
a238367f 479
eab36a5a 480/* Iterator structure for cgraph node sets. */
b3e7c666 481struct lto_symtab_encoder_iterator
8ade54d2 482{
eab36a5a 483 lto_symtab_encoder_t encoder;
484 unsigned index;
b3e7c666 485};
eab36a5a 486
487
488
7bfefa9d 489/* The lto_tree_ref_encoder struct is used to encode trees into indices. */
490
491struct lto_tree_ref_encoder
492{
d62dd039 493 hash_map<tree, unsigned> *tree_hash_table; /* Maps pointers to indices. */
32d76803 494 vec<tree> trees; /* Maps indices to pointers. */
7bfefa9d 495};
496
497
498/* Structure to hold states of input scope. */
9f9f871f 499struct GTY((for_user)) lto_in_decl_state
7bfefa9d 500{
501 /* Array of lto_in_decl_buffers to store type and decls streams. */
5ecbd52e 502 vec<tree, va_gc> *streams[LTO_N_DECL_STREAMS];
7bfefa9d 503
504 /* If this in-decl state is associated with a function. FN_DECL
505 point to the FUNCTION_DECL. */
506 tree fn_decl;
507};
508
509typedef struct lto_in_decl_state *lto_in_decl_state_ptr;
510
9f9f871f 511struct decl_state_hasher : ggc_hasher<lto_in_decl_state *>
512{
513 static hashval_t
514 hash (lto_in_decl_state *s)
515 {
516 return htab_hash_pointer (s->fn_decl);
517 }
518
519 static bool
520 equal (lto_in_decl_state *a, lto_in_decl_state *b)
521 {
522 return a->fn_decl == b->fn_decl;
523 }
524};
7bfefa9d 525
526/* The structure that holds all of the vectors of global types,
527 decls and cgraph nodes used in the serialization of this file. */
528struct lto_out_decl_state
529{
530 /* The buffers contain the sets of decls of various kinds and types we have
531 seen so far and the indexes assigned to them. */
532 struct lto_tree_ref_encoder streams[LTO_N_DECL_STREAMS];
533
534 /* Encoder for cgraph nodes. */
70225339 535 lto_symtab_encoder_t symtab_node_encoder;
a238367f 536
7bfefa9d 537 /* If this out-decl state belongs to a function, fn_decl points to that
538 function. Otherwise, it is NULL. */
539 tree fn_decl;
540};
541
542typedef struct lto_out_decl_state *lto_out_decl_state_ptr;
543
7bfefa9d 544
b5c89d58 545/* Compact representation of a index <-> resolution pair. Unpacked to an
546 vector later. */
547struct res_pair
548{
549 ld_plugin_symbol_resolution_t res;
550 unsigned index;
551};
b5c89d58 552
b5c89d58 553
7bfefa9d 554/* One of these is allocated for each object file that being compiled
555 by lto. This structure contains the tables that are needed by the
556 serialized functions and ipa passes to connect themselves to the
557 global types and decls as they are reconstituted. */
57305941 558struct GTY(()) lto_file_decl_data
7bfefa9d 559{
560 /* Decl state currently used. */
561 struct lto_in_decl_state *current_decl_state;
562
563 /* Decl state corresponding to regions outside of any functions
564 in the compilation unit. */
565 struct lto_in_decl_state *global_decl_state;
566
567 /* Table of cgraph nodes present in this file. */
70225339 568 lto_symtab_encoder_t GTY((skip)) symtab_node_encoder;
a238367f 569
7bfefa9d 570 /* Hash table maps lto-related section names to location in file. */
9f9f871f 571 hash_table<decl_state_hasher> *function_decl_states;
7bfefa9d 572
573 /* The .o file that these offsets relate to. */
57305941 574 const char *GTY((skip)) file_name;
7bfefa9d 575
7bfefa9d 576 /* Hash table maps lto-related section names to location in file. */
57305941 577 htab_t GTY((skip)) section_hash_table;
7bfefa9d 578
579 /* Hash new name of renamed global declaration to its original name. */
57305941 580 htab_t GTY((skip)) renaming_hash_table;
f18bad33 581
582 /* Linked list used temporarily in reader */
583 struct lto_file_decl_data *next;
584
585 /* Sub ID for merged objects. */
badc6cfa 586 unsigned HOST_WIDE_INT id;
f18bad33 587
588 /* Symbol resolutions for this file */
f1f41a6c 589 vec<res_pair> GTY((skip)) respairs;
b5c89d58 590 unsigned max_index;
c470c5a9 591
592 struct gcov_ctr_summary GTY((skip)) profile_info;
9e9c3e92 593
594 /* Map assigning declarations their resolutions. */
5f8841a5 595 hash_map<tree, ld_plugin_symbol_resolution> * GTY((skip)) resolution_map;
2e971afd 596
597 /* Mode translation table. */
598 const unsigned char *mode_table;
7bfefa9d 599};
600
ba72912a 601typedef struct lto_file_decl_data *lto_file_decl_data_ptr;
602
7bfefa9d 603struct lto_char_ptr_base
604{
605 char *ptr;
606};
607
608/* An incore byte stream to buffer the various parts of the function.
609 The entire structure should be zeroed when created. The record
610 consists of a set of blocks. The first sizeof (ptr) bytes are used
611 as a chain, and the rest store the bytes to be written. */
612struct lto_output_stream
613{
614 /* The pointer to the first block in the stream. */
615 struct lto_char_ptr_base * first_block;
616
617 /* The pointer to the last and current block in the stream. */
618 struct lto_char_ptr_base * current_block;
619
620 /* The pointer to where the next char should be written. */
621 char * current_pointer;
622
623 /* The number of characters left in the current block. */
624 unsigned int left_in_block;
625
626 /* The block size of the last block allocated. */
627 unsigned int block_size;
628
629 /* The total number of characters written. */
630 unsigned int total_size;
631};
632
7bfefa9d 633/* A simple output block. This can be used for simple IPA passes that
634 do not need more than one stream. */
635struct lto_simple_output_block
636{
637 enum lto_section_type section_type;
638 struct lto_out_decl_state *decl_state;
639
640 /* The stream that the main tree codes are written to. */
641 struct lto_output_stream *main_stream;
642};
643
d9dd21a8 644/* String hashing. */
645
646struct string_slot
647{
648 const char *s;
649 int len;
650 unsigned int slot_num;
651};
652
653/* Hashtable helpers. */
654
655struct string_slot_hasher : typed_noop_remove <string_slot>
656{
9969c043 657 typedef string_slot *value_type;
658 typedef string_slot *compare_type;
659 static inline hashval_t hash (const string_slot *);
660 static inline bool equal (const string_slot *, const string_slot *);
d9dd21a8 661};
662
663/* Returns a hash code for DS. Adapted from libiberty's htab_hash_string
664 to support strings that may not end in '\0'. */
665
666inline hashval_t
9969c043 667string_slot_hasher::hash (const string_slot *ds)
d9dd21a8 668{
669 hashval_t r = ds->len;
670 int i;
671
672 for (i = 0; i < ds->len; i++)
673 r = r * 67 + (unsigned)ds->s[i] - 113;
674 return r;
675}
676
677/* Returns nonzero if DS1 and DS2 are equal. */
678
679inline bool
9969c043 680string_slot_hasher::equal (const string_slot *ds1, const string_slot *ds2)
d9dd21a8 681{
682 if (ds1->len == ds2->len)
683 return memcmp (ds1->s, ds2->s, ds1->len) == 0;
684
685 return 0;
686}
687
7bfefa9d 688/* Data structure holding all the data and descriptors used when writing
689 an LTO file. */
690struct output_block
691{
692 enum lto_section_type section_type;
693 struct lto_out_decl_state *decl_state;
694
695 /* The stream that the main tree codes are written to. */
696 struct lto_output_stream *main_stream;
697
698 /* The stream that contains the string table. */
699 struct lto_output_stream *string_stream;
700
701 /* The stream that contains the cfg. */
702 struct lto_output_stream *cfg_stream;
703
704 /* The hash table that contains the set of strings we have seen so
705 far and the indexes assigned to them. */
c1f445d2 706 hash_table<string_slot_hasher> *string_hash_table;
7bfefa9d 707
afb0d513 708 /* The current symbol that we are currently serializing. Null
7bfefa9d 709 if we are serializing something else. */
efc34f16 710 symtab_node *symbol;
7bfefa9d 711
712 /* These are the last file and line that were seen in the stream.
713 If the current node differs from these, it needs to insert
714 something into the stream and fix these up. */
715 const char *current_file;
716 int current_line;
717 int current_col;
718
7bfefa9d 719 /* Cache of nodes written in this section. */
7f385784 720 struct streamer_tree_cache_d *writer_cache;
894593c8 721
722 /* All data persistent across whole duration of output block
723 can go here. */
724 struct obstack obstack;
7bfefa9d 725};
726
727
728/* Data and descriptors used when reading from an LTO file. */
729struct data_in
730{
731 /* The global decls and types. */
732 struct lto_file_decl_data *file_data;
733
7bfefa9d 734 /* The string table. */
735 const char *strings;
736
737 /* The length of the string table. */
738 unsigned int strings_len;
739
7bfefa9d 740 /* Maps each reference number to the resolution done by the linker. */
f1f41a6c 741 vec<ld_plugin_symbol_resolution_t> globals_resolution;
7bfefa9d 742
743 /* Cache of pickled nodes. */
7f385784 744 struct streamer_tree_cache_d *reader_cache;
da6f3259 745
746 /* Cache of source code location. */
747 lto_location_cache location_cache;
7bfefa9d 748};
749
750
751/* In lto-section-in.c */
752extern struct lto_input_block * lto_create_simple_input_block (
48e1416a 753 struct lto_file_decl_data *,
7bfefa9d 754 enum lto_section_type, const char **, size_t *);
755extern void
48e1416a 756lto_destroy_simple_input_block (struct lto_file_decl_data *,
7bfefa9d 757 enum lto_section_type,
758 struct lto_input_block *, const char *, size_t);
48e1416a 759extern void lto_set_in_hooks (struct lto_file_decl_data **,
7bfefa9d 760 lto_get_section_data_f *,
761 lto_free_section_data_f *);
762extern struct lto_file_decl_data **lto_get_file_decl_data (void);
763extern const char *lto_get_section_data (struct lto_file_decl_data *,
764 enum lto_section_type,
765 const char *, size_t *);
766extern void lto_free_section_data (struct lto_file_decl_data *,
767 enum lto_section_type,
768 const char *, const char *, size_t);
7bfefa9d 769extern htab_t lto_create_renaming_table (void);
770extern void lto_record_renamed_decl (struct lto_file_decl_data *,
771 const char *, const char *);
772extern const char *lto_get_decl_name_mapping (struct lto_file_decl_data *,
773 const char *);
774extern struct lto_in_decl_state *lto_new_in_decl_state (void);
775extern void lto_delete_in_decl_state (struct lto_in_decl_state *);
7bfefa9d 776extern struct lto_in_decl_state *lto_get_function_in_decl_state (
777 struct lto_file_decl_data *, tree);
a1e7a7ba 778extern void lto_free_function_in_decl_state (struct lto_in_decl_state *);
452659af 779extern void lto_free_function_in_decl_state_for_node (symtab_node *);
673ca05f 780extern void lto_section_overrun (struct lto_input_block *) ATTRIBUTE_NORETURN;
5f8d4adf 781extern void lto_value_range_error (const char *,
782 HOST_WIDE_INT, HOST_WIDE_INT,
783 HOST_WIDE_INT) ATTRIBUTE_NORETURN;
7bfefa9d 784
785/* In lto-section-out.c */
7bfefa9d 786extern void lto_begin_section (const char *, bool);
787extern void lto_end_section (void);
2d97af95 788extern void lto_write_data (const void *, unsigned int);
7bfefa9d 789extern void lto_write_stream (struct lto_output_stream *);
7bfefa9d 790extern bool lto_output_decl_index (struct lto_output_stream *,
791 struct lto_tree_ref_encoder *,
792 tree, unsigned int *);
793extern void lto_output_field_decl_index (struct lto_out_decl_state *,
794 struct lto_output_stream *, tree);
795extern void lto_output_fn_decl_index (struct lto_out_decl_state *,
796 struct lto_output_stream *, tree);
797extern void lto_output_namespace_decl_index (struct lto_out_decl_state *,
798 struct lto_output_stream *, tree);
799extern void lto_output_var_decl_index (struct lto_out_decl_state *,
800 struct lto_output_stream *, tree);
801extern void lto_output_type_decl_index (struct lto_out_decl_state *,
802 struct lto_output_stream *, tree);
803extern void lto_output_type_ref_index (struct lto_out_decl_state *,
804 struct lto_output_stream *, tree);
805extern struct lto_simple_output_block *lto_create_simple_output_block (
806 enum lto_section_type);
807extern void lto_destroy_simple_output_block (struct lto_simple_output_block *);
808extern struct lto_out_decl_state *lto_new_out_decl_state (void);
809extern void lto_delete_out_decl_state (struct lto_out_decl_state *);
810extern struct lto_out_decl_state *lto_get_out_decl_state (void);
811extern void lto_push_out_decl_state (struct lto_out_decl_state *);
812extern struct lto_out_decl_state *lto_pop_out_decl_state (void);
813extern void lto_record_function_out_decl_state (tree,
814 struct lto_out_decl_state *);
673ca05f 815extern void lto_append_block (struct lto_output_stream *);
7bfefa9d 816
817
818/* In lto-streamer.c. */
ba000093 819
820/* Set when streaming LTO for offloading compiler. */
821extern bool lto_stream_offload_p;
822
7bfefa9d 823extern const char *lto_tag_name (enum LTO_tags);
824extern bitmap lto_bitmap_alloc (void);
825extern void lto_bitmap_free (bitmap);
f18bad33 826extern char *lto_get_section_name (int, const char *, struct lto_file_decl_data *);
bdaea387 827extern void print_lto_report (const char *);
7bfefa9d 828extern void lto_streamer_init (void);
829extern bool gate_lto_out (void);
830#ifdef LTO_STREAMER_DEBUG
831extern void lto_orig_address_map (tree, intptr_t);
832extern intptr_t lto_orig_address_get (tree);
833extern void lto_orig_address_remove (tree);
834#endif
835extern void lto_check_version (int, int);
a0605d65 836extern void lto_streamer_hooks_init (void);
7bfefa9d 837
838/* In lto-streamer-in.c */
7bfefa9d 839extern void lto_input_cgraph (struct lto_file_decl_data *, const char *);
a0605d65 840extern void lto_reader_init (void);
06d12890 841extern void lto_input_function_body (struct lto_file_decl_data *,
842 struct cgraph_node *,
7bfefa9d 843 const char *);
afb0d513 844extern void lto_input_variable_constructor (struct lto_file_decl_data *,
845 struct varpool_node *,
846 const char *);
7bfefa9d 847extern void lto_input_constructors_and_inits (struct lto_file_decl_data *,
848 const char *);
f1007c72 849extern void lto_input_toplevel_asms (struct lto_file_decl_data *, int);
2e971afd 850extern void lto_input_mode_table (struct lto_file_decl_data *);
7bfefa9d 851extern struct data_in *lto_data_in_create (struct lto_file_decl_data *,
852 const char *, unsigned,
f1f41a6c 853 vec<ld_plugin_symbol_resolution_t> );
7bfefa9d 854extern void lto_data_in_delete (struct data_in *);
284cc480 855extern void lto_input_data_block (struct lto_input_block *, void *, size_t);
da6f3259 856void lto_input_location (location_t *, struct bitpack_d *, struct data_in *);
857location_t stream_input_location_now (struct bitpack_d *bp,
858 struct data_in *data);
2541503d 859tree lto_input_tree_ref (struct lto_input_block *, struct data_in *,
860 struct function *, enum LTO_tags);
861void lto_tag_check_set (enum LTO_tags, int, ...);
862void lto_init_eh (void);
8ceff600 863hashval_t lto_input_scc (struct lto_input_block *, struct data_in *,
864 unsigned *, unsigned *);
865tree lto_input_tree_1 (struct lto_input_block *, struct data_in *,
866 enum LTO_tags, hashval_t hash);
515cf651 867tree lto_input_tree (struct lto_input_block *, struct data_in *);
7bfefa9d 868
869
870/* In lto-streamer-out.c */
871extern void lto_register_decl_definition (tree, struct lto_file_decl_data *);
872extern struct output_block *create_output_block (enum lto_section_type);
873extern void destroy_output_block (struct output_block *);
57bcbbf6 874extern void lto_output_tree (struct output_block *, tree, bool, bool);
65d1b157 875extern void lto_output_toplevel_asms (void);
8867b500 876extern void produce_asm (struct output_block *ob, tree fn);
79913f53 877extern void lto_output ();
878extern void produce_asm_for_decls ();
284cc480 879void lto_output_decl_state_streams (struct output_block *,
880 struct lto_out_decl_state *);
881void lto_output_decl_state_refs (struct output_block *,
882 struct lto_output_stream *,
883 struct lto_out_decl_state *);
ec180527 884void lto_output_location (struct output_block *, struct bitpack_d *, location_t);
2e971afd 885void lto_output_init_mode_table (void);
7bfefa9d 886
887
888/* In lto-cgraph.c */
1ba7e31f 889extern bool asm_nodes_output;
b8925abd 890lto_symtab_encoder_t lto_symtab_encoder_new (bool);
452659af 891int lto_symtab_encoder_encode (lto_symtab_encoder_t, symtab_node *);
70225339 892void lto_symtab_encoder_delete (lto_symtab_encoder_t);
452659af 893bool lto_symtab_encoder_delete_node (lto_symtab_encoder_t, symtab_node *);
70225339 894bool lto_symtab_encoder_encode_body_p (lto_symtab_encoder_t,
02b2818c 895 struct cgraph_node *);
eab36a5a 896bool lto_symtab_encoder_in_partition_p (lto_symtab_encoder_t,
452659af 897 symtab_node *);
eab36a5a 898void lto_set_symtab_encoder_in_partition (lto_symtab_encoder_t,
452659af 899 symtab_node *);
02b2818c 900
70225339 901bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t,
098f44bc 902 varpool_node *);
eab36a5a 903void output_symtab (void);
02b699d5 904void input_symtab (void);
dccabdd1 905void output_offload_tables (void);
906void input_offload_tables (void);
8d810329 907bool referenced_from_other_partition_p (struct ipa_ref_list *,
eab36a5a 908 lto_symtab_encoder_t);
25429dc2 909bool reachable_from_other_partition_p (struct cgraph_node *,
eab36a5a 910 lto_symtab_encoder_t);
efc34f16 911bool referenced_from_this_partition_p (symtab_node *,
eab36a5a 912 lto_symtab_encoder_t);
d97be713 913bool reachable_from_this_partition_p (struct cgraph_node *,
eab36a5a 914 lto_symtab_encoder_t);
724462b0 915lto_symtab_encoder_t compute_ltrans_boundary (lto_symtab_encoder_t encoder);
9d65fe51 916void select_what_to_stream (void);
7bfefa9d 917
0fd94051 918/* In options-save.c. */
919void cl_target_option_stream_out (struct output_block *, struct bitpack_d *,
920 struct cl_target_option *);
921
922void cl_target_option_stream_in (struct data_in *,
923 struct bitpack_d *,
924 struct cl_target_option *);
925
54f880b2 926void cl_optimization_stream_out (struct bitpack_d *, struct cl_optimization *);
927
928void cl_optimization_stream_in (struct bitpack_d *, struct cl_optimization *);
929
7bfefa9d 930
931/* In lto-symtab.c. */
fd193bcd 932extern void lto_symtab_merge_decls (void);
48669653 933extern void lto_symtab_merge_symbols (void);
7bfefa9d 934extern tree lto_symtab_prevailing_decl (tree decl);
7bfefa9d 935
936
937/* In lto-opts.c. */
7bfefa9d 938extern void lto_write_options (void);
7bfefa9d 939
940
7bfefa9d 941/* Statistics gathered during LTO, WPA and LTRANS. */
942extern struct lto_stats_d lto_stats;
943
944/* Section names corresponding to the values of enum lto_section_type. */
945extern const char *lto_section_name[];
946
947/* Holds all the out decl states of functions output so far in the
948 current output file. */
f1f41a6c 949extern vec<lto_out_decl_state_ptr> lto_function_decl_states;
7bfefa9d 950
951/* Return true if LTO tag TAG corresponds to a tree code. */
952static inline bool
953lto_tag_is_tree_code_p (enum LTO_tags tag)
954{
e09e0df2 955 return tag > LTO_tree_pickle_reference && (unsigned) tag <= MAX_TREE_CODES;
7bfefa9d 956}
957
958
959/* Return true if LTO tag TAG corresponds to a gimple code. */
960static inline bool
961lto_tag_is_gimple_code_p (enum LTO_tags tag)
962{
e09e0df2 963 return (unsigned) tag >= NUM_TREE_CODES + 2
964 && (unsigned) tag < 2 + NUM_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE;
7bfefa9d 965}
966
967
968/* Return the LTO tag corresponding to gimple code CODE. See enum
969 LTO_tags for details on the conversion. */
970static inline enum LTO_tags
971lto_gimple_code_to_tag (enum gimple_code code)
972{
e09e0df2 973 return (enum LTO_tags) ((unsigned) code + NUM_TREE_CODES + 2);
7bfefa9d 974}
975
976
977/* Return the GIMPLE code corresponding to TAG. See enum LTO_tags for
978 details on the conversion. */
979static inline enum gimple_code
980lto_tag_to_gimple_code (enum LTO_tags tag)
981{
982 gcc_assert (lto_tag_is_gimple_code_p (tag));
e09e0df2 983 return (enum gimple_code) ((unsigned) tag - NUM_TREE_CODES - 2);
7bfefa9d 984}
985
986
987/* Return the LTO tag corresponding to tree code CODE. See enum
988 LTO_tags for details on the conversion. */
989static inline enum LTO_tags
990lto_tree_code_to_tag (enum tree_code code)
991{
e09e0df2 992 return (enum LTO_tags) ((unsigned) code + 2);
7bfefa9d 993}
994
995
996/* Return the tree code corresponding to TAG. See enum LTO_tags for
997 details on the conversion. */
998static inline enum tree_code
999lto_tag_to_tree_code (enum LTO_tags tag)
1000{
1001 gcc_assert (lto_tag_is_tree_code_p (tag));
e09e0df2 1002 return (enum tree_code) ((unsigned) tag - 2);
7bfefa9d 1003}
1004
2541503d 1005/* Check that tag ACTUAL == EXPECTED. */
1006static inline void
1007lto_tag_check (enum LTO_tags actual, enum LTO_tags expected)
1008{
1009 if (actual != expected)
1010 internal_error ("bytecode stream: expected tag %s instead of %s",
1011 lto_tag_name (expected), lto_tag_name (actual));
1012}
1013
1014/* Check that tag ACTUAL is in the range [TAG1, TAG2]. */
1015static inline void
1016lto_tag_check_range (enum LTO_tags actual, enum LTO_tags tag1,
1017 enum LTO_tags tag2)
1018{
1019 if (actual < tag1 || actual > tag2)
1020 internal_error ("bytecode stream: tag %s is not in the expected range "
1021 "[%s, %s]",
1022 lto_tag_name (actual),
1023 lto_tag_name (tag1),
1024 lto_tag_name (tag2));
1025}
1026
7bfefa9d 1027/* Initialize an lto_out_decl_buffer ENCODER. */
1028static inline void
32d76803 1029lto_init_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
7bfefa9d 1030{
d62dd039 1031 encoder->tree_hash_table = new hash_map<tree, unsigned> (251);
f1f41a6c 1032 encoder->trees.create (0);
7bfefa9d 1033}
1034
1035
9d75589a 1036/* Destroy an lto_tree_ref_encoder ENCODER by freeing its contents. The
7bfefa9d 1037 memory used by ENCODER is not freed by this function. */
1038static inline void
1039lto_destroy_tree_ref_encoder (struct lto_tree_ref_encoder *encoder)
1040{
1041 /* Hash table may be delete already. */
d62dd039 1042 delete encoder->tree_hash_table;
1043 encoder->tree_hash_table = NULL;
f1f41a6c 1044 encoder->trees.release ();
7bfefa9d 1045}
1046
1047/* Return the number of trees encoded in ENCODER. */
1048static inline unsigned int
1049lto_tree_ref_encoder_size (struct lto_tree_ref_encoder *encoder)
1050{
f1f41a6c 1051 return encoder->trees.length ();
7bfefa9d 1052}
1053
1054/* Return the IDX-th tree in ENCODER. */
1055static inline tree
1056lto_tree_ref_encoder_get_tree (struct lto_tree_ref_encoder *encoder,
1057 unsigned int idx)
1058{
f1f41a6c 1059 return encoder->trees[idx];
7bfefa9d 1060}
1061
eab36a5a 1062/* Return number of encoded nodes in ENCODER. */
1063static inline int
1064lto_symtab_encoder_size (lto_symtab_encoder_t encoder)
1065{
f1f41a6c 1066 return encoder->nodes.length ();
5cf7e051 1067}
1068
1069/* Value used to represent failure of lto_symtab_encoder_lookup. */
1070#define LCC_NOT_FOUND (-1)
1071
1072/* Look up NODE in encoder. Return NODE's reference if it has been encoded
1073 or LCC_NOT_FOUND if it is not there. */
1074
1075static inline int
1076lto_symtab_encoder_lookup (lto_symtab_encoder_t encoder,
452659af 1077 symtab_node *node)
5cf7e051 1078{
06ecf488 1079 size_t *slot = encoder->map->get (node);
1080 return (slot && *slot ? *(slot) - 1 : LCC_NOT_FOUND);
eab36a5a 1081}
1082
1083/* Return true if iterator LSE points to nothing. */
1084static inline bool
1085lsei_end_p (lto_symtab_encoder_iterator lsei)
1086{
1087 return lsei.index >= (unsigned)lto_symtab_encoder_size (lsei.encoder);
1088}
1089
1090/* Advance iterator LSE. */
1091static inline void
1092lsei_next (lto_symtab_encoder_iterator *lsei)
1093{
1094 lsei->index++;
1095}
1096
1097/* Return the node pointed to by LSI. */
452659af 1098static inline symtab_node *
eab36a5a 1099lsei_node (lto_symtab_encoder_iterator lsei)
1100{
f1f41a6c 1101 return lsei.encoder->nodes[lsei.index].node;
eab36a5a 1102}
1103
1104/* Return the node pointed to by LSI. */
1105static inline struct cgraph_node *
1106lsei_cgraph_node (lto_symtab_encoder_iterator lsei)
1107{
415d1b9a 1108 return dyn_cast<cgraph_node *> (lsei.encoder->nodes[lsei.index].node);
eab36a5a 1109}
1110
1111/* Return the node pointed to by LSI. */
098f44bc 1112static inline varpool_node *
eab36a5a 1113lsei_varpool_node (lto_symtab_encoder_iterator lsei)
1114{
415d1b9a 1115 return dyn_cast<varpool_node *> (lsei.encoder->nodes[lsei.index].node);
eab36a5a 1116}
1117
eab36a5a 1118/* Return the cgraph node corresponding to REF using ENCODER. */
1119
452659af 1120static inline symtab_node *
eab36a5a 1121lto_symtab_encoder_deref (lto_symtab_encoder_t encoder, int ref)
1122{
1123 if (ref == LCC_NOT_FOUND)
1124 return NULL;
1125
f1f41a6c 1126 return encoder->nodes[ref].node;
eab36a5a 1127}
1128
1129/* Return an iterator to the first node in LSI. */
1130static inline lto_symtab_encoder_iterator
1131lsei_start (lto_symtab_encoder_t encoder)
1132{
1133 lto_symtab_encoder_iterator lsei;
1134
1135 lsei.encoder = encoder;
1136 lsei.index = 0;
1137 return lsei;
1138}
1139
1140/* Advance iterator LSE. */
1141static inline void
1142lsei_next_in_partition (lto_symtab_encoder_iterator *lsei)
1143{
1144 lsei_next (lsei);
1145 while (!lsei_end_p (*lsei)
1146 && !lto_symtab_encoder_in_partition_p (lsei->encoder, lsei_node (*lsei)))
1147 lsei_next (lsei);
1148}
1149
1150/* Return an iterator to the first node in LSI. */
1151static inline lto_symtab_encoder_iterator
1152lsei_start_in_partition (lto_symtab_encoder_t encoder)
1153{
1154 lto_symtab_encoder_iterator lsei = lsei_start (encoder);
1155
1156 if (lsei_end_p (lsei))
1157 return lsei;
1158 if (!lto_symtab_encoder_in_partition_p (encoder, lsei_node (lsei)))
1159 lsei_next_in_partition (&lsei);
1160
1161 return lsei;
1162}
1163
1164/* Advance iterator LSE. */
1165static inline void
1166lsei_next_function_in_partition (lto_symtab_encoder_iterator *lsei)
1167{
1168 lsei_next (lsei);
1169 while (!lsei_end_p (*lsei)
13cbeaac 1170 && (!is_a <cgraph_node *> (lsei_node (*lsei))
eab36a5a 1171 || !lto_symtab_encoder_in_partition_p (lsei->encoder, lsei_node (*lsei))))
1172 lsei_next (lsei);
1173}
1174
1175/* Return an iterator to the first node in LSI. */
1176static inline lto_symtab_encoder_iterator
1177lsei_start_function_in_partition (lto_symtab_encoder_t encoder)
1178{
1179 lto_symtab_encoder_iterator lsei = lsei_start (encoder);
1180
1181 if (lsei_end_p (lsei))
1182 return lsei;
13cbeaac 1183 if (!is_a <cgraph_node *> (lsei_node (lsei))
eab36a5a 1184 || !lto_symtab_encoder_in_partition_p (encoder, lsei_node (lsei)))
1185 lsei_next_function_in_partition (&lsei);
1186
1187 return lsei;
1188}
1189
1190/* Advance iterator LSE. */
1191static inline void
1192lsei_next_variable_in_partition (lto_symtab_encoder_iterator *lsei)
1193{
1194 lsei_next (lsei);
1195 while (!lsei_end_p (*lsei)
13cbeaac 1196 && (!is_a <varpool_node *> (lsei_node (*lsei))
eab36a5a 1197 || !lto_symtab_encoder_in_partition_p (lsei->encoder, lsei_node (*lsei))))
1198 lsei_next (lsei);
1199}
1200
1201/* Return an iterator to the first node in LSI. */
1202static inline lto_symtab_encoder_iterator
1203lsei_start_variable_in_partition (lto_symtab_encoder_t encoder)
1204{
1205 lto_symtab_encoder_iterator lsei = lsei_start (encoder);
1206
1207 if (lsei_end_p (lsei))
1208 return lsei;
13cbeaac 1209 if (!is_a <varpool_node *> (lsei_node (lsei))
eab36a5a 1210 || !lto_symtab_encoder_in_partition_p (encoder, lsei_node (lsei)))
1211 lsei_next_variable_in_partition (&lsei);
1212
1213 return lsei;
1214}
1215
7bfefa9d 1216DEFINE_DECL_STREAM_FUNCS (TYPE, type)
1217DEFINE_DECL_STREAM_FUNCS (FIELD_DECL, field_decl)
1218DEFINE_DECL_STREAM_FUNCS (FN_DECL, fn_decl)
1219DEFINE_DECL_STREAM_FUNCS (VAR_DECL, var_decl)
1220DEFINE_DECL_STREAM_FUNCS (TYPE_DECL, type_decl)
1221DEFINE_DECL_STREAM_FUNCS (NAMESPACE_DECL, namespace_decl)
1222DEFINE_DECL_STREAM_FUNCS (LABEL_DECL, label_decl)
1223
1224#endif /* GCC_LTO_STREAMER_H */