GCC Middle and Back End API Reference
tree-streamer-out.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "tree.h"
#include "gimple.h"
#include "tree-streamer.h"
#include "cgraph.h"
#include "alias.h"
#include "stor-layout.h"
#include "gomp-constants.h"
#include "print-tree.h"
Include dependency graph for tree-streamer-out.cc:

Functions

void streamer_write_string_cst (struct output_block *ob, struct lto_output_stream *index_stream, tree string)
 
static void write_identifier (struct output_block *ob, struct lto_output_stream *index_stream, tree id)
 
static void pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_int_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_real_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_fixed_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_decl_wrtl_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_decl_with_vis_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
 
static void pack_ts_block_value_fields (struct output_block *ob, struct bitpack_d *bp, tree expr)
 
static void pack_ts_translation_unit_decl_value_fields (struct output_block *ob, struct bitpack_d *bp, tree expr)
 
static void pack_ts_omp_clause_value_fields (struct output_block *ob, struct bitpack_d *bp, tree expr)
 
void streamer_write_tree_bitfields (struct output_block *ob, tree expr)
 
static void streamer_write_chain (struct output_block *ob, tree t)
 
static void write_ts_common_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_vector_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_poly_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_complex_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_decl_minimal_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_decl_common_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_decl_non_common_tree_pointers (struct output_block *, tree)
 
static void write_ts_decl_with_vis_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_field_decl_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_function_decl_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_type_common_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_type_non_common_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_list_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_vec_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_exp_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_block_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_binfo_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_constructor_tree_pointers (struct output_block *ob, tree expr)
 
static void write_ts_omp_clause_tree_pointers (struct output_block *ob, tree expr)
 
void streamer_write_tree_body (struct output_block *ob, tree expr)
 
void streamer_write_tree_header (struct output_block *ob, tree expr)
 
void streamer_write_integer_cst (struct output_block *ob, tree cst)
 

Function Documentation

◆ pack_ts_base_value_fields()

◆ pack_ts_block_value_fields()

