1 /* Write the GIMPLE representation to a file stream.
3 Copyright 2009, 2010 Free Software Foundation, Inc.
4 Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
5 Re-implemented by Diego Novillo <dnovillo@google.com>
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
25 #include "coretypes.h"
33 #include "basic-block.h"
34 #include "tree-flow.h"
35 #include "tree-pass.h"
39 #include "diagnostic-core.h"
42 #include "lto-symtab.h"
43 #include "lto-streamer.h"
44 #include "data-streamer.h"
45 #include "gimple-streamer.h"
46 #include "tree-streamer.h"
47 #include "streamer-hooks.h"
50 /* Clear the line info stored in DATA_IN. */
53 clear_line_info (struct output_block
*ob
)
55 ob
->current_file
= NULL
;
61 /* Create the output block and return it. SECTION_TYPE is
62 LTO_section_function_body or LTO_static_initializer. */
65 create_output_block (enum lto_section_type section_type
)
67 struct output_block
*ob
= XCNEW (struct output_block
);
69 ob
->section_type
= section_type
;
70 ob
->decl_state
= lto_get_out_decl_state ();
71 ob
->main_stream
= XCNEW (struct lto_output_stream
);
72 ob
->string_stream
= XCNEW (struct lto_output_stream
);
73 ob
->writer_cache
= streamer_tree_cache_create ();
75 if (section_type
== LTO_section_function_body
)
76 ob
->cfg_stream
= XCNEW (struct lto_output_stream
);
80 ob
->string_hash_table
= htab_create (37, hash_string_slot_node
,
81 eq_string_slot_node
, NULL
);
82 gcc_obstack_init (&ob
->obstack
);
88 /* Destroy the output block OB. */
91 destroy_output_block (struct output_block
*ob
)
93 enum lto_section_type section_type
= ob
->section_type
;
95 htab_delete (ob
->string_hash_table
);
97 free (ob
->main_stream
);
98 free (ob
->string_stream
);
99 if (section_type
== LTO_section_function_body
)
100 free (ob
->cfg_stream
);
102 streamer_tree_cache_delete (ob
->writer_cache
);
103 obstack_free (&ob
->obstack
, NULL
);
109 /* Look up NODE in the type table and write the index for it to OB. */
112 output_type_ref (struct output_block
*ob
, tree node
)
114 streamer_write_record_start (ob
, LTO_type_ref
);
115 lto_output_type_ref_index (ob
->decl_state
, ob
->main_stream
, node
);
119 /* Return true if tree node T is written to various tables. For these
120 nodes, we sometimes want to write their phyiscal representation
121 (via lto_output_tree), and sometimes we need to emit an index
122 reference into a table (via lto_output_tree_ref). */
125 tree_is_indexable (tree t
)
127 if (TREE_CODE (t
) == PARM_DECL
)
129 else if (TREE_CODE (t
) == VAR_DECL
&& decl_function_context (t
)
132 /* Variably modified types need to be streamed alongside function
133 bodies because they can refer to local entities. Together with
134 them we have to localize their members as well.
135 ??? In theory that includes non-FIELD_DECLs as well. */
137 && variably_modified_type_p (t
, NULL_TREE
))
139 else if (TREE_CODE (t
) == FIELD_DECL
140 && variably_modified_type_p (DECL_CONTEXT (t
), NULL_TREE
))
143 return (TYPE_P (t
) || DECL_P (t
) || TREE_CODE (t
) == SSA_NAME
);
147 /* Output info about new location into bitpack BP.
148 After outputting bitpack, lto_output_location_data has
149 to be done to output actual data. */
152 lto_output_location_bitpack (struct bitpack_d
*bp
,
153 struct output_block
*ob
,
156 expanded_location xloc
;
158 bp_pack_value (bp
, loc
== UNKNOWN_LOCATION
, 1);
159 if (loc
== UNKNOWN_LOCATION
)
162 xloc
= expand_location (loc
);
164 bp_pack_value (bp
, ob
->current_file
!= xloc
.file
, 1);
165 if (ob
->current_file
!= xloc
.file
)
166 bp_pack_var_len_unsigned (bp
,
167 streamer_string_index (ob
, xloc
.file
,
168 strlen (xloc
.file
) + 1,
170 ob
->current_file
= xloc
.file
;
172 bp_pack_value (bp
, ob
->current_line
!= xloc
.line
, 1);
173 if (ob
->current_line
!= xloc
.line
)
174 bp_pack_var_len_unsigned (bp
, xloc
.line
);
175 ob
->current_line
= xloc
.line
;
177 bp_pack_value (bp
, ob
->current_col
!= xloc
.column
, 1);
178 if (ob
->current_col
!= xloc
.column
)
179 bp_pack_var_len_unsigned (bp
, xloc
.column
);
180 ob
->current_col
= xloc
.column
;
184 /* Emit location LOC to output block OB.
185 If the output_location streamer hook exists, call it.
186 Otherwise, when bitpack is handy, it is more space efficient to call
187 lto_output_location_bitpack with existing bitpack. */
190 lto_output_location (struct output_block
*ob
, location_t loc
)
192 if (streamer_hooks
.output_location
)
193 streamer_hooks
.output_location (ob
, loc
);
196 struct bitpack_d bp
= bitpack_create (ob
->main_stream
);
197 lto_output_location_bitpack (&bp
, ob
, loc
);
198 streamer_write_bitpack (&bp
);
203 /* If EXPR is an indexable tree node, output a reference to it to
204 output block OB. Otherwise, output the physical representation of
208 lto_output_tree_ref (struct output_block
*ob
, tree expr
)
214 output_type_ref (ob
, expr
);
218 code
= TREE_CODE (expr
);
222 streamer_write_record_start (ob
, LTO_ssa_name_ref
);
223 streamer_write_uhwi (ob
, SSA_NAME_VERSION (expr
));
227 streamer_write_record_start (ob
, LTO_field_decl_ref
);
228 lto_output_field_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
232 streamer_write_record_start (ob
, LTO_function_decl_ref
);
233 lto_output_fn_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
237 case DEBUG_EXPR_DECL
:
238 gcc_assert (decl_function_context (expr
) == NULL
|| TREE_STATIC (expr
));
239 streamer_write_record_start (ob
, LTO_global_decl_ref
);
240 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
244 streamer_write_record_start (ob
, LTO_const_decl_ref
);
245 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
249 gcc_assert (decl_function_context (expr
) == NULL
);
250 streamer_write_record_start (ob
, LTO_imported_decl_ref
);
251 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
255 streamer_write_record_start (ob
, LTO_type_decl_ref
);
256 lto_output_type_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
260 streamer_write_record_start (ob
, LTO_namespace_decl_ref
);
261 lto_output_namespace_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
265 streamer_write_record_start (ob
, LTO_label_decl_ref
);
266 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
270 streamer_write_record_start (ob
, LTO_result_decl_ref
);
271 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
274 case TRANSLATION_UNIT_DECL
:
275 streamer_write_record_start (ob
, LTO_translation_unit_decl_ref
);
276 lto_output_var_decl_index (ob
->decl_state
, ob
->main_stream
, expr
);
280 /* No other node is indexable, so it should have been handled by
287 /* Return true if EXPR is a tree node that can be written to disk. */
290 lto_is_streamable (tree expr
)
292 enum tree_code code
= TREE_CODE (expr
);
294 /* Notice that we reject SSA_NAMEs as well. We only emit the SSA
295 name version in lto_output_tree_ref (see output_ssa_names). */
296 return !is_lang_specific (expr
)
300 && code
!= MODIFY_EXPR
302 && code
!= TARGET_EXPR
304 && code
!= WITH_CLEANUP_EXPR
305 && code
!= STATEMENT_LIST
306 && code
!= OMP_CLAUSE
307 && (code
== CASE_LABEL_EXPR
309 || TREE_CODE_CLASS (code
) != tcc_statement
);
313 /* Write a physical representation of tree node EXPR to output block
314 OB. If REF_P is true, the leaves of EXPR are emitted as references
315 via lto_output_tree_ref. IX is the index into the streamer cache
316 where EXPR is stored. */
319 lto_write_tree (struct output_block
*ob
, tree expr
, bool ref_p
)
323 if (!lto_is_streamable (expr
))
324 internal_error ("tree code %qs is not supported in LTO streams",
325 tree_code_name
[TREE_CODE (expr
)]);
327 /* Write the header, containing everything needed to materialize
328 EXPR on the reading side. */
329 streamer_write_tree_header (ob
, expr
);
331 /* Pack all the non-pointer fields in EXPR into a bitpack and write
332 the resulting bitpack. */
333 bp
= bitpack_create (ob
->main_stream
);
334 streamer_pack_tree_bitfields (&bp
, expr
);
335 streamer_write_bitpack (&bp
);
337 /* Write all the pointer fields in EXPR. */
338 streamer_write_tree_body (ob
, expr
, ref_p
);
340 /* Write any LTO-specific data to OB. */
342 && TREE_CODE (expr
) != FUNCTION_DECL
343 && TREE_CODE (expr
) != TRANSLATION_UNIT_DECL
)
345 /* Handle DECL_INITIAL for symbols. */
346 tree initial
= DECL_INITIAL (expr
);
347 if (TREE_CODE (expr
) == VAR_DECL
348 && (TREE_STATIC (expr
) || DECL_EXTERNAL (expr
))
351 lto_varpool_encoder_t varpool_encoder
;
352 struct varpool_node
*vnode
;
354 varpool_encoder
= ob
->decl_state
->varpool_node_encoder
;
355 vnode
= varpool_get_node (expr
);
357 || !lto_varpool_encoder_encode_initializer_p (varpool_encoder
,
359 initial
= error_mark_node
;
362 stream_write_tree (ob
, initial
, ref_p
);
365 /* Mark the end of EXPR. */
366 streamer_write_zero (ob
);
370 /* Emit the physical representation of tree node EXPR to output block
371 OB. If THIS_REF_P is true, the leaves of EXPR are emitted as references
372 via lto_output_tree_ref. REF_P is used for streaming siblings of EXPR. */
375 lto_output_tree (struct output_block
*ob
, tree expr
,
376 bool ref_p
, bool this_ref_p
)
381 if (expr
== NULL_TREE
)
383 streamer_write_record_start (ob
, LTO_null
);
387 if (this_ref_p
&& tree_is_indexable (expr
))
389 lto_output_tree_ref (ob
, expr
);
393 /* INTEGER_CST nodes are special because they need their original type
394 to be materialized by the reader (to implement TYPE_CACHED_VALUES). */
395 if (TREE_CODE (expr
) == INTEGER_CST
)
397 streamer_write_integer_cst (ob
, expr
, ref_p
);
401 existed_p
= streamer_tree_cache_insert (ob
->writer_cache
, expr
, &ix
);
404 /* If a node has already been streamed out, make sure that
405 we don't write it more than once. Otherwise, the reader
406 will instantiate two different nodes for the same object. */
407 streamer_write_record_start (ob
, LTO_tree_pickle_reference
);
408 streamer_write_uhwi (ob
, ix
);
409 streamer_write_enum (ob
->main_stream
, LTO_tags
, LTO_NUM_TAGS
,
410 lto_tree_code_to_tag (TREE_CODE (expr
)));
412 else if (streamer_handle_as_builtin_p (expr
))
414 /* MD and NORMAL builtins do not need to be written out
415 completely as they are always instantiated by the
416 compiler on startup. The only builtins that need to
417 be written out are BUILT_IN_FRONTEND. For all other
418 builtins, we simply write the class and code. */
419 streamer_write_builtin (ob
, expr
);
423 /* This is the first time we see EXPR, write its fields
425 lto_write_tree (ob
, expr
, ref_p
);
430 /* Output to OB a list of try/catch handlers starting with FIRST. */
433 output_eh_try_list (struct output_block
*ob
, eh_catch first
)
437 for (n
= first
; n
; n
= n
->next_catch
)
439 streamer_write_record_start (ob
, LTO_eh_catch
);
440 stream_write_tree (ob
, n
->type_list
, true);
441 stream_write_tree (ob
, n
->filter_list
, true);
442 stream_write_tree (ob
, n
->label
, true);
445 streamer_write_record_start (ob
, LTO_null
);
449 /* Output EH region R in function FN to OB. CURR_RN is the slot index
450 that is being emitted in FN->EH->REGION_ARRAY. This is used to
451 detect EH region sharing. */
454 output_eh_region (struct output_block
*ob
, eh_region r
)
460 streamer_write_record_start (ob
, LTO_null
);
464 if (r
->type
== ERT_CLEANUP
)
465 tag
= LTO_ert_cleanup
;
466 else if (r
->type
== ERT_TRY
)
468 else if (r
->type
== ERT_ALLOWED_EXCEPTIONS
)
469 tag
= LTO_ert_allowed_exceptions
;
470 else if (r
->type
== ERT_MUST_NOT_THROW
)
471 tag
= LTO_ert_must_not_throw
;
475 streamer_write_record_start (ob
, tag
);
476 streamer_write_hwi (ob
, r
->index
);
479 streamer_write_hwi (ob
, r
->outer
->index
);
481 streamer_write_zero (ob
);
484 streamer_write_hwi (ob
, r
->inner
->index
);
486 streamer_write_zero (ob
);
489 streamer_write_hwi (ob
, r
->next_peer
->index
);
491 streamer_write_zero (ob
);
493 if (r
->type
== ERT_TRY
)
495 output_eh_try_list (ob
, r
->u
.eh_try
.first_catch
);
497 else if (r
->type
== ERT_ALLOWED_EXCEPTIONS
)
499 stream_write_tree (ob
, r
->u
.allowed
.type_list
, true);
500 stream_write_tree (ob
, r
->u
.allowed
.label
, true);
501 streamer_write_uhwi (ob
, r
->u
.allowed
.filter
);
503 else if (r
->type
== ERT_MUST_NOT_THROW
)
505 stream_write_tree (ob
, r
->u
.must_not_throw
.failure_decl
, true);
506 lto_output_location (ob
, r
->u
.must_not_throw
.failure_loc
);
510 streamer_write_hwi (ob
, r
->landing_pads
->index
);
512 streamer_write_zero (ob
);
516 /* Output landing pad LP to OB. */
519 output_eh_lp (struct output_block
*ob
, eh_landing_pad lp
)
523 streamer_write_record_start (ob
, LTO_null
);
527 streamer_write_record_start (ob
, LTO_eh_landing_pad
);
528 streamer_write_hwi (ob
, lp
->index
);
530 streamer_write_hwi (ob
, lp
->next_lp
->index
);
532 streamer_write_zero (ob
);
535 streamer_write_hwi (ob
, lp
->region
->index
);
537 streamer_write_zero (ob
);
539 stream_write_tree (ob
, lp
->post_landing_pad
, true);
543 /* Output the existing eh_table to OB. */
546 output_eh_regions (struct output_block
*ob
, struct function
*fn
)
548 if (fn
->eh
&& fn
->eh
->region_tree
)
555 streamer_write_record_start (ob
, LTO_eh_table
);
557 /* Emit the index of the root of the EH region tree. */
558 streamer_write_hwi (ob
, fn
->eh
->region_tree
->index
);
560 /* Emit all the EH regions in the region array. */
561 streamer_write_hwi (ob
, VEC_length (eh_region
, fn
->eh
->region_array
));
562 FOR_EACH_VEC_ELT (eh_region
, fn
->eh
->region_array
, i
, eh
)
563 output_eh_region (ob
, eh
);
565 /* Emit all landing pads. */
566 streamer_write_hwi (ob
, VEC_length (eh_landing_pad
, fn
->eh
->lp_array
));
567 FOR_EACH_VEC_ELT (eh_landing_pad
, fn
->eh
->lp_array
, i
, lp
)
568 output_eh_lp (ob
, lp
);
570 /* Emit all the runtime type data. */
571 streamer_write_hwi (ob
, VEC_length (tree
, fn
->eh
->ttype_data
));
572 FOR_EACH_VEC_ELT (tree
, fn
->eh
->ttype_data
, i
, ttype
)
573 stream_write_tree (ob
, ttype
, true);
575 /* Emit the table of action chains. */
576 if (targetm
.arm_eabi_unwinder
)
579 streamer_write_hwi (ob
, VEC_length (tree
,
580 fn
->eh
->ehspec_data
.arm_eabi
));
581 FOR_EACH_VEC_ELT (tree
, fn
->eh
->ehspec_data
.arm_eabi
, i
, t
)
582 stream_write_tree (ob
, t
, true);
587 streamer_write_hwi (ob
, VEC_length (uchar
,
588 fn
->eh
->ehspec_data
.other
));
589 FOR_EACH_VEC_ELT (uchar
, fn
->eh
->ehspec_data
.other
, i
, c
)
590 streamer_write_char_stream (ob
->main_stream
, c
);
594 /* The LTO_null either terminates the record or indicates that there
595 are no eh_records at all. */
596 streamer_write_record_start (ob
, LTO_null
);
600 /* Output all of the active ssa names to the ssa_names stream. */
603 output_ssa_names (struct output_block
*ob
, struct function
*fn
)
607 len
= VEC_length (tree
, SSANAMES (fn
));
608 streamer_write_uhwi (ob
, len
);
610 for (i
= 1; i
< len
; i
++)
612 tree ptr
= VEC_index (tree
, SSANAMES (fn
), i
);
615 || SSA_NAME_IN_FREE_LIST (ptr
)
616 || !is_gimple_reg (ptr
))
619 streamer_write_uhwi (ob
, i
);
620 streamer_write_char_stream (ob
->main_stream
,
621 SSA_NAME_IS_DEFAULT_DEF (ptr
));
622 stream_write_tree (ob
, SSA_NAME_VAR (ptr
), true);
625 streamer_write_zero (ob
);
629 /* Output the cfg. */
632 output_cfg (struct output_block
*ob
, struct function
*fn
)
634 struct lto_output_stream
*tmp_stream
= ob
->main_stream
;
637 ob
->main_stream
= ob
->cfg_stream
;
639 streamer_write_enum (ob
->main_stream
, profile_status_d
, PROFILE_LAST
,
640 profile_status_for_function (fn
));
642 /* Output the number of the highest basic block. */
643 streamer_write_uhwi (ob
, last_basic_block_for_function (fn
));
645 FOR_ALL_BB_FN (bb
, fn
)
650 streamer_write_hwi (ob
, bb
->index
);
652 /* Output the successors and the edge flags. */
653 streamer_write_uhwi (ob
, EDGE_COUNT (bb
->succs
));
654 FOR_EACH_EDGE (e
, ei
, bb
->succs
)
656 streamer_write_uhwi (ob
, e
->dest
->index
);
657 streamer_write_hwi (ob
, e
->probability
);
658 streamer_write_hwi (ob
, e
->count
);
659 streamer_write_uhwi (ob
, e
->flags
);
663 streamer_write_hwi (ob
, -1);
665 bb
= ENTRY_BLOCK_PTR
;
668 streamer_write_hwi (ob
, bb
->next_bb
->index
);
672 streamer_write_hwi (ob
, -1);
674 ob
->main_stream
= tmp_stream
;
678 /* Create the header in the file using OB. If the section type is for
679 a function, set FN to the decl for that function. */
682 produce_asm (struct output_block
*ob
, tree fn
)
684 enum lto_section_type section_type
= ob
->section_type
;
685 struct lto_function_header header
;
687 struct lto_output_stream
*header_stream
;
689 if (section_type
== LTO_section_function_body
)
691 const char *name
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fn
));
692 section_name
= lto_get_section_name (section_type
, name
, NULL
);
695 section_name
= lto_get_section_name (section_type
, NULL
, NULL
);
697 lto_begin_section (section_name
, !flag_wpa
);
700 /* The entire header is stream computed here. */
701 memset (&header
, 0, sizeof (struct lto_function_header
));
703 /* Write the header. */
704 header
.lto_header
.major_version
= LTO_major_version
;
705 header
.lto_header
.minor_version
= LTO_minor_version
;
706 header
.lto_header
.section_type
= section_type
;
708 header
.compressed_size
= 0;
710 if (section_type
== LTO_section_function_body
)
711 header
.cfg_size
= ob
->cfg_stream
->total_size
;
712 header
.main_size
= ob
->main_stream
->total_size
;
713 header
.string_size
= ob
->string_stream
->total_size
;
715 header_stream
= XCNEW (struct lto_output_stream
);
716 lto_output_data_stream (header_stream
, &header
, sizeof header
);
717 lto_write_stream (header_stream
);
718 free (header_stream
);
720 /* Put all of the gimple and the string table out the asm file as a
722 if (section_type
== LTO_section_function_body
)
723 lto_write_stream (ob
->cfg_stream
);
724 lto_write_stream (ob
->main_stream
);
725 lto_write_stream (ob
->string_stream
);
731 /* Output the base body of struct function FN using output block OB. */
734 output_struct_function_base (struct output_block
*ob
, struct function
*fn
)
740 /* Output the static chain and non-local goto save area. */
741 stream_write_tree (ob
, fn
->static_chain_decl
, true);
742 stream_write_tree (ob
, fn
->nonlocal_goto_save_area
, true);
744 /* Output all the local variables in the function. */
745 streamer_write_hwi (ob
, VEC_length (tree
, fn
->local_decls
));
746 FOR_EACH_VEC_ELT (tree
, fn
->local_decls
, i
, t
)
747 stream_write_tree (ob
, t
, true);
749 /* Output the function start and end loci. */
750 lto_output_location (ob
, fn
->function_start_locus
);
751 lto_output_location (ob
, fn
->function_end_locus
);
753 /* Output current IL state of the function. */
754 streamer_write_uhwi (ob
, fn
->curr_properties
);
756 /* Write all the attributes for FN. */
757 bp
= bitpack_create (ob
->main_stream
);
758 bp_pack_value (&bp
, fn
->is_thunk
, 1);
759 bp_pack_value (&bp
, fn
->has_local_explicit_reg_vars
, 1);
760 bp_pack_value (&bp
, fn
->returns_pcc_struct
, 1);
761 bp_pack_value (&bp
, fn
->returns_struct
, 1);
762 bp_pack_value (&bp
, fn
->can_throw_non_call_exceptions
, 1);
763 bp_pack_value (&bp
, fn
->can_delete_dead_exceptions
, 1);
764 bp_pack_value (&bp
, fn
->always_inline_functions_inlined
, 1);
765 bp_pack_value (&bp
, fn
->after_inlining
, 1);
766 bp_pack_value (&bp
, fn
->stdarg
, 1);
767 bp_pack_value (&bp
, fn
->has_nonlocal_label
, 1);
768 bp_pack_value (&bp
, fn
->calls_alloca
, 1);
769 bp_pack_value (&bp
, fn
->calls_setjmp
, 1);
770 bp_pack_value (&bp
, fn
->va_list_fpr_size
, 8);
771 bp_pack_value (&bp
, fn
->va_list_gpr_size
, 8);
772 streamer_write_bitpack (&bp
);
776 /* Output the body of function NODE->DECL. */
779 output_function (struct cgraph_node
*node
)
784 struct output_block
*ob
;
786 function
= node
->symbol
.decl
;
787 fn
= DECL_STRUCT_FUNCTION (function
);
788 ob
= create_output_block (LTO_section_function_body
);
790 clear_line_info (ob
);
791 ob
->cgraph_node
= node
;
793 gcc_assert (current_function_decl
== NULL_TREE
&& cfun
== NULL
);
795 /* Set current_function_decl and cfun. */
796 current_function_decl
= function
;
799 /* Make string 0 be a NULL string. */
800 streamer_write_char_stream (ob
->string_stream
, 0);
802 streamer_write_record_start (ob
, LTO_function
);
804 output_struct_function_base (ob
, fn
);
806 /* Output the head of the arguments list. */
807 stream_write_tree (ob
, DECL_ARGUMENTS (function
), true);
809 /* Output all the SSA names used in the function. */
810 output_ssa_names (ob
, fn
);
812 /* Output any exception handling regions. */
813 output_eh_regions (ob
, fn
);
815 /* Output DECL_INITIAL for the function, which contains the tree of
817 stream_write_tree (ob
, DECL_INITIAL (function
), true);
819 /* We will renumber the statements. The code that does this uses
820 the same ordering that we use for serializing them so we can use
821 the same code on the other end and not have to write out the
822 statement numbers. We do not assign UIDs to PHIs here because
823 virtual PHIs get re-computed on-the-fly which would make numbers
825 set_gimple_stmt_max_uid (cfun
, 0);
828 gimple_stmt_iterator gsi
;
829 for (gsi
= gsi_start_bb (bb
); !gsi_end_p (gsi
); gsi_next (&gsi
))
831 gimple stmt
= gsi_stmt (gsi
);
832 gimple_set_uid (stmt
, inc_gimple_stmt_max_uid (cfun
));
836 /* Output the code for the function. */
837 FOR_ALL_BB_FN (bb
, fn
)
838 output_bb (ob
, bb
, fn
);
840 /* The terminator for this function. */
841 streamer_write_record_start (ob
, LTO_null
);
845 /* Create a section to hold the pickled output of this function. */
846 produce_asm (ob
, function
);
848 destroy_output_block (ob
);
850 current_function_decl
= NULL
;
855 /* Emit toplevel asms. */
858 lto_output_toplevel_asms (void)
860 struct output_block
*ob
;
861 struct asm_node
*can
;
863 struct lto_output_stream
*header_stream
;
864 struct lto_asm_header header
;
869 ob
= create_output_block (LTO_section_asm
);
871 /* Make string 0 be a NULL string. */
872 streamer_write_char_stream (ob
->string_stream
, 0);
874 for (can
= asm_nodes
; can
; can
= can
->next
)
876 streamer_write_string_cst (ob
, ob
->main_stream
, can
->asm_str
);
877 streamer_write_hwi (ob
, can
->order
);
880 streamer_write_string_cst (ob
, ob
->main_stream
, NULL_TREE
);
882 section_name
= lto_get_section_name (LTO_section_asm
, NULL
, NULL
);
883 lto_begin_section (section_name
, !flag_wpa
);
886 /* The entire header stream is computed here. */
887 memset (&header
, 0, sizeof (header
));
889 /* Write the header. */
890 header
.lto_header
.major_version
= LTO_major_version
;
891 header
.lto_header
.minor_version
= LTO_minor_version
;
892 header
.lto_header
.section_type
= LTO_section_asm
;
894 header
.main_size
= ob
->main_stream
->total_size
;
895 header
.string_size
= ob
->string_stream
->total_size
;
897 header_stream
= XCNEW (struct lto_output_stream
);
898 lto_output_data_stream (header_stream
, &header
, sizeof (header
));
899 lto_write_stream (header_stream
);
900 free (header_stream
);
902 /* Put all of the gimple and the string table out the asm file as a
904 lto_write_stream (ob
->main_stream
);
905 lto_write_stream (ob
->string_stream
);
909 destroy_output_block (ob
);
913 /* Copy the function body of NODE without deserializing. */
916 copy_function (struct cgraph_node
*node
)
918 tree function
= node
->symbol
.decl
;
919 struct lto_file_decl_data
*file_data
= node
->symbol
.lto_file_data
;
920 struct lto_output_stream
*output_stream
= XCNEW (struct lto_output_stream
);
923 const char *name
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function
));
925 lto_get_section_name (LTO_section_function_body
, name
, NULL
);
927 struct lto_in_decl_state
*in_state
;
928 struct lto_out_decl_state
*out_state
= lto_get_out_decl_state ();
930 lto_begin_section (section_name
, !flag_wpa
);
933 /* We may have renamed the declaration, e.g., a static function. */
934 name
= lto_get_decl_name_mapping (file_data
, name
);
936 data
= lto_get_section_data (file_data
, LTO_section_function_body
,
940 /* Do a bit copy of the function body. */
941 lto_output_data_stream (output_stream
, data
, len
);
942 lto_write_stream (output_stream
);
946 lto_get_function_in_decl_state (node
->symbol
.lto_file_data
, function
);
947 gcc_assert (in_state
);
949 for (i
= 0; i
< LTO_N_DECL_STREAMS
; i
++)
951 size_t n
= in_state
->streams
[i
].size
;
952 tree
*trees
= in_state
->streams
[i
].trees
;
953 struct lto_tree_ref_encoder
*encoder
= &(out_state
->streams
[i
]);
955 /* The out state must have the same indices and the in state.
956 So just copy the vector. All the encoders in the in state
957 must be empty where we reach here. */
958 gcc_assert (lto_tree_ref_encoder_size (encoder
) == 0);
959 for (j
= 0; j
< n
; j
++)
960 VEC_safe_push (tree
, heap
, encoder
->trees
, trees
[j
]);
961 encoder
->next_index
= n
;
964 lto_free_section_data (file_data
, LTO_section_function_body
, name
,
966 free (output_stream
);
971 /* Main entry point from the pass manager. */
974 lto_output (cgraph_node_set set
, varpool_node_set vset
)
976 struct cgraph_node
*node
;
977 struct lto_out_decl_state
*decl_state
;
978 #ifdef ENABLE_CHECKING
979 bitmap output
= lto_bitmap_alloc ();
982 lto_cgraph_encoder_t encoder
= lto_get_out_decl_state ()->cgraph_node_encoder
;
984 /* Initialize the streamer. */
985 lto_streamer_init ();
987 n_nodes
= lto_cgraph_encoder_size (encoder
);
988 /* Process only the functions with bodies. */
989 for (i
= 0; i
< n_nodes
; i
++)
991 node
= lto_cgraph_encoder_deref (encoder
, i
);
992 if (lto_cgraph_encoder_encode_body_p (encoder
, node
)
994 && !node
->thunk
.thunk_p
)
996 #ifdef ENABLE_CHECKING
997 gcc_assert (!bitmap_bit_p (output
, DECL_UID (node
->symbol
.decl
)));
998 bitmap_set_bit (output
, DECL_UID (node
->symbol
.decl
));
1000 decl_state
= lto_new_out_decl_state ();
1001 lto_push_out_decl_state (decl_state
);
1002 if (gimple_has_body_p (node
->symbol
.decl
))
1003 output_function (node
);
1005 copy_function (node
);
1006 gcc_assert (lto_get_out_decl_state () == decl_state
);
1007 lto_pop_out_decl_state ();
1008 lto_record_function_out_decl_state (node
->symbol
.decl
, decl_state
);
1012 /* Emit the callgraph after emitting function bodies. This needs to
1013 be done now to make sure that all the statements in every function
1014 have been renumbered so that edges can be associated with call
1015 statements using the statement UIDs. */
1016 output_cgraph (set
, vset
);
1018 #ifdef ENABLE_CHECKING
1019 lto_bitmap_free (output
);
1023 struct ipa_opt_pass_d pass_ipa_lto_gimple_out
=
1027 "lto_gimple_out", /* name */
1028 gate_lto_out
, /* gate */
1032 0, /* static_pass_number */
1033 TV_IPA_LTO_GIMPLE_OUT
, /* tv_id */
1034 0, /* properties_required */
1035 0, /* properties_provided */
1036 0, /* properties_destroyed */
1037 0, /* todo_flags_start */
1038 0 /* todo_flags_finish */
1040 NULL
, /* generate_summary */
1041 lto_output
, /* write_summary */
1042 NULL
, /* read_summary */
1043 lto_output
, /* write_optimization_summary */
1044 NULL
, /* read_optimization_summary */
1045 NULL
, /* stmt_fixup */
1047 NULL
, /* function_transform */
1048 NULL
/* variable_transform */
1052 /* Write each node in encoded by ENCODER to OB, as well as those reachable
1053 from it and required for correct representation of its semantics.
1054 Each node in ENCODER must be a global declaration or a type. A node
1055 is written only once, even if it appears multiple times in the
1056 vector. Certain transitively-reachable nodes, such as those
1057 representing expressions, may be duplicated, but such nodes
1058 must not appear in ENCODER itself. */
1061 write_global_stream (struct output_block
*ob
,
1062 struct lto_tree_ref_encoder
*encoder
)
1066 const size_t size
= lto_tree_ref_encoder_size (encoder
);
1068 for (index
= 0; index
< size
; index
++)
1070 t
= lto_tree_ref_encoder_get_tree (encoder
, index
);
1071 if (!streamer_tree_cache_lookup (ob
->writer_cache
, t
, NULL
))
1072 stream_write_tree (ob
, t
, false);
1077 /* Write a sequence of indices into the globals vector corresponding
1078 to the trees in ENCODER. These are used by the reader to map the
1079 indices used to refer to global entities within function bodies to
1083 write_global_references (struct output_block
*ob
,
1084 struct lto_output_stream
*ref_stream
,
1085 struct lto_tree_ref_encoder
*encoder
)
1089 const uint32_t size
= lto_tree_ref_encoder_size (encoder
);
1091 /* Write size as 32-bit unsigned. */
1092 lto_output_data_stream (ref_stream
, &size
, sizeof (int32_t));
1094 for (index
= 0; index
< size
; index
++)
1098 t
= lto_tree_ref_encoder_get_tree (encoder
, index
);
1099 streamer_tree_cache_lookup (ob
->writer_cache
, t
, &slot_num
);
1100 gcc_assert (slot_num
!= (unsigned)-1);
1101 lto_output_data_stream (ref_stream
, &slot_num
, sizeof slot_num
);
1106 /* Write all the streams in an lto_out_decl_state STATE using
1107 output block OB and output stream OUT_STREAM. */
1110 lto_output_decl_state_streams (struct output_block
*ob
,
1111 struct lto_out_decl_state
*state
)
1115 for (i
= 0; i
< LTO_N_DECL_STREAMS
; i
++)
1116 write_global_stream (ob
, &state
->streams
[i
]);
1120 /* Write all the references in an lto_out_decl_state STATE using
1121 output block OB and output stream OUT_STREAM. */
1124 lto_output_decl_state_refs (struct output_block
*ob
,
1125 struct lto_output_stream
*out_stream
,
1126 struct lto_out_decl_state
*state
)
1132 /* Write reference to FUNCTION_DECL. If there is not function,
1133 write reference to void_type_node. */
1134 decl
= (state
->fn_decl
) ? state
->fn_decl
: void_type_node
;
1135 streamer_tree_cache_lookup (ob
->writer_cache
, decl
, &ref
);
1136 gcc_assert (ref
!= (unsigned)-1);
1137 lto_output_data_stream (out_stream
, &ref
, sizeof (uint32_t));
1139 for (i
= 0; i
< LTO_N_DECL_STREAMS
; i
++)
1140 write_global_references (ob
, out_stream
, &state
->streams
[i
]);
1144 /* Return the written size of STATE. */
1147 lto_out_decl_state_written_size (struct lto_out_decl_state
*state
)
1152 size
= sizeof (int32_t); /* fn_ref. */
1153 for (i
= 0; i
< LTO_N_DECL_STREAMS
; i
++)
1155 size
+= sizeof (int32_t); /* vector size. */
1156 size
+= (lto_tree_ref_encoder_size (&state
->streams
[i
])
1157 * sizeof (int32_t));
1163 /* Write symbol T into STREAM in CACHE. SEEN specifies symbols we wrote
1167 write_symbol (struct streamer_tree_cache_d
*cache
,
1168 struct lto_output_stream
*stream
,
1169 tree t
, struct pointer_set_t
*seen
, bool alias
)
1172 enum gcc_plugin_symbol_kind kind
;
1173 enum gcc_plugin_symbol_visibility visibility
;
1175 unsigned HOST_WIDEST_INT size
;
1179 /* None of the following kinds of symbols are needed in the
1181 if (!TREE_PUBLIC (t
)
1182 || is_builtin_fn (t
)
1183 || DECL_ABSTRACT (t
)
1184 || TREE_CODE (t
) == RESULT_DECL
)
1187 gcc_assert (TREE_CODE (t
) == VAR_DECL
1188 || TREE_CODE (t
) == FUNCTION_DECL
);
1190 name
= IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (t
));
1192 /* This behaves like assemble_name_raw in varasm.c, performing the
1193 same name manipulations that ASM_OUTPUT_LABELREF does. */
1194 name
= IDENTIFIER_POINTER ((*targetm
.asm_out
.mangle_assembler_name
) (name
));
1196 if (pointer_set_contains (seen
, name
))
1198 pointer_set_insert (seen
, name
);
1200 streamer_tree_cache_lookup (cache
, t
, &slot_num
);
1201 gcc_assert (slot_num
!= (unsigned)-1);
1203 if (DECL_EXTERNAL (t
))
1206 kind
= GCCPK_WEAKUNDEF
;
1213 kind
= GCCPK_WEAKDEF
;
1214 else if (DECL_COMMON (t
))
1215 kind
= GCCPK_COMMON
;
1219 /* When something is defined, it should have node attached. */
1220 gcc_assert (alias
|| TREE_CODE (t
) != VAR_DECL
1221 || varpool_get_node (t
)->finalized
);
1222 gcc_assert (alias
|| TREE_CODE (t
) != FUNCTION_DECL
1223 || (cgraph_get_node (t
)
1224 && cgraph_get_node (t
)->analyzed
));
1227 /* Imitate what default_elf_asm_output_external do.
1228 When symbol is external, we need to output it with DEFAULT visibility
1229 when compiling with -fvisibility=default, while with HIDDEN visibility
1230 when symbol has attribute (visibility("hidden")) specified.
1231 targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
1234 if (DECL_EXTERNAL (t
)
1235 && !targetm
.binds_local_p (t
))
1236 visibility
= GCCPV_DEFAULT
;
1238 switch (DECL_VISIBILITY(t
))
1240 case VISIBILITY_DEFAULT
:
1241 visibility
= GCCPV_DEFAULT
;
1243 case VISIBILITY_PROTECTED
:
1244 visibility
= GCCPV_PROTECTED
;
1246 case VISIBILITY_HIDDEN
:
1247 visibility
= GCCPV_HIDDEN
;
1249 case VISIBILITY_INTERNAL
:
1250 visibility
= GCCPV_INTERNAL
;
1254 if (kind
== GCCPK_COMMON
1255 && DECL_SIZE_UNIT (t
)
1256 && TREE_CODE (DECL_SIZE_UNIT (t
)) == INTEGER_CST
)
1257 size
= TREE_INT_CST_LOW (DECL_SIZE_UNIT (t
));
1261 if (DECL_ONE_ONLY (t
))
1262 comdat
= IDENTIFIER_POINTER (DECL_COMDAT_GROUP (t
));
1266 lto_output_data_stream (stream
, name
, strlen (name
) + 1);
1267 lto_output_data_stream (stream
, comdat
, strlen (comdat
) + 1);
1268 c
= (unsigned char) kind
;
1269 lto_output_data_stream (stream
, &c
, 1);
1270 c
= (unsigned char) visibility
;
1271 lto_output_data_stream (stream
, &c
, 1);
1272 lto_output_data_stream (stream
, &size
, 8);
1273 lto_output_data_stream (stream
, &slot_num
, 4);
1277 /* Write an IL symbol table to OB.
1278 SET and VSET are cgraph/varpool node sets we are outputting. */
1281 produce_symtab (struct output_block
*ob
)
1283 struct streamer_tree_cache_d
*cache
= ob
->writer_cache
;
1284 char *section_name
= lto_get_section_name (LTO_section_symtab
, NULL
, NULL
);
1285 struct pointer_set_t
*seen
;
1286 struct cgraph_node
*node
;
1287 struct varpool_node
*vnode
;
1288 struct lto_output_stream stream
;
1289 lto_varpool_encoder_t varpool_encoder
= ob
->decl_state
->varpool_node_encoder
;
1290 lto_cgraph_encoder_t encoder
= ob
->decl_state
->cgraph_node_encoder
;
1293 lto_begin_section (section_name
, false);
1294 free (section_name
);
1296 seen
= pointer_set_create ();
1297 memset (&stream
, 0, sizeof (stream
));
1299 /* Write all functions.
1300 First write all defined functions and then write all used functions.
1301 This is done so only to handle duplicated symbols in cgraph. */
1302 for (i
= 0; i
< lto_cgraph_encoder_size (encoder
); i
++)
1304 node
= lto_cgraph_encoder_deref (encoder
, i
);
1305 if (DECL_EXTERNAL (node
->symbol
.decl
))
1307 if (DECL_COMDAT (node
->symbol
.decl
)
1308 && cgraph_comdat_can_be_unshared_p (node
))
1310 if ((node
->alias
&& !node
->thunk
.alias
) || node
->global
.inlined_to
)
1312 write_symbol (cache
, &stream
, node
->symbol
.decl
, seen
, false);
1314 for (i
= 0; i
< lto_cgraph_encoder_size (encoder
); i
++)
1316 node
= lto_cgraph_encoder_deref (encoder
, i
);
1317 if (!DECL_EXTERNAL (node
->symbol
.decl
))
1319 /* We keep around unused extern inlines in order to be able to inline
1320 them indirectly or via vtables. Do not output them to symbol
1321 table: they end up being undefined and just consume space. */
1322 if (!node
->symbol
.address_taken
&& !node
->callers
)
1324 if (DECL_COMDAT (node
->symbol
.decl
)
1325 && cgraph_comdat_can_be_unshared_p (node
))
1327 if ((node
->alias
&& !node
->thunk
.alias
) || node
->global
.inlined_to
)
1329 write_symbol (cache
, &stream
, node
->symbol
.decl
, seen
, false);
1332 /* Write all variables. */
1333 for (i
= 0; i
< lto_varpool_encoder_size (varpool_encoder
); i
++)
1335 vnode
= lto_varpool_encoder_deref (varpool_encoder
, i
);
1336 if (DECL_EXTERNAL (vnode
->symbol
.decl
))
1338 /* COMDAT virtual tables can be unshared. Do not declare them
1339 in the LTO symbol table to prevent linker from forcing them
1341 if (DECL_COMDAT (vnode
->symbol
.decl
)
1342 && !vnode
->symbol
.force_output
1344 && DECL_VIRTUAL_P (vnode
->symbol
.decl
))
1346 if (vnode
->alias
&& !vnode
->alias_of
)
1348 write_symbol (cache
, &stream
, vnode
->symbol
.decl
, seen
, false);
1350 for (i
= 0; i
< lto_varpool_encoder_size (varpool_encoder
); i
++)
1352 vnode
= lto_varpool_encoder_deref (varpool_encoder
, i
);
1353 if (!DECL_EXTERNAL (vnode
->symbol
.decl
))
1355 if (DECL_COMDAT (vnode
->symbol
.decl
)
1356 && !vnode
->symbol
.force_output
1358 && DECL_VIRTUAL_P (vnode
->symbol
.decl
))
1360 if (vnode
->alias
&& !vnode
->alias_of
)
1362 write_symbol (cache
, &stream
, vnode
->symbol
.decl
, seen
, false);
1365 lto_write_stream (&stream
);
1366 pointer_set_destroy (seen
);
1372 /* This pass is run after all of the functions are serialized and all
1373 of the IPA passes have written their serialized forms. This pass
1374 causes the vector of all of the global decls and types used from
1375 this file to be written in to a section that can then be read in to
1376 recover these on other side. */
1379 produce_asm_for_decls (cgraph_node_set set ATTRIBUTE_UNUSED
,
1380 varpool_node_set vset ATTRIBUTE_UNUSED
)
1382 struct lto_out_decl_state
*out_state
;
1383 struct lto_out_decl_state
*fn_out_state
;
1384 struct lto_decl_header header
;
1386 struct output_block
*ob
;
1387 struct lto_output_stream
*header_stream
, *decl_state_stream
;
1388 unsigned idx
, num_fns
;
1389 size_t decl_state_size
;
1390 int32_t num_decl_states
;
1392 ob
= create_output_block (LTO_section_decls
);
1395 memset (&header
, 0, sizeof (struct lto_decl_header
));
1397 section_name
= lto_get_section_name (LTO_section_decls
, NULL
, NULL
);
1398 lto_begin_section (section_name
, !flag_wpa
);
1399 free (section_name
);
1401 /* Make string 0 be a NULL string. */
1402 streamer_write_char_stream (ob
->string_stream
, 0);
1404 gcc_assert (!alias_pairs
);
1406 /* Write the global symbols. */
1407 out_state
= lto_get_out_decl_state ();
1408 num_fns
= VEC_length (lto_out_decl_state_ptr
, lto_function_decl_states
);
1409 lto_output_decl_state_streams (ob
, out_state
);
1410 for (idx
= 0; idx
< num_fns
; idx
++)
1413 VEC_index (lto_out_decl_state_ptr
, lto_function_decl_states
, idx
);
1414 lto_output_decl_state_streams (ob
, fn_out_state
);
1417 header
.lto_header
.major_version
= LTO_major_version
;
1418 header
.lto_header
.minor_version
= LTO_minor_version
;
1419 header
.lto_header
.section_type
= LTO_section_decls
;
1421 /* Currently not used. This field would allow us to preallocate
1422 the globals vector, so that it need not be resized as it is extended. */
1423 header
.num_nodes
= -1;
1425 /* Compute the total size of all decl out states. */
1426 decl_state_size
= sizeof (int32_t);
1427 decl_state_size
+= lto_out_decl_state_written_size (out_state
);
1428 for (idx
= 0; idx
< num_fns
; idx
++)
1431 VEC_index (lto_out_decl_state_ptr
, lto_function_decl_states
, idx
);
1432 decl_state_size
+= lto_out_decl_state_written_size (fn_out_state
);
1434 header
.decl_state_size
= decl_state_size
;
1436 header
.main_size
= ob
->main_stream
->total_size
;
1437 header
.string_size
= ob
->string_stream
->total_size
;
1439 header_stream
= XCNEW (struct lto_output_stream
);
1440 lto_output_data_stream (header_stream
, &header
, sizeof header
);
1441 lto_write_stream (header_stream
);
1442 free (header_stream
);
1444 /* Write the main out-decl state, followed by out-decl states of
1446 decl_state_stream
= ((struct lto_output_stream
*)
1447 xcalloc (1, sizeof (struct lto_output_stream
)));
1448 num_decl_states
= num_fns
+ 1;
1449 lto_output_data_stream (decl_state_stream
, &num_decl_states
,
1450 sizeof (num_decl_states
));
1451 lto_output_decl_state_refs (ob
, decl_state_stream
, out_state
);
1452 for (idx
= 0; idx
< num_fns
; idx
++)
1455 VEC_index (lto_out_decl_state_ptr
, lto_function_decl_states
, idx
);
1456 lto_output_decl_state_refs (ob
, decl_state_stream
, fn_out_state
);
1458 lto_write_stream (decl_state_stream
);
1459 free(decl_state_stream
);
1461 lto_write_stream (ob
->main_stream
);
1462 lto_write_stream (ob
->string_stream
);
1466 /* Write the symbol table. It is used by linker to determine dependencies
1467 and thus we can skip it for WPA. */
1469 produce_symtab (ob
);
1471 /* Write command line opts. */
1472 lto_write_options ();
1474 /* Deallocate memory and clean up. */
1475 for (idx
= 0; idx
< num_fns
; idx
++)
1478 VEC_index (lto_out_decl_state_ptr
, lto_function_decl_states
, idx
);
1479 lto_delete_out_decl_state (fn_out_state
);
1481 lto_cgraph_encoder_delete (ob
->decl_state
->cgraph_node_encoder
);
1482 lto_varpool_encoder_delete (ob
->decl_state
->varpool_node_encoder
);
1483 VEC_free (lto_out_decl_state_ptr
, heap
, lto_function_decl_states
);
1484 lto_function_decl_states
= NULL
;
1485 destroy_output_block (ob
);
1489 struct ipa_opt_pass_d pass_ipa_lto_finish_out
=
1493 "lto_decls_out", /* name */
1494 gate_lto_out
, /* gate */
1498 0, /* static_pass_number */
1499 TV_IPA_LTO_DECL_OUT
, /* tv_id */
1500 0, /* properties_required */
1501 0, /* properties_provided */
1502 0, /* properties_destroyed */
1503 0, /* todo_flags_start */
1504 0 /* todo_flags_finish */
1506 NULL
, /* generate_summary */
1507 produce_asm_for_decls
, /* write_summary */
1508 NULL
, /* read_summary */
1509 produce_asm_for_decls
, /* write_optimization_summary */
1510 NULL
, /* read_optimization_summary */
1511 NULL
, /* stmt_fixup */
1513 NULL
, /* function_transform */
1514 NULL
/* variable_transform */