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

Go to the source code of this file.

Data Structures

struct  lto_input_block
struct  lto_header
struct  lto_function_header
struct  lto_decl_header
struct  lto_asm_header
struct  lto_stats_d
struct  lto_encoder_entry
struct  lto_symtab_encoder_d
struct  lto_symtab_encoder_iterator
struct  lto_tree_ref_table
struct  lto_tree_ref_encoder
struct  lto_in_decl_state
struct  lto_out_decl_state
struct  res_pair
struct  lto_file_decl_data
struct  lto_char_ptr_base
struct  lto_output_stream
struct  lto_simple_header
struct  lto_simple_output_block
struct  string_slot
struct  string_slot_hasher
struct  output_block
struct  data_in

Typedefs

typedef unsigned char lto_decl_flags_t
typedef enum
ld_plugin_symbol_resolution 
ld_plugin_symbol_resolution_t
typedef const char *( lto_get_section_data_f )(struct lto_file_decl_data *, enum lto_section_type, const char *, size_t *)
typedef void( lto_free_section_data_f )(struct lto_file_decl_data *, enum lto_section_type, const char *, const char *, size_t)
typedef struct
lto_symtab_encoder_d
lto_symtab_encoder_t
typedef struct lto_in_decl_statelto_in_decl_state_ptr
typedef struct lto_out_decl_statelto_out_decl_state_ptr
typedef struct res_pair res_pair
typedef struct lto_file_decl_datalto_file_decl_data_ptr

Enumerations

enum  LTO_tags {
  LTO_null = 0, LTO_tree_pickle_reference, LTO_bb0 = 1 + MAX_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE, LTO_bb1,
  LTO_eh_region, LTO_builtin_decl, LTO_integer_cst, LTO_function,
  LTO_eh_table, LTO_ert_cleanup, LTO_ert_try, LTO_ert_allowed_exceptions,
  LTO_ert_must_not_throw, LTO_eh_landing_pad, LTO_eh_catch, LTO_tree_scc,
  LTO_field_decl_ref, LTO_function_decl_ref, LTO_label_decl_ref, LTO_namespace_decl_ref,
  LTO_result_decl_ref, LTO_ssa_name_ref, LTO_type_decl_ref, LTO_type_ref,
  LTO_const_decl_ref, LTO_imported_decl_ref, LTO_translation_unit_decl_ref, LTO_global_decl_ref,
  LTO_NUM_TAGS
}
enum  lto_section_type {
  LTO_section_decls = 0, LTO_section_function_body, LTO_section_static_initializer, LTO_section_symtab,
  LTO_section_refs, LTO_section_asm, LTO_section_jump_functions, LTO_section_ipa_pure_const,
  LTO_section_ipa_reference, LTO_section_ipa_profile, LTO_section_symtab_nodes, LTO_section_opts,
  LTO_section_cgraph_opt_sum, LTO_section_inline_summary, LTO_section_ipcp_transform, LTO_N_SECTION_TYPES
}
enum  lto_decl_stream_e_t {
  LTO_DECL_STREAM_TYPE = 0, LTO_DECL_STREAM_FIELD_DECL, LTO_DECL_STREAM_FN_DECL, LTO_DECL_STREAM_VAR_DECL,
  LTO_DECL_STREAM_TYPE_DECL, LTO_DECL_STREAM_NAMESPACE_DECL, LTO_DECL_STREAM_LABEL_DECL, LTO_N_DECL_STREAMS
}

Functions

