GCC Middle and Back End API Reference
lto-streamer-in.c File Reference

Data Structures

struct  freeing_string_slot_hasher

Functions

void lto_tag_check_set ()
void lto_input_data_block ()
static const char * canon_file_name ()
location_t lto_input_location ()
tree lto_input_tree_ref (struct lto_input_block *ib, struct data_in *data_in, struct function *fn, enum LTO_tags tag)
static struct eh_catch_dlto_input_eh_catch_list (struct lto_input_block *ib, struct data_in *data_in, eh_catch *last_p)
static eh_region input_eh_region ()
static eh_landing_pad input_eh_lp ()
static void fixup_eh_region_pointers ()
void lto_init_eh ()
static void input_eh_regions (struct lto_input_block *ib, struct data_in *data_in, struct function *fn)
static basic_block make_new_block ()
static void input_cfg (struct lto_input_block *ib, struct function *fn, int count_materialization_scale)
static void input_ssa_names (struct lto_input_block *ib, struct data_in *data_in, struct function *fn)
static void fixup_call_stmt_edges_1 (struct cgraph_node *node, gimple *stmts, struct function *fn)
static void fixup_call_stmt_edges ()
static void input_struct_function_base (struct function *fn, struct data_in *data_in, struct lto_input_block *ib)
static void input_function (tree fn_decl, struct data_in *data_in, struct lto_input_block *ib, struct lto_input_block *ib_cfg)
static void lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, const char *data, enum lto_section_type section_type)
void lto_input_function_body (struct lto_file_decl_data *file_data, tree fn_decl, const char *data)
static void lto_read_tree_1 ()
static tree lto_read_tree (struct lto_input_block *ib, struct data_in *data_in, enum LTO_tags tag, hashval_t hash)
hashval_t lto_input_scc (struct lto_input_block *ib, struct data_in *data_in, unsigned *len, unsigned *entry_len)
tree lto_input_tree_1 (struct lto_input_block *ib, struct data_in *data_in, enum LTO_tags tag, hashval_t hash)
tree lto_input_tree ()
void lto_input_toplevel_asms ()
void lto_reader_init ()
struct data_inlto_data_in_create (struct lto_file_decl_data *file_data, const char *strings, unsigned len, vec< ld_plugin_symbol_resolution_t > resolutions)
void lto_data_in_delete ()

Variables

static hash_table
< freeing_string_slot_hasher
file_name_hash_table

Function Documentation

static const char* canon_file_name ( )
static
Lookup STRING in file_name_hash_table.  If found, return the existing
   string, otherwise insert STRING as the canonical version.   

References hash_table< Descriptor, Allocator >::find_slot(), len, string_slot::len, memcpy(), string_slot::s, and strlen().

Referenced by lto_input_location().

static void fixup_call_stmt_edges ( )
static
static void fixup_call_stmt_edges_1 ( struct cgraph_node node,
gimple stmts,
struct function fn 
)
static
static void fixup_eh_region_pointers ( )
static
After reading the EH regions, pointers to peer and children regions
   are region numbers.  This converts all these region numbers into
   real pointers into the rematerialized regions for FN.  ROOT_REGION
   is the region number for the root EH region in FN.   

References eh_landing_pad_d::index, eh_region_d::index, eh_region_d::inner, eh_region_d::landing_pads, eh_landing_pad_d::next_lp, eh_region_d::next_peer, eh_region_d::outer, and eh_landing_pad_d::region.

Referenced by input_eh_regions().

static eh_landing_pad input_eh_lp ( )
static
static void input_eh_regions ( struct lto_input_block ib,
struct data_in data_in,
struct function fn 
)
static
static void input_ssa_names ( struct lto_input_block ib,
struct data_in data_in,
struct function fn 
)
static
Read the SSA names array for function FN from DATA_IN using input
   block IB.   

References cfun, gimple_build_nop(), init_ssanames(), make_ssa_name_fn(), set_ssa_default_def(), streamer_read_uchar(), and streamer_read_uhwi().

Referenced by input_function().

static void input_struct_function_base ( struct function fn,
struct data_in data_in,
struct lto_input_block ib 
)
static
Input the base body of struct function FN from DATA_IN
   using input block IB.   

References bp_unpack_value(), len, streamer_read_bitpack(), streamer_read_hwi(), streamer_read_uhwi(), and vec_safe_grow_cleared().

Referenced by input_function().

struct data_in* lto_data_in_create ( struct lto_file_decl_data file_data,
const char *  strings,
unsigned  len,
vec< ld_plugin_symbol_resolution_t resolutions 
)
read
Create a new data_in object for FILE_DATA. STRINGS is the string
   table to use with LEN strings.  RESOLUTIONS is the vector of linker
   resolutions (NULL if not using a linker plugin).   

References data_in::file_data, data_in::globals_resolution, len, data_in::reader_cache, streamer_tree_cache_create(), data_in::strings, and data_in::strings_len.

Referenced by inline_read_section(), input_cgraph_opt_section(), ipa_prop_read_section(), lto_input_toplevel_asms(), lto_read_body(), and read_replacements_section().

