GCC Middle and Back End API Reference
tree-streamer-in.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 "stringpool.h"
#include "tree-streamer.h"
#include "cgraph.h"
#include "builtins.h"
#include "gomp-constants.h"
#include "attribs.h"
#include "asan.h"
#include "opts.h"
Include dependency graph for tree-streamer-in.cc:

Functions

tree streamer_read_string_cst (class data_in *data_in, class lto_input_block *ib)
 
static tree input_identifier (class data_in *data_in, class lto_input_block *ib)
 
static tree streamer_read_chain (class lto_input_block *ib, class data_in *data_in)
 
static void unpack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_int_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_real_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_fixed_cst_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_decl_wrtl_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_decl_with_vis_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
 
static void unpack_ts_block_value_fields (class data_in *data_in, struct bitpack_d *bp, tree expr)
 
static void unpack_ts_translation_unit_decl_value_fields (class data_in *data_in, struct bitpack_d *bp, tree expr)
 
static void unpack_ts_omp_clause_value_fields (class data_in *data_in, struct bitpack_d *bp, tree expr)
 
void streamer_read_tree_bitfields (class lto_input_block *ib, class data_in *data_in, tree expr)
 
tree streamer_alloc_tree (class lto_input_block *ib, class data_in *data_in, enum LTO_tags tag)
 
static void lto_input_ts_common_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_vector_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_poly_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_complex_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_decl_minimal_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_decl_common_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_decl_non_common_tree_pointers (class lto_input_block *, class data_in *, tree)
 
static void lto_input_ts_decl_with_vis_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_field_decl_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_function_decl_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_type_common_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_type_non_common_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_list_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_vec_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_exp_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_block_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_binfo_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_constructor_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
static void lto_input_ts_omp_clause_tree_pointers (class lto_input_block *ib, class data_in *data_in, tree expr)
 
void streamer_read_tree_body (class lto_input_block *ib, class data_in *data_in, tree expr)
 
tree streamer_get_pickled_tree (class lto_input_block *ib, class data_in *data_in)
 

Function Documentation

◆ input_identifier()

static tree input_identifier ( class data_in * data_in,
class lto_input_block * ib )
static
Read an IDENTIFIER from the string table in DATA_IN using input
block IB.   

References get_identifier_with_length(), ggc_alloc(), NULL, and streamer_read_indexed_string().

Referenced by streamer_alloc_tree().

◆ lto_input_ts_binfo_tree_pointers()

static void lto_input_ts_binfo_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_BINFO structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References BINFO_BASE_BINFOS, BINFO_OFFSET, BINFO_VTABLE, ggc_alloc(), and stream_read_tree_ref().

Referenced by streamer_read_tree_body().

◆ lto_input_ts_block_tree_pointers()

static void lto_input_ts_block_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_BLOCK structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References BLOCK_ABSTRACT_ORIGIN, BLOCK_CHAIN, BLOCK_ORIGIN, BLOCK_SUBBLOCKS, BLOCK_SUPERCONTEXT, BLOCK_VARS, DECL_INITIAL, DECL_ORIGIN, DECL_P, expr, ggc_alloc(), stream_read_tree_ref(), streamer_read_chain(), and TREE_CODE.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_common_tree_pointers()

static void lto_input_ts_common_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_COMMON structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), stream_read_tree_ref(), TREE_CODE, and TREE_TYPE.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_complex_tree_pointers()

static void lto_input_ts_complex_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_COMPLEX structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), stream_read_tree_ref(), TREE_IMAGPART, and TREE_REALPART.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_constructor_tree_pointers()

static void lto_input_ts_constructor_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_CONSTRUCTOR structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References CONSTRUCTOR_ELTS, CONSTRUCTOR_NELTS, ggc_alloc(), i, constructor_elt::index, stream_read_tree_ref(), and constructor_elt::value.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_decl_common_tree_pointers()

static void lto_input_ts_decl_common_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_DECL_COMMON structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References DECL_ABSTRACT_ORIGIN, DECL_ATTRIBUTES, DECL_HAS_DEBUG_EXPR_P, DECL_HAS_VALUE_EXPR_P, DECL_SIZE, DECL_SIZE_UNIT, ggc_alloc(), SET_DECL_DEBUG_EXPR, SET_DECL_VALUE_EXPR, stream_read_tree_ref(), TREE_CODE, and VAR_P.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_decl_minimal_tree_pointers()