struct lto_input_blocklto_create_simple_input_block (struct lto_file_decl_data *, enum lto_section_type, const char **, size_t *)
void lto_destroy_simple_input_block (struct lto_file_decl_data *, enum lto_section_type, struct lto_input_block *, const char *, size_t)
void lto_set_in_hooks (struct lto_file_decl_data **, lto_get_section_data_f *, lto_free_section_data_f *)
struct lto_file_decl_data ** lto_get_file_decl_data (void)
const char * lto_get_section_data (struct lto_file_decl_data *, enum lto_section_type, const char *, size_t *)
void lto_free_section_data (struct lto_file_decl_data *, enum lto_section_type, const char *, const char *, size_t)
htab_t lto_create_renaming_table (void)
void lto_record_renamed_decl (struct lto_file_decl_data *, const char *, const char *)
const char * lto_get_decl_name_mapping (struct lto_file_decl_data *, const char *)
struct lto_in_decl_statelto_new_in_decl_state (void)
void lto_delete_in_decl_state (struct lto_in_decl_state *)
hashval_t lto_hash_in_decl_state (const void *)
int lto_eq_in_decl_state (const void *, const void *)
struct lto_in_decl_statelto_get_function_in_decl_state (struct lto_file_decl_data *, tree)
void lto_section_overrun (struct lto_input_block *) ATTRIBUTE_NORETURN
void lto_value_range_error (const char *, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT) ATTRIBUTE_NORETURN
void lto_begin_section (const char *, bool)
void lto_end_section (void)
void lto_write_stream (struct lto_output_stream *)
void lto_output_data_stream (struct lto_output_stream *, const void *, size_t)
bool lto_output_decl_index (struct lto_output_stream *, struct lto_tree_ref_encoder *, tree, unsigned int *)
void lto_output_field_decl_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
void lto_output_fn_decl_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
void lto_output_namespace_decl_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
void lto_output_var_decl_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
void lto_output_type_decl_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
void lto_output_type_ref_index (struct lto_out_decl_state *, struct lto_output_stream *, tree)
struct lto_simple_output_blocklto_create_simple_output_block (enum lto_section_type)
void lto_destroy_simple_output_block (struct lto_simple_output_block *)
struct lto_out_decl_statelto_new_out_decl_state (void)
void lto_delete_out_decl_state (struct lto_out_decl_state *)
struct lto_out_decl_statelto_get_out_decl_state (void)
void lto_push_out_decl_state (struct lto_out_decl_state *)
struct lto_out_decl_statelto_pop_out_decl_state (void)
void lto_record_function_out_decl_state (tree, struct lto_out_decl_state *)
void lto_append_block (struct lto_output_stream *)
const char * lto_tag_name (enum LTO_tags)
bitmap lto_bitmap_alloc (void)
void lto_bitmap_free (bitmap)
char * lto_get_section_name (int, const char *, struct lto_file_decl_data *)
void print_lto_report (const char *)
void lto_streamer_init (void)
bool gate_lto_out (void)
void lto_orig_address_map (tree, intptr_t)
intptr_t lto_orig_address_get (tree)
void lto_orig_address_remove (tree)
void lto_check_version (int, int)
void lto_streamer_hooks_init (void)
void lto_input_cgraph (struct lto_file_decl_data *, const char *)
void lto_reader_init (void)
void lto_input_function_body (struct lto_file_decl_data *, tree, const char *)
void lto_input_constructors_and_inits (struct lto_file_decl_data *, const char *)
void lto_input_toplevel_asms (struct lto_file_decl_data *, int)
struct data_inlto_data_in_create (struct lto_file_decl_data *, const char *, unsigned, vec< ld_plugin_symbol_resolution_t >)
void lto_data_in_delete (struct data_in *)
void lto_input_data_block (struct lto_input_block *, void *, size_t)
location_t lto_input_location (struct bitpack_d *, struct data_in *)
tree lto_input_tree_ref (struct lto_input_block *, struct data_in *, struct function *, enum LTO_tags)
void lto_tag_check_set (enum LTO_tags, int,...)
void lto_init_eh (void)
hashval_t lto_input_scc (struct lto_input_block *, struct data_in *, unsigned *, unsigned *)
tree lto_input_tree_1 (struct lto_input_block *, struct data_in *, enum LTO_tags, hashval_t hash)
tree lto_input_tree (struct lto_input_block *, struct data_in *)
void lto_register_decl_definition (tree, struct lto_file_decl_data *)
struct output_blockcreate_output_block (enum lto_section_type)
void destroy_output_block (struct output_block *)
void lto_output_tree (struct output_block *, tree, bool, bool)
void lto_output_toplevel_asms (void)
void produce_asm (struct output_block *ob, tree fn)
void lto_output_decl_state_streams (struct output_block *, struct lto_out_decl_state *)
void lto_output_decl_state_refs (struct output_block *, struct lto_output_stream *, struct lto_out_decl_state *)
void lto_output_location (struct output_block *, struct bitpack_d *, location_t)
lto_symtab_encoder_t lto_symtab_encoder_new (bool)
int lto_symtab_encoder_encode (lto_symtab_encoder_t, symtab_node)
void lto_symtab_encoder_delete (lto_symtab_encoder_t)
bool lto_symtab_encoder_delete_node (lto_symtab_encoder_t, symtab_node)
bool lto_symtab_encoder_encode_body_p (lto_symtab_encoder_t, struct cgraph_node *)
bool lto_symtab_encoder_in_partition_p (lto_symtab_encoder_t, symtab_node)
void lto_set_symtab_encoder_in_partition (lto_symtab_encoder_t, symtab_node)
bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t, struct varpool_node *)
void output_symtab (void)
void input_symtab (void)
bool referenced_from_other_partition_p (struct ipa_ref_list *, lto_symtab_encoder_t)
bool reachable_from_other_partition_p (struct cgraph_node *, lto_symtab_encoder_t)
bool referenced_from_this_partition_p (struct ipa_ref_list *, lto_symtab_encoder_t)
bool reachable_from_this_partition_p (struct cgraph_node *, lto_symtab_encoder_t)
lto_symtab_encoder_t compute_ltrans_boundary (lto_symtab_encoder_t encoder)
void lto_symtab_merge_decls (void)
void lto_symtab_merge_symbols (void)
tree lto_symtab_prevailing_decl (tree decl)
void lto_write_options (void)
static bool lto_tag_is_tree_code_p ()
static bool lto_tag_is_gimple_code_p ()
static enum LTO_tags lto_gimple_code_to_tag ()
static enum gimple_code lto_tag_to_gimple_code ()
static enum LTO_tags lto_tree_code_to_tag ()
static enum tree_code lto_tag_to_tree_code ()
static void lto_tag_check ()
static void lto_tag_check_range (enum LTO_tags actual, enum LTO_tags tag1, enum LTO_tags tag2)
static void lto_init_tree_ref_encoder ()
static void lto_destroy_tree_ref_encoder ()
static unsigned int lto_tree_ref_encoder_size ()
static tree lto_tree_ref_encoder_get_tree (struct lto_tree_ref_encoder *encoder, unsigned int idx)
static bool emit_label_in_global_context_p ()
static int lto_symtab_encoder_size ()
static int lto_symtab_encoder_lookup (lto_symtab_encoder_t encoder, symtab_node node)
static bool lsei_end_p ()
static void lsei_next ()
static symtab_node lsei_node ()
static struct cgraph_nodelsei_cgraph_node ()
static struct varpool_nodelsei_varpool_node ()
static symtab_node lto_symtab_encoder_deref ()
static lto_symtab_encoder_iterator lsei_start ()
static void lsei_next_in_partition ()
static lto_symtab_encoder_iterator lsei_start_in_partition ()
static void lsei_next_function_in_partition ()
static lto_symtab_encoder_iterator lsei_start_function_in_partition ()
static void lsei_next_variable_in_partition ()
static lto_symtab_encoder_iterator lsei_start_variable_in_partition ()