static void pack_ts_block_value_fields ( struct output_block * ob,
struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_BLOCK structure
of expression EXPR into bitpack BP.   

References BLOCK_SOURCE_LOCATION, ggc_alloc(), inlined_function_outer_scope_p(), stream_output_location, and UNKNOWN_LOCATION.

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_decl_common_value_fields()

◆ pack_ts_decl_with_vis_value_fields()

static void pack_ts_decl_with_vis_value_fields ( struct bitpack_d * bp,
tree expr )
static

◆ pack_ts_decl_wrtl_value_fields()

static void pack_ts_decl_wrtl_value_fields ( struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_DECL_WRTL structure
of expression EXPR into bitpack BP.   

References bp_pack_value(), DECL_REGISTER, and ggc_alloc().

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_fixed_cst_value_fields()

static void pack_ts_fixed_cst_value_fields ( struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_FIXED_CST structure of
expression EXPR into bitpack BP.   

References bp_pack_machine_mode(), bp_pack_var_len_int(), fixed_value::data, ggc_alloc(), double_int::high, double_int::low, fixed_value::mode, and TREE_FIXED_CST.

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_function_decl_value_fields()

◆ pack_ts_int_cst_value_fields()

static void pack_ts_int_cst_value_fields ( struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_INTEGER_CST structure of
expression EXPR into bitpack BP.   

References bp_pack_var_len_int(), ggc_alloc(), i, TREE_INT_CST_ELT, and TREE_INT_CST_EXT_NUNITS.

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_omp_clause_value_fields()

◆ pack_ts_real_cst_value_fields()

static void pack_ts_real_cst_value_fields ( struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_REAL_CST structure of
expression EXPR into bitpack BP.   

References bp_pack_real_value(), ggc_alloc(), r, REAL_VALUE_TYPE, and TREE_REAL_CST.

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_translation_unit_decl_value_fields()

static void pack_ts_translation_unit_decl_value_fields ( struct output_block * ob,
struct bitpack_d * bp,
tree expr )
static
Pack all the non-pointer fields of the TS_TRANSLATION_UNIT_DECL structure
of expression EXPR into bitpack BP.   

References bp_pack_string(), ggc_alloc(), and TRANSLATION_UNIT_LANGUAGE.

Referenced by streamer_write_tree_bitfields().

◆ pack_ts_type_common_value_fields()

◆ streamer_write_chain()

static void streamer_write_chain ( struct output_block * ob,
tree t )
static
Emit the chain of tree nodes starting at T.  OB is the output block
to write to.  REF_P is true if chain elements should be emitted
as references.   

References DECL_EXTERNAL, gcc_assert, NULL_TREE, stream_write_tree_ref(), TREE_CHAIN, and VAR_OR_FUNCTION_DECL_P.

Referenced by write_ts_block_tree_pointers(), and write_ts_type_non_common_tree_pointers().

◆ streamer_write_integer_cst()

void streamer_write_integer_cst ( struct output_block * ob,
tree cst )
Emit the integer constant CST to output block OB.  If REF_P is true,
CST's type will be emitted as a reference.   

References gcc_assert, ggc_alloc(), i, LTO_integer_cst, print_node_brief(), stream_write_tree_ref(), streamer_dump_file, streamer_write_hwi(), streamer_write_record_start(), streamer_write_uhwi(), TREE_INT_CST_ELT, TREE_INT_CST_NUNITS, TREE_OVERFLOW, and TREE_TYPE.

Referenced by lto_output_tree_1().

◆ streamer_write_string_cst()

void streamer_write_string_cst ( struct output_block * ob,
struct lto_output_stream * index_stream,
tree string )
Routines for emitting trees to a file stream.

   Copyright (C) 2011-2024 Free Software Foundation, Inc.
   Contributed by Diego Novillo <dnovillo@google.com>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Output the STRING constant to the string
table in OB.  Then put the index onto the INDEX_STREAM.   

References ggc_alloc(), NULL, streamer_write_string_with_length(), TREE_STRING_LENGTH, and TREE_STRING_POINTER.

Referenced by lto_output_toplevel_asms(), and streamer_write_tree_header().

◆ streamer_write_tree_bitfields()

◆ streamer_write_tree_body()

◆ streamer_write_tree_header()

◆ write_identifier()

static void write_identifier ( struct output_block * ob,
struct lto_output_stream * index_stream,
tree id )
static
Output the identifier ID to the string
table in OB.  Then put the index onto the INDEX_STREAM.   

References ggc_alloc(), IDENTIFIER_LENGTH, IDENTIFIER_POINTER, and streamer_write_string_with_length().

Referenced by streamer_write_tree_header().

◆ write_ts_binfo_tree_pointers()

static void write_ts_binfo_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_BINFO structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References BINFO_BASE_BINFOS, BINFO_OFFSET, BINFO_VTABLE, FOR_EACH_VEC_ELT, i, NULL_TREE, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_block_tree_pointers()

static void write_ts_block_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_BLOCK structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References BLOCK_ABSTRACT_ORIGIN, BLOCK_SUPERCONTEXT, BLOCK_VARS, stream_write_tree_ref(), and streamer_write_chain().

Referenced by streamer_write_tree_body().

◆ write_ts_common_tree_pointers()

static void write_ts_common_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_COMMON structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References stream_write_tree_ref(), TREE_CODE, and TREE_TYPE.

Referenced by streamer_write_tree_body().

◆ write_ts_complex_tree_pointers()

static void write_ts_complex_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_COMPLEX structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References stream_write_tree_ref(), TREE_IMAGPART, and TREE_REALPART.

Referenced by streamer_write_tree_body().

◆ write_ts_constructor_tree_pointers()

static void write_ts_constructor_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_CONSTRUCTOR structure of EXPR to
output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References CONSTRUCTOR_ELTS, FOR_EACH_CONSTRUCTOR_ELT, i, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_decl_common_tree_pointers()

static void write_ts_decl_common_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_DECL_COMMON structure of EXPR to
output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References DECL_ABSTRACT_ORIGIN, DECL_ATTRIBUTES, DECL_DEBUG_EXPR, DECL_HAS_DEBUG_EXPR_P, DECL_HAS_VALUE_EXPR_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_VALUE_EXPR, DINFO_LEVEL_NONE, ggc_alloc(), NULL_TREE, stream_write_tree_ref(), TREE_CODE, and VAR_P.

Referenced by streamer_write_tree_body().

◆ write_ts_decl_minimal_tree_pointers()

static void write_ts_decl_minimal_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_DECL_MINIMAL structure of EXPR
to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References all_translation_units, DECL_CONTEXT, DECL_NAME, ggc_alloc(), IDENTIFIER_ANON_P, NULL_TREE, stream_write_tree_ref(), and TREE_CODE.

Referenced by streamer_write_tree_body().

◆ write_ts_decl_non_common_tree_pointers()

static void write_ts_decl_non_common_tree_pointers ( struct output_block * ,
tree  )
static
Write all pointer fields in the TS_DECL_NON_COMMON structure of
EXPR to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

Referenced by streamer_write_tree_body().

◆ write_ts_decl_with_vis_tree_pointers()

static void write_ts_decl_with_vis_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_DECL_WITH_VIS structure of EXPR
to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, NULL_TREE, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_exp_tree_pointers()

static void write_ts_exp_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_EXP structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References i, stream_write_tree_ref(), TREE_BLOCK, TREE_OPERAND, and TREE_OPERAND_LENGTH.

Referenced by streamer_write_tree_body().

◆ write_ts_field_decl_tree_pointers()

static void write_ts_field_decl_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_FIELD_DECL structure of EXPR to
output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References DECL_BIT_FIELD_REPRESENTATIVE, DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_function_decl_tree_pointers()

static void write_ts_function_decl_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_FUNCTION_DECL structure of EXPR
to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References DECL_FUNCTION_PERSONALITY, DECL_FUNCTION_SPECIFIC_OPTIMIZATION, DECL_FUNCTION_SPECIFIC_TARGET, lto_stream_offload_p, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_list_tree_pointers()

static void write_ts_list_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_LIST structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References stream_write_tree_ref(), TREE_CHAIN, TREE_PURPOSE, and TREE_VALUE.

Referenced by streamer_write_tree_body().

◆ write_ts_omp_clause_tree_pointers()

static void write_ts_omp_clause_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_OMP_CLAUSE structure of EXPR
to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References gcc_assert, i, NULL, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_IN_REDUCTION, omp_clause_num_ops, OMP_CLAUSE_OPERAND, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_REDUCTION_GIMPLE_INIT, OMP_CLAUSE_REDUCTION_GIMPLE_MERGE, OMP_CLAUSE_TASK_REDUCTION, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_poly_tree_pointers()

static void write_ts_poly_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_POLY_INT_CST structure of EXPR to
output block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References i, NUM_POLY_INT_COEFFS, POLY_INT_CST_COEFF, and stream_write_tree_ref().

Referenced by streamer_write_tree_body().

◆ write_ts_type_common_tree_pointers()

static void write_ts_type_common_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_TYPE_COMMON structure of EXPR to
output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References stream_write_tree_ref(), TYPE_ATTRIBUTES, TYPE_CONTEXT, TYPE_MAIN_VARIANT, TYPE_NAME, TYPE_SIZE, and TYPE_SIZE_UNIT.

Referenced by streamer_write_tree_body().

◆ write_ts_type_non_common_tree_pointers()

static void write_ts_type_non_common_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_TYPE_NON_COMMON structure of EXPR
to output block OB.  If REF_P is true, write a reference to EXPR's
pointer fields.   

References FUNC_OR_METHOD_TYPE_P, ggc_alloc(), POINTER_TYPE_P, RECORD_OR_UNION_TYPE_P, stream_write_tree_ref(), streamer_write_chain(), TREE_CODE, TYPE_ARG_TYPES, TYPE_DOMAIN, TYPE_FIELDS, TYPE_MAX_VALUE_RAW, and TYPE_MIN_VALUE_RAW.

Referenced by streamer_write_tree_body().

◆ write_ts_vec_tree_pointers()

static void write_ts_vec_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_VEC structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References i, stream_write_tree_ref(), TREE_VEC_ELT, and TREE_VEC_LENGTH.

Referenced by streamer_write_tree_body().

◆ write_ts_vector_tree_pointers()

static void write_ts_vector_tree_pointers ( struct output_block * ob,
tree expr )
static
Write all pointer fields in the TS_VECTOR structure of EXPR to output
block OB.  If REF_P is true, write a reference to EXPR's pointer
fields.   

References count, i, stream_write_tree_ref(), VECTOR_CST_ENCODED_ELT, and vector_cst_encoded_nelts().

Referenced by streamer_write_tree_body().