static void lto_input_ts_decl_minimal_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_DECL_MINIMAL structure of EXPR
from input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References DECL_CONTEXT, DECL_NAME, ggc_alloc(), and stream_read_tree_ref().

Referenced by streamer_read_tree_body().

◆ lto_input_ts_decl_non_common_tree_pointers()

static void lto_input_ts_decl_non_common_tree_pointers ( class lto_input_block * ,
class data_in * ,
tree  )
static
Read all pointer fields in the TS_DECL_NON_COMMON structure of
EXPR from input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

Referenced by streamer_read_tree_body().

◆ lto_input_ts_decl_with_vis_tree_pointers()

static void lto_input_ts_decl_with_vis_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_DECL_WITH_VIS structure of EXPR
from input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References gcc_assert, ggc_alloc(), SET_DECL_ASSEMBLER_NAME, stream_read_tree_ref(), and TREE_CODE.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_exp_tree_pointers()

static void lto_input_ts_exp_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_EXP structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References lto_location_cache::apply_location_cache(), ggc_alloc(), i, data_in::location_cache, stream_read_tree_ref(), TREE_OPERAND, TREE_OPERAND_LENGTH, and TREE_SET_BLOCK.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_field_decl_tree_pointers()

static void lto_input_ts_field_decl_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_FIELD_DECL structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References DECL_BIT_FIELD_REPRESENTATIVE, DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, ggc_alloc(), and stream_read_tree_ref().

Referenced by streamer_read_tree_body().

◆ lto_input_ts_function_decl_tree_pointers()

static void lto_input_ts_function_decl_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_FUNCTION_DECL structure of EXPR
from input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References build_optimization_node(), DECL_FUNCTION_PERSONALITY, DECL_FUNCTION_SPECIFIC_OPTIMIZATION, DECL_FUNCTION_SPECIFIC_TARGET, finish_options(), ggc_alloc(), init_options_struct(), NULL, stream_read_tree_ref(), TREE_OPTIMIZATION, and UNKNOWN_LOCATION.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_list_tree_pointers()

static void lto_input_ts_list_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_LIST structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), stream_read_tree_ref(), TREE_CHAIN, TREE_PURPOSE, and TREE_VALUE.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_omp_clause_tree_pointers()

static void lto_input_ts_omp_clause_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_OMP_CLAUSE structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), i, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, omp_clause_num_ops, OMP_CLAUSE_OPERAND, and stream_read_tree_ref().

Referenced by streamer_read_tree_body().

◆ lto_input_ts_poly_tree_pointers()

static void lto_input_ts_poly_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_POLY_INT_CST structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), i, NUM_POLY_INT_COEFFS, POLY_INT_CST_COEFF, and stream_read_tree_ref().

Referenced by streamer_read_tree_body().

◆ lto_input_ts_type_common_tree_pointers()

static void lto_input_ts_type_common_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_TYPE_COMMON structure of EXPR from
input block IB.  DATA_IN contains tables and descriptors for the file
being read.   

References ggc_alloc(), NULL_TREE, stream_read_tree_ref(), TYPE_ATTRIBUTES, TYPE_CANONICAL, TYPE_CONTEXT, TYPE_MAIN_VARIANT, TYPE_NAME, TYPE_SIZE, and TYPE_SIZE_UNIT.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_type_non_common_tree_pointers()

static void lto_input_ts_type_non_common_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_TYPE_NON_COMMON structure of EXPR
from input block IB.  DATA_IN contains tables and descriptors for the
file being read.   

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

Referenced by streamer_read_tree_body().

◆ lto_input_ts_vec_tree_pointers()

static void lto_input_ts_vec_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_VEC structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References ggc_alloc(), i, stream_read_tree_ref(), TREE_VEC_ELT, and TREE_VEC_LENGTH.

Referenced by streamer_read_tree_body().

◆ lto_input_ts_vector_tree_pointers()

static void lto_input_ts_vector_tree_pointers ( class lto_input_block * ib,
class data_in * data_in,
tree expr )
static
Read all pointer fields in the TS_VECTOR structure of EXPR from input
block IB.  DATA_IN contains tables and descriptors for the
file being read.   

References count, ggc_alloc(), i, stream_read_tree_ref(), VECTOR_CST_ENCODED_ELT, and vector_cst_encoded_nelts().