Variables

vec< tree, va_gc > * lto_global_var_decls
struct lto_stats_d lto_stats
const char * lto_section_name []
vec< lto_out_decl_state_ptrlto_function_decl_states

Typedef Documentation

typedef enum ld_plugin_symbol_resolution ld_plugin_symbol_resolution_t
typedef unsigned char lto_decl_flags_t
typedef void( lto_free_section_data_f)(struct lto_file_decl_data *, enum lto_section_type, const char *, const char *, size_t)
Return the data found from the above call.  The first three
   parameters are the same as above.  The fourth parameter is the data
   itself and the fifth is the length of the data.  
typedef const char*( lto_get_section_data_f)(struct lto_file_decl_data *, enum lto_section_type, const char *, size_t *)
Return a char pointer to the start of a data stream for an lto pass
   or function.  The first parameter is the file data that contains
   the information.  The second parameter is the type of information
   to be obtained.  The third parameter is the name of the function
   and is only used when finding a function body; otherwise it is
   NULL.  The fourth parameter is the length of the data returned.   
typedef struct res_pair res_pair

Enumeration Type Documentation

Indices to the various function, type and symbol streams.  
Enumerator:
LTO_DECL_STREAM_TYPE 
LTO_DECL_STREAM_FIELD_DECL 
LTO_DECL_STREAM_FN_DECL 
LTO_DECL_STREAM_VAR_DECL 
LTO_DECL_STREAM_TYPE_DECL 
LTO_DECL_STREAM_NAMESPACE_DECL 
LTO_DECL_STREAM_LABEL_DECL 
LTO_N_DECL_STREAMS 
Set of section types that are in an LTO file.  This list will grow
   as the number of IPA passes grows since each IPA pass will need its
   own section type to store its summary information.

   When adding a new section type, you must also extend the
   LTO_SECTION_NAME array in lto-section-in.c.   