void lto_init_eh ( void  )
Initialize EH support.   

References init_eh().

Referenced by input_eh_regions(), and lto_input_ts_function_decl_tree_pointers().

void lto_input_data_block ( )
Read LENGTH bytes from STREAM to ADDR.   

References buffer, and streamer_read_uchar().

static struct eh_catch_d* lto_input_eh_catch_list ( struct lto_input_block ib,
struct data_in data_in,
eh_catch last_p 
)
staticread
Read and return a double-linked list of catch handlers from input
   block IB, using descriptors in DATA_IN.   

References add_type_for_runtime(), eh_catch_d::filter_list, first, eh_catch_d::label, LTO_eh_catch, lto_tag_check_range(), eh_catch_d::prev_catch, streamer_read_record_start(), and eh_catch_d::type_list.

Referenced by input_eh_region().

void lto_input_function_body ( struct lto_file_decl_data file_data,
tree  fn_decl,
const char *  data 
)
Read the body of FN_DECL using DATA.  FILE_DATA holds the global
   decls and types.   

References lto_read_body(), and LTO_section_function_body.

Referenced by cgraph_get_body().

location_t lto_input_location ( )
Read a location bitpack from input block IB.   

References bp_unpack_value(), bp_unpack_var_len_unsigned(), canon_file_name(), current_file, len, line_table, and string_for_index().

Referenced by lto_streamer_hooks_init().

hashval_t lto_input_scc ( struct lto_input_block ib,
struct data_in data_in,
unsigned *  len,
unsigned *  entry_len 
)
tree lto_input_tree ( )
tree lto_input_tree_1 ( struct lto_input_block ib,
struct data_in data_in,
enum LTO_tags  tag,
hashval_t  hash 
)
tree lto_input_tree_ref ( struct lto_input_block ib,
struct data_in data_in,
struct function fn,
enum LTO_tags  tag 
)
Read a reference to a tree node from DATA_IN using input block IB.
   TAG is the expected node that should be found in IB, if TAG belongs
   to one of the indexable trees, expect to read a reference index to
   be looked up in one of the symbol tables, otherwise read the pysical
   representation of the tree using stream_read_tree.  FN is the
   function scope for the read tree.   

References data_in::file_data, HOST_WIDE_INT, LTO_const_decl_ref, LTO_field_decl_ref, LTO_function_decl_ref, LTO_global_decl_ref, LTO_imported_decl_ref, LTO_label_decl_ref, LTO_namespace_decl_ref, LTO_result_decl_ref, LTO_ssa_name_ref, lto_tag_check_range(), LTO_translation_unit_decl_ref, LTO_type_decl_ref, LTO_type_ref, and streamer_read_uhwi().

Referenced by lto_input_tree_1().

static void lto_read_body ( struct lto_file_decl_data file_data,
tree  fn_decl,
const char *  data,
enum lto_section_type  section_type 
)
static
Read the body from DATA for function FN_DECL and fill it in.
   FILE_DATA are the global decls and types.  SECTION_TYPE is either
   LTO_section_function_body or LTO_section_static_initializer.  If
   section type is LTO_section_function_body, FN must be the decl for
   that function.   

References cache, lto_function_header::cfg_size, cgraph_get_node(), lto_file_decl_data::current_decl_state, lto_file_decl_data::global_decl_state, input_function(), len, lto_check_version(), lto_data_in_create(), lto_data_in_delete(), lto_get_function_in_decl_state(), LTO_section_function_body, streamer_tree_cache_d::nodes, pop_cfun(), data_in::reader_cache, streamer_tree_cache_get_tree(), and vNULL.

Referenced by lto_input_function_body().

static tree lto_read_tree ( struct lto_input_block ib,
struct data_in data_in,
enum LTO_tags  tag,
hashval_t  hash 
)
static
Read the physical representation of a tree node with tag TAG from
   input block IB using the per-file context in DATA_IN.   

References lto_read_tree_1(), data_in::reader_cache, streamer_alloc_tree(), streamer_read_uchar(), and streamer_tree_cache_append().

Referenced by lto_input_tree_1().

static void lto_read_tree_1 ( )
static
Read the physical representation of a tree node EXPR from
   input block IB using the per-file context in DATA_IN.   

References lto_orig_address_remove(), streamer_handle_as_builtin_p(), streamer_read_tree_bitfields(), and streamer_read_tree_body().

Referenced by lto_input_scc(), and lto_read_tree().

void lto_reader_init ( void  )
Initialization for the LTO reader.   

References hash_table< Descriptor, Allocator >::create(), and lto_streamer_init().

void lto_tag_check_set ( )
Check that tag ACTUAL has one of the given values.  NUM_TAGS is the
   number of valid tag values to check.   

References internal_error(), and lto_tag_name().

Referenced by input_bb().

static basic_block make_new_block ( )
static
Make a new basic block with index INDEX in function FN.   

References alloc_block(), and basic_block_def::index.

Referenced by input_cfg().


Variable Documentation

hash_table<freeing_string_slot_hasher> file_name_hash_table
static
The table to hold the file names.