Referenced by streamer_read_tree_body().

◆ streamer_alloc_tree()

tree streamer_alloc_tree ( class lto_input_block * ib,
class data_in * data_in,
enum LTO_tags tag )
Materialize a new tree from input block IB using descriptors in
DATA_IN.  The code for the new tree should match TAG.  Store in
*IX_P the index into the reader cache where the new tree is stored.   

References bp_unpack_value(), build_omp_clause(), build_vl_exp(), CODE_CONTAINS_STRUCT, gcc_assert, ggc_alloc(), input_identifier(), lto_tag_to_tree_code(), make_int_cst(), make_node(), make_tree_binfo(), make_tree_vec(), make_vector(), NULL_TREE, streamer_read_bitpack(), streamer_read_hwi(), streamer_read_string_cst(), streamer_read_uhwi(), and UNKNOWN_LOCATION.

Referenced by lto_input_scc(), and lto_read_tree().

◆ streamer_get_pickled_tree()

tree streamer_get_pickled_tree ( class lto_input_block * ib,
class data_in * data_in )
Read an index IX from input block IB and return the tree node at
DATA_IN->FILE_DATA->GLOBALS_INDEX[IX].   

References gcc_assert, ggc_alloc(), LTO_NUM_TAGS, lto_tag_to_tree_code(), data_in::reader_cache, streamer_debugging, streamer_read_enum, streamer_read_uhwi(), streamer_tree_cache_get_tree(), and TREE_CODE.

Referenced by lto_input_tree_1().

◆ streamer_read_chain()

static tree streamer_read_chain ( class lto_input_block * ib,
class data_in * data_in )
static
Read a chain of tree nodes from input block IB.  DATA_IN contains
tables and descriptors for the file being read.   

References ggc_alloc(), NULL_TREE, stream_read_tree_ref(), and TREE_CHAIN.

Referenced by lto_input_ts_block_tree_pointers(), and lto_input_ts_type_non_common_tree_pointers().

◆ streamer_read_string_cst()

tree streamer_read_string_cst ( class data_in * data_in,
class lto_input_block * ib )
Routines for reading trees from 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/>.   
Read a STRING_CST from the string table in DATA_IN using input
block IB.   

References build_string(), ggc_alloc(), NULL, and streamer_read_indexed_string().

Referenced by input_gimple_stmt(), lto_input_toplevel_asms(), and streamer_alloc_tree().

◆ streamer_read_tree_bitfields()

◆ streamer_read_tree_body()

◆ unpack_ts_base_value_fields()

◆ unpack_ts_block_value_fields()

static void unpack_ts_block_value_fields ( class data_in * data_in,
struct bitpack_d * bp,
tree expr )
static
Unpack all the non-pointer fields of the TS_BLOCK structure
of expression EXPR from bitpack BP.   

References BLOCK_SOURCE_LOCATION, ggc_alloc(), and stream_input_location.

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_decl_common_value_fields()

◆ unpack_ts_decl_with_vis_value_fields()

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

◆ unpack_ts_decl_wrtl_value_fields()

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

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

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_fixed_cst_value_fields()

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

References bp_unpack_machine_mode(), bp_unpack_var_len_int(), FIXED_VALUE_TYPE, ggc_alloc(), and TREE_FIXED_CST_PTR.

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_function_decl_value_fields()

◆ unpack_ts_int_cst_value_fields()

static void unpack_ts_int_cst_value_fields ( struct bitpack_d * bp,
tree expr )
static
Unpack all the non-pointer fields of the TS_INT_CST structure of
expression EXPR from bitpack BP.   

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

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_omp_clause_value_fields()

◆ unpack_ts_real_cst_value_fields()

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

References bp_unpack_real_value(), ggc_alloc(), r, REAL_VALUE_TYPE, and TREE_REAL_CST_PTR.

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_translation_unit_decl_value_fields()

static void unpack_ts_translation_unit_decl_value_fields ( class data_in * data_in,
struct bitpack_d * bp,
tree expr )
static
Unpack all the non-pointer fields of the TS_TRANSLATION_UNIT_DECL
structure of expression EXPR from bitpack BP.   

References all_translation_units, bp_unpack_string(), ggc_alloc(), TRANSLATION_UNIT_LANGUAGE, and vec_safe_push().

Referenced by streamer_read_tree_bitfields().

◆ unpack_ts_type_common_value_fields()