Enumerator:
LTO_section_decls 
LTO_section_function_body 
LTO_section_static_initializer 
LTO_section_symtab 
LTO_section_refs 
LTO_section_asm 
LTO_section_jump_functions 
LTO_section_ipa_pure_const 
LTO_section_ipa_reference 
LTO_section_ipa_profile 
LTO_section_symtab_nodes 
LTO_section_opts 
LTO_section_cgraph_opt_sum 
LTO_section_inline_summary 
LTO_section_ipcp_transform 
LTO_N_SECTION_TYPES 
enum LTO_tags
Tags representing the various IL objects written to the bytecode file
   (GIMPLE statements, basic blocks, EH regions, tree nodes, etc).

   NOTE, when adding new LTO tags, also update lto_tag_name.   
Enumerator:
LTO_null 
LTO_tree_pickle_reference 
LTO_bb0 
LTO_bb1 
LTO_eh_region 
LTO_builtin_decl 
LTO_integer_cst 
LTO_function 
LTO_eh_table 
LTO_ert_cleanup 
LTO_ert_try 
LTO_ert_allowed_exceptions 
LTO_ert_must_not_throw 
LTO_eh_landing_pad 
LTO_eh_catch 
LTO_tree_scc 
LTO_field_decl_ref 
LTO_function_decl_ref 
LTO_label_decl_ref 
LTO_namespace_decl_ref 
LTO_result_decl_ref 
LTO_ssa_name_ref 
LTO_type_decl_ref 
LTO_type_ref 
LTO_const_decl_ref 
LTO_imported_decl_ref 
LTO_translation_unit_decl_ref 
LTO_global_decl_ref 
LTO_NUM_TAGS 

Function Documentation

lto_symtab_encoder_t compute_ltrans_boundary ( lto_symtab_encoder_t  encoder)
struct output_block* create_output_block ( enum  lto_section_type)
read
void destroy_output_block ( struct output_block )
static bool emit_label_in_global_context_p ( )
inlinestatic
Return true if LABEL should be emitted in the global context.   

Referenced by input_gimple_stmt().

bool gate_lto_out ( void  )
Gate function for all LTO streaming passes.   

References seen_error().

static void lsei_next ( )
inlinestatic
static void lsei_next_in_partition ( )
inlinestatic
static void lsei_next_variable_in_partition ( )
inlinestatic
static lto_symtab_encoder_iterator lsei_start_in_partition ( )
inlinestatic
Return an iterator to the first node in LSI.   

References lsei_end_p(), lsei_next_in_partition(), lsei_node(), lsei_start(), and lto_symtab_encoder_in_partition_p().

Referenced by output_refs().

static lto_symtab_encoder_iterator lsei_start_variable_in_partition ( )
inlinestatic
Return an iterator to the first node in LSI.   

References lsei_end_p(), lsei_next_variable_in_partition(), lsei_node(), lsei_start(), and lto_symtab_encoder_in_partition_p().

Referenced by compute_ltrans_boundary().

static struct varpool_node* lsei_varpool_node ( )
staticread
void lto_append_block ( struct lto_output_stream )
void lto_begin_section ( const char *  ,
bool   
)
In lto-section-out.c   
bitmap lto_bitmap_alloc ( void  )
Allocate a bitmap from heap.  Initializes the LTO obstack if necessary.   

References bitmap_obstack_initialize(), and lto_obstack_initialized.

Referenced by lto_output().

void lto_bitmap_free ( bitmap  )
void lto_check_version ( int  ,
int   
)
htab_t lto_create_renaming_table ( void  )
Create an empty hash table for recording declaration renamings.   

References eq_name(), hash_name(), and renaming_slot_free().

struct lto_input_block* lto_create_simple_input_block ( struct lto_file_decl_data file_data,
enum lto_section_type  section_type,
const char **  datar,
size_t *  len 
)
read
In lto-section-in.c   
Load a section of type SECTION_TYPE from FILE_DATA, parse the
   header and then return an input block pointing to the section.  The
   raw pointer to the section is returned in DATAR and LEN.  These are
   used to free the section.  Return NULL if the section is not present.   

References lto_get_section_data(), and lto_simple_header::main_size.

Referenced by input_symtab(), ipa_profile_read_summary(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().

struct lto_simple_output_block* lto_create_simple_output_block ( enum  lto_section_type)
read
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_data_in_delete ( struct data_in )
void lto_delete_in_decl_state ( struct lto_in_decl_state )
void lto_delete_out_decl_state ( struct lto_out_decl_state )
void lto_destroy_simple_input_block ( struct lto_file_decl_data file_data,
enum lto_section_type  section_type,
struct lto_input_block ib,
const char *  data,
size_t  len 
)
Close the section returned from a call to
   LTO_CREATE_SIMPLE_INPUT_BLOCK.  IB is the input block returned from
   that call.  The FILE_DATA and SECTION_TYPE are the same as what was
   passed to that call and the DATA and LEN are what was returned from
   that call.   

References free(), and lto_free_section_data().

Referenced by input_symtab(), ipa_profile_read_summary(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().

void lto_destroy_simple_output_block ( struct lto_simple_output_block )
static void lto_destroy_tree_ref_encoder ( )
inlinestatic
Destroy an lto_tree_ref_encoder ENCODER by freeing its contents.  The
   memory used by ENCODER is not freed by this function.   

References lto_tree_ref_encoder::tree_hash_table, and lto_tree_ref_encoder::trees.

Referenced by lto_delete_out_decl_state().

int lto_eq_in_decl_state ( const void *  ,
const void *   
)
void lto_free_section_data ( struct lto_file_decl_data file_data,
enum lto_section_type  section_type,
const char *  name,
const char *  data,
size_t  len 
)
Free the data found from the above call.  The first three
   parameters are the same as above.  DATA is the data to be freed and
   LEN is the length of that data.   

References lto_data_header::data, free(), free_section_f, and lto_data_header::len.

Referenced by cgraph_get_body(), copy_function(), inline_read_section(), input_cgraph_opt_section(), ipa_prop_read_section(), lto_destroy_simple_input_block(), lto_input_toplevel_asms(), and read_replacements_section().

const char* lto_get_decl_name_mapping ( struct lto_file_decl_data decl_data,
const char *  name 
)
Given a string NAME, return the string that it has been mapped to
   by lto_record_renamed_decl.  If NAME was not renamed, it is
   returned unchanged.  DECL_DATA holds the renaming hash table to use.   

References lto_renaming_slot::new_name, lto_renaming_slot::old_name, and lto_file_decl_data::renaming_hash_table.

Referenced by cgraph_get_body(), and copy_function().

struct lto_file_decl_data** lto_get_file_decl_data ( void  )
read
struct lto_in_decl_state* lto_get_function_in_decl_state ( struct lto_file_decl_data file_data,
tree  func 
)
read
Search the in-decl state of a function FUNC contained in the file
   associated with FILE_DATA.  Return NULL if not found.   

References lto_in_decl_state::fn_decl, and lto_file_decl_data::function_decl_states.

Referenced by copy_function(), and lto_read_body().

struct lto_out_decl_state* lto_get_out_decl_state ( void  )
read
const char* lto_get_section_data ( struct lto_file_decl_data file_data,
enum lto_section_type  section_type,
const char *  name,
size_t *  len 
)
Return a char pointer to the start of a data stream for an LTO pass
   or function.  FILE_DATA indicates where to obtain the data.
   SECTION_TYPE is the type of information to be obtained.  NAME is
   the name of the function and is only used when finding a function
   body; otherwise it is NULL.  LEN is the size of the data
   returned.   

References lto_buffer::data, lto_data_header::data, get_section_f, lto_data_header::len, len, lto_buffer::length, lto_append_data(), lto_end_uncompression(), lto_start_uncompression(), lto_stats, lto_uncompress_block(), and lto_stats_d::section_size.

Referenced by cgraph_get_body(), copy_function(), inline_read_summary(), input_cgraph_opt_summary(), ipa_prop_read_all_agg_replacement(), ipa_prop_read_jump_functions(), lto_create_simple_input_block(), and lto_input_toplevel_asms().

char* lto_get_section_name ( int  ,
const char *  ,
struct lto_file_decl_data  
)
static enum LTO_tags lto_gimple_code_to_tag ( )
inlinestatic
Return the LTO tag corresponding to gimple code CODE.  See enum
   LTO_tags for details on the conversion.   

Referenced by output_gimple_stmt(), and output_phi().

hashval_t lto_hash_in_decl_state ( const void *  )
void lto_init_eh ( void  )
Initialize EH support.   

References init_eh().

Referenced by input_eh_regions(), and lto_input_ts_function_decl_tree_pointers().

static void lto_init_tree_ref_encoder ( )
inlinestatic
Initialize an lto_out_decl_buffer ENCODER.   

References lto_tree_ref_encoder::tree_hash_table, and lto_tree_ref_encoder::trees.

Referenced by lto_new_out_decl_state().

void lto_input_cgraph ( struct lto_file_decl_data ,
const char *   
)
In lto-streamer-in.c  
void lto_input_constructors_and_inits ( struct lto_file_decl_data ,
const char *   
)
void lto_input_data_block ( struct lto_input_block ,
void *  ,
size_t   
)
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 ( struct bitpack_d ,
struct data_in  
)
hashval_t lto_input_scc ( struct lto_input_block ib,
struct data_in data_in,
unsigned *  len,
unsigned *  entry_len 
)
void lto_input_toplevel_asms ( struct lto_file_decl_data ,
int   
)
tree lto_input_tree ( struct lto_input_block ,
struct data_in  
)
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().

struct lto_in_decl_state* lto_new_in_decl_state ( void  )
read
Input decl state object.                                                   
Return a newly created in-decl state object.  
struct lto_out_decl_state* lto_new_out_decl_state ( void  )
read
intptr_t lto_orig_address_get ( tree  )
void lto_orig_address_map ( tree  ,
intptr_t   
)
void lto_orig_address_remove ( tree  )
bool lto_output_decl_index ( struct lto_output_stream obs,
struct lto_tree_ref_encoder encoder,
tree  name,
unsigned int *  this_index 
)
Lookup NAME in ENCODER.  If NAME is not found, create a new entry in
   ENCODER for NAME with the next available index of ENCODER,  then
   print the index to OBS.  True is returned if NAME was added to
   ENCODER.  The resulting index is stored in THIS_INDEX.

   If OBS is NULL, the only action is to add NAME to the encoder.  

References pointer_map< T >::insert(), streamer_write_uhwi_stream(), lto_tree_ref_encoder::tree_hash_table, and lto_tree_ref_encoder::trees.

Referenced by lto_output_field_decl_index(), lto_output_fn_decl_index(), lto_output_namespace_decl_index(), lto_output_type_decl_index(), lto_output_type_ref_index(), and lto_output_var_decl_index().

void lto_output_decl_state_refs ( struct output_block ob,
struct lto_output_stream out_stream,
struct lto_out_decl_state state 
)
Write all the references in an lto_out_decl_state STATE using
   output block OB and output stream OUT_STREAM.   

References lto_out_decl_state::fn_decl, LTO_N_DECL_STREAMS, lto_output_data_stream(), streamer_tree_cache_lookup(), lto_out_decl_state::streams, write_global_references(), and output_block::writer_cache.

Referenced by produce_asm_for_decls().

void lto_output_decl_state_streams ( struct output_block ob,
struct lto_out_decl_state state 
)
Write all the streams in an lto_out_decl_state STATE using
   output block OB and output stream OUT_STREAM.   

References LTO_N_DECL_STREAMS, lto_out_decl_state::streams, and write_global_stream().

Referenced by produce_asm_for_decls().

void lto_output_field_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a field DECL to OBS.   

References LTO_DECL_STREAM_FIELD_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_fn_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a function DECL to OBS.   

References LTO_DECL_STREAM_FN_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_node(), and lto_output_tree_ref().

void lto_output_location ( struct output_block ob,
struct bitpack_d bp,
location_t  loc 
)
Output info about new location into bitpack BP.
   After outputting bitpack, lto_output_location_data has
   to be done to output actual data.   

References bp_pack_value(), bp_pack_var_len_unsigned(), output_block::current_col, output_block::current_file, output_block::current_line, expand_location(), streamer_string_index(), and strlen().

Referenced by lto_streamer_hooks_init().

void lto_output_namespace_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a namespace DECL to OBS.   

References LTO_DECL_STREAM_NAMESPACE_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_tree ( struct output_block ob,
tree  expr,
bool  ref_p,
bool  this_ref_p 
)
Emit the physical representation of tree node EXPR to output block
   OB.  If THIS_REF_P is true, the leaves of EXPR are emitted as references
   via lto_output_tree_ref.  REF_P is used for streaming siblings of EXPR.   

References DFS_write_tree(), LTO_null, LTO_NUM_TAGS, lto_output_tree_ref(), lto_stats, lto_tree_code_to_tag(), LTO_tree_pickle_reference, output_block::main_stream, next_dfs_num, lto_stats_d::num_pickle_refs_output, pointer_map_create(), pointer_map_destroy(), sccstate_obstack, streamer_tree_cache_lookup(), streamer_write_record_start(), streamer_write_uhwi(), tree_is_indexable(), and output_block::writer_cache.

Referenced by lto_streamer_hooks_init().

void lto_output_type_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
Output a type DECL to OBS.   

References LTO_DECL_STREAM_TYPE_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by lto_output_tree_ref().

void lto_output_type_ref_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  ref 
)
Output a type REF to OBS.   

References LTO_DECL_STREAM_TYPE, lto_output_decl_index(), and lto_out_decl_state::streams.

Referenced by output_type_ref().

void lto_output_var_decl_index ( struct lto_out_decl_state decl_state,
struct lto_output_stream obs,
tree  decl 
)
struct lto_out_decl_state* lto_pop_out_decl_state ( void  )
read
Pop the currently used out-decl state from top of stack.  

Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().

void lto_push_out_decl_state ( struct lto_out_decl_state )
void lto_reader_init ( void  )
Initialization for the LTO reader.   

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

void lto_record_function_out_decl_state ( tree  fn_decl,
struct lto_out_decl_state state 
)
Record STATE after it has been used in serializing the body of
   FN_DECL.  STATE should no longer be used by the caller.  The ownership
   of it is taken over from this point.   

References lto_out_decl_state::fn_decl, LTO_N_DECL_STREAMS, lto_out_decl_state::streams, and lto_tree_ref_encoder::tree_hash_table.

Referenced by lto_output().

void lto_record_renamed_decl ( struct lto_file_decl_data decl_data,
const char *  old_name,
const char *  new_name 
)
Record a declaration name mapping OLD_NAME -> NEW_NAME.  DECL_DATA
   holds the renaming hash table to use.   

References lto_renaming_slot::new_name, lto_renaming_slot::old_name, and lto_file_decl_data::renaming_hash_table.

void lto_register_decl_definition ( tree  ,
struct lto_file_decl_data  
)
In lto-streamer-out.c   
void lto_section_overrun ( struct lto_input_block )
void lto_set_in_hooks ( struct lto_file_decl_data **  data,
lto_get_section_data_f get_f,
lto_free_section_data_f free_f 
)
This is called from the lto front end to set up the hooks that are
   used by the ipa passes to get the data that they will
   deserialize.   

References free_section_f, and get_section_f.

void lto_set_symtab_encoder_in_partition ( lto_symtab_encoder_t  encoder,
symtab_node  node 
)
Return TRUE if we should encode body of NODE (if any).   

References lto_symtab_encoder_encode(), and lto_symtab_encoder_d::nodes.

Referenced by compute_ltrans_boundary(), and ipa_write_summaries().

void lto_streamer_hooks_init ( void  )
void lto_streamer_init ( void  )
Initialization common to the LTO reader and writer.   

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

Referenced by lto_output(), and lto_reader_init().

void lto_symtab_encoder_delete ( lto_symtab_encoder_t  )
bool lto_symtab_encoder_delete_node ( lto_symtab_encoder_t  encoder,
symtab_node  node 
)
int lto_symtab_encoder_encode ( lto_symtab_encoder_t  encoder,
symtab_node  node 
)
bool lto_symtab_encoder_encode_body_p ( lto_symtab_encoder_t  encoder,
struct cgraph_node node 
)
Return TRUE if we should encode initializer of NODE (if any).   

References lto_symtab_encoder_lookup(), and lto_symtab_encoder_d::nodes.

Referenced by lto_output(), and lto_output_node().

bool lto_symtab_encoder_encode_initializer_p ( lto_symtab_encoder_t  encoder,
struct varpool_node node 
)
Return TRUE if we should encode initializer of NODE (if any).   

References lto_symtab_encoder_lookup(), and lto_symtab_encoder_d::nodes.

Referenced by compute_ltrans_boundary(), and get_symbol_initial_value().

static int lto_symtab_encoder_lookup ( lto_symtab_encoder_t  encoder,
symtab_node  node 
)
inlinestatic
lto_symtab_encoder_t lto_symtab_encoder_new ( bool  )
In lto-cgraph.c   
static int lto_symtab_encoder_size ( )
inlinestatic
void lto_symtab_merge_decls ( void  )
In lto-symtab.c.   
Resolve and merge all symbol table chains to a prevailing decl.   

References lto_symtab_merge_decls_1(), and symtab_initialize_asm_name_hash().

tree lto_symtab_prevailing_decl ( tree  decl)
static void lto_tag_check ( )
inlinestatic
Check that tag ACTUAL == EXPECTED.   

References internal_error(), and lto_tag_name().

Referenced by input_function(), and streamer_read_tree_bitfields().

static void lto_tag_check_range ( enum LTO_tags  actual,
enum LTO_tags  tag1,
enum LTO_tags  tag2 
)
inlinestatic
Check that tag ACTUAL is in the range [TAG1, TAG2].   

References internal_error(), and lto_tag_name().

Referenced by input_eh_lp(), input_eh_regions(), lto_input_eh_catch_list(), and lto_input_tree_ref().

void lto_tag_check_set ( enum  LTO_tags,
int  ,
  ... 
)
static bool lto_tag_is_gimple_code_p ( )
inlinestatic
Return true if LTO tag TAG corresponds to a gimple code.   

References LAST_AND_UNUSED_GIMPLE_CODE.

Referenced by lto_tag_name(), and lto_tag_to_gimple_code().

static bool lto_tag_is_tree_code_p ( )
inlinestatic
Return true if LTO tag TAG corresponds to a tree code.   

References LTO_tree_pickle_reference, and MAX_TREE_CODES.

Referenced by lto_tag_name(), and lto_tag_to_tree_code().

const char* lto_tag_name ( enum  LTO_tags)
In lto-streamer.c.   
static enum gimple_code lto_tag_to_gimple_code ( )
inlinestatic
Return the GIMPLE code corresponding to TAG.  See enum LTO_tags for
   details on the conversion.   

References lto_tag_is_gimple_code_p().

Referenced by input_gimple_stmt(), and lto_tag_name().

static enum tree_code lto_tag_to_tree_code ( )
inlinestatic
Return the tree code corresponding to TAG.  See enum LTO_tags for
   details on the conversion.   

References lto_tag_is_tree_code_p().

Referenced by lto_tag_name(), streamer_alloc_tree(), and streamer_get_pickled_tree().

static enum LTO_tags lto_tree_code_to_tag ( )
inlinestatic
Return the LTO tag corresponding to tree code CODE.  See enum
   LTO_tags for details on the conversion.   

Referenced by lto_output_tree(), streamer_read_tree_bitfields(), and streamer_write_tree_header().

static tree lto_tree_ref_encoder_get_tree ( struct lto_tree_ref_encoder encoder,
unsigned int  idx 
)
inlinestatic
Return the IDX-th tree in ENCODER.  

References lto_tree_ref_encoder::trees.

Referenced by write_global_references(), and write_global_stream().

static unsigned int lto_tree_ref_encoder_size ( )
inlinestatic
Return the number of trees encoded in ENCODER.  

References lto_tree_ref_encoder::trees.

Referenced by copy_function(), lto_out_decl_state_written_size(), write_global_references(), and write_global_stream().

void lto_value_range_error ( const char *  purpose,
HOST_WIDE_INT  val,
HOST_WIDE_INT  min,
HOST_WIDE_INT  max 
)
Report out of range value.   

References fatal_error().

Referenced by bp_unpack_int_in_range(), and streamer_read_hwi_in_range().

void lto_write_stream ( struct lto_output_stream )
void print_lto_report ( const char *  )
void produce_asm ( struct output_block ob,
tree  fn 
)
bool reachable_from_other_partition_p ( struct cgraph_node ,
lto_symtab_encoder_t   
)
bool reachable_from_this_partition_p ( struct cgraph_node ,
lto_symtab_encoder_t   
)
bool referenced_from_other_partition_p ( struct ipa_ref_list ,
lto_symtab_encoder_t   
)
bool referenced_from_this_partition_p ( struct ipa_ref_list list,
lto_symtab_encoder_t  encoder 
)
Return if LIST contain references from other partitions.   

References lto_symtab_encoder_in_partition_p(), and ipa_ref::referring.

Referenced by ipa_reference_write_optimization_summary(), and write_node_summary_p().


Variable Documentation

vec<lto_out_decl_state_ptr> lto_function_decl_states
Holds all the out decl states of functions output so far in the
   current output file.   
List of out decl states used by functions.  We use this to
   generate the decl directory later.  

Referenced by produce_asm_for_decls().

vec<tree, va_gc>* lto_global_var_decls
@verbatim LTO symbol table.

Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by CodeSourcery, Inc.

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/.

Vector to keep track of external variables we've seen so far.   
const char* lto_section_name[]
Section names corresponding to the values of enum lto_section_type.   
@verbatim Input functions for reading LTO sections.

Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Kenneth Zadeck zadec.nosp@m.k@na.nosp@m.tural.nosp@m.brid.nosp@m.ge.co.nosp@m.m

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/.

Section names.  These must correspond to the values of
   enum lto_section_type.   

Referenced by lto_get_section_name(), and print_lto_report().

struct lto_stats_d lto_stats
Statistics gathered during LTO, WPA and LTRANS.   
@verbatim Miscellaneous utilities for GIMPLE streaming.  Things that are used

in both input and output are here.

Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Doug Kwan dougk.nosp@m.wan@.nosp@m.googl.nosp@m.e.co.nosp@m.m

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/.

Statistics gathered during LTO, WPA and LTRANS.   

Referenced by cgraph_get_body(), lto_compress_block(), lto_end_compression(), lto_end_uncompression(), lto_get_section_data(), lto_output_tree(), lto_uncompress_block(), print_lto_report(), and streamer_write_tree_body().