GCC Middle and Back End API 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_state * | lto_in_decl_state_ptr |
typedef struct lto_out_decl_state * | lto_out_decl_state_ptr |
typedef struct res_pair | res_pair |
typedef struct lto_file_decl_data * | lto_file_decl_data_ptr |
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_ptr > | lto_function_decl_states |
typedef enum ld_plugin_symbol_resolution ld_plugin_symbol_resolution_t |
typedef unsigned char lto_decl_flags_t |
typedef struct lto_file_decl_data* lto_file_decl_data_ptr |
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 lto_in_decl_state* lto_in_decl_state_ptr |
typedef struct lto_out_decl_state* lto_out_decl_state_ptr |
typedef struct lto_symtab_encoder_d* lto_symtab_encoder_t |
enum lto_decl_stream_e_t |
enum lto_section_type |
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.
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.
lto_symtab_encoder_t compute_ltrans_boundary | ( | lto_symtab_encoder_t | encoder | ) |
|
read |
void destroy_output_block | ( | struct output_block * | ) |
|
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().
void input_symtab | ( | void | ) |
Input and merge the symtab from each of the .o files passed to lto1.
References symtab_node_base::aux, fatal_error(), lto_file_decl_data::file_name, get_working_sets(), input_cgraph_1(), input_cgraph_opt_summary(), input_profile_summary(), input_refs(), len, lto_create_simple_input_block(), lto_destroy_simple_input_block(), symtab_node_base::lto_file_data, lto_get_file_decl_data(), LTO_section_refs, LTO_section_symtab_nodes, lto_symtab_encoder_new(), merge_profile_summaries(), cgraph_node::symbol, and lto_file_decl_data::symtab_node_encoder.
|
staticread |
Return the node pointed to by LSI.
References cgraph(), lto_symtab_encoder_iterator::encoder, lto_symtab_encoder_iterator::index, and lto_symtab_encoder_d::nodes.
Referenced by compute_ltrans_boundary(), ipa_prop_write_all_agg_replacement(), ipa_prop_write_jump_functions(), ipa_write_optimization_summaries(), output_symtab(), and pure_const_write_summary().
|
inlinestatic |
Return true if iterator LSE points to nothing.
References lto_symtab_encoder_iterator::encoder, lto_symtab_encoder_iterator::index, and lto_symtab_encoder_size().
Referenced by compute_ltrans_boundary(), ipa_prop_write_all_agg_replacement(), ipa_prop_write_jump_functions(), ipa_write_optimization_summaries(), lsei_next_function_in_partition(), lsei_next_in_partition(), lsei_next_variable_in_partition(), lsei_start_function_in_partition(), lsei_start_in_partition(), lsei_start_variable_in_partition(), output_refs(), output_symtab(), produce_symtab(), and pure_const_write_summary().
|
inlinestatic |
Advance iterator LSE.
References lto_symtab_encoder_iterator::index.
Referenced by lsei_next_function_in_partition(), lsei_next_in_partition(), lsei_next_variable_in_partition(), and produce_symtab().
|
inlinestatic |
Advance iterator LSE.
References lto_symtab_encoder_iterator::encoder, lsei_end_p(), lsei_next(), lsei_node(), and lto_symtab_encoder_in_partition_p().
Referenced by compute_ltrans_boundary(), ipa_prop_write_all_agg_replacement(), ipa_prop_write_jump_functions(), ipa_write_optimization_summaries(), lsei_start_function_in_partition(), output_symtab(), and pure_const_write_summary().
|
inlinestatic |
Advance iterator LSE.
References lto_symtab_encoder_iterator::encoder, lsei_end_p(), lsei_next(), lsei_node(), and lto_symtab_encoder_in_partition_p().
Referenced by lsei_start_in_partition(), and output_refs().
|
inlinestatic |
Advance iterator LSE.
References lto_symtab_encoder_iterator::encoder, lsei_end_p(), lsei_next(), lsei_node(), and lto_symtab_encoder_in_partition_p().
Referenced by compute_ltrans_boundary(), and lsei_start_variable_in_partition().
|
inlinestatic |
Return the node pointed to by LSI.
References lto_symtab_encoder_iterator::encoder, lto_symtab_encoder_iterator::index, and lto_symtab_encoder_d::nodes.
Referenced by lsei_next_function_in_partition(), lsei_next_in_partition(), lsei_next_variable_in_partition(), lsei_start_function_in_partition(), lsei_start_in_partition(), lsei_start_variable_in_partition(), output_refs(), and produce_symtab().
|
inlinestatic |
Return an iterator to the first node in LSI.
References lto_symtab_encoder_iterator::encoder, and lto_symtab_encoder_iterator::index.
Referenced by lsei_start_function_in_partition(), lsei_start_in_partition(), lsei_start_variable_in_partition(), and produce_symtab().
|
inlinestatic |
Return an iterator to the first node in LSI.
References lsei_end_p(), lsei_next_function_in_partition(), lsei_node(), lsei_start(), and lto_symtab_encoder_in_partition_p().
Referenced by compute_ltrans_boundary(), ipa_prop_write_all_agg_replacement(), ipa_prop_write_jump_functions(), ipa_write_optimization_summaries(), output_symtab(), and pure_const_write_summary().
|
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().
|
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().
|
staticread |
Return the node pointed to by LSI.
References lto_symtab_encoder_iterator::encoder, lto_symtab_encoder_iterator::index, lto_symtab_encoder_d::nodes, and varpool().
Referenced by compute_ltrans_boundary().
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().
|
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().
|
read |
|
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 * | ) |
|
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().
void lto_end_section | ( | void | ) |
End the current output section.
References lang_hooks_for_lto::end_section, lang_hooks::lto, and lto_end_compression().
Referenced by copy_function(), lto_destroy_simple_output_block(), lto_output_toplevel_asms(), lto_write_options(), produce_asm(), produce_asm_for_decls(), and produce_symtab().
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().
|
read |
Return an array of file decl datas for all of the files passed to this compilation.
References file_decl_data.
Referenced by inline_read_summary(), input_cgraph_opt_summary(), input_symtab(), ipa_profile_read_summary(), ipa_prop_read_all_agg_replacement(), ipa_prop_read_jump_functions(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().
|
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().
|
read |
Get the currently used lto_out_decl_state structure.
Referenced by copy_function(), create_output_block(), ipa_write_optimization_summaries(), ipa_write_summaries_1(), lto_create_simple_output_block(), lto_output(), produce_asm_for_decls(), and pure_const_write_summary().
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 * | |||
) |
|
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().
|
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 | ||
) |
Populate the reader cache with trees materialized from the SCC following in the IB, DATA_IN stream.
References first, LTO_builtin_decl, LTO_field_decl_ref, LTO_global_decl_ref, lto_input_tree_1(), LTO_integer_cst, LTO_null, lto_read_tree_1(), LTO_tree_pickle_reference, LTO_tree_scc, streamer_tree_cache_d::nodes, data_in::reader_cache, streamer_alloc_tree(), streamer_read_record_start(), streamer_read_uchar(), streamer_read_uhwi(), streamer_tree_cache_append(), and streamer_tree_cache_get_tree().
Referenced by lto_input_tree_1().
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 | ||
) |
Read a tree from input block IB using the per-file context in DATA_IN. This context is used, for example, to resolve references to previously read nodes.
References build_int_cst_wide(), cfun, HOST_WIDE_INT, len, LTO_builtin_decl, LTO_field_decl_ref, LTO_global_decl_ref, lto_input_scc(), lto_input_tree(), lto_input_tree_ref(), LTO_integer_cst, LTO_null, LTO_NUM_TAGS, lto_read_tree(), LTO_tree_pickle_reference, LTO_tree_scc, data_in::reader_cache, streamer_get_builtin_tree(), streamer_get_pickled_tree(), streamer_read_hwi(), streamer_read_uhwi(), and streamer_tree_cache_append().
Referenced by lto_input_scc(), and lto_input_tree().
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().
|
read |
Input decl state object.
Return a newly created in-decl state object.
|
read |
Return a new lto_out_decl_state.
References lto_init_tree_ref_encoder(), LTO_N_DECL_STREAMS, and lto_out_decl_state::streams.
Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().
intptr_t lto_orig_address_get | ( | tree | ) |
void lto_orig_address_map | ( | tree | , |
intptr_t | |||
) |
void lto_orig_address_remove | ( | tree | ) |
void lto_output_data_stream | ( | struct lto_output_stream * | obs, |
const void * | data, | ||
size_t | len | ||
) |
Write raw DATA of length LEN to the output block OB.
References copy(), lto_output_stream::current_pointer, lto_output_stream::left_in_block, len, lto_append_block(), memcpy(), and lto_output_stream::total_size.
Referenced by copy_function(), lto_destroy_simple_output_block(), lto_output_decl_state_refs(), lto_output_toplevel_asms(), lto_write_options(), produce_asm(), produce_asm_for_decls(), streamer_string_index(), write_global_references(), and write_symbol().
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_toplevel_asms | ( | void | ) |
Emit toplevel asms.
References asm_nodes, asm_node::asm_str, create_output_block(), destroy_output_block(), free(), lto_begin_section(), lto_end_section(), lto_get_section_name(), lto_asm_header::lto_header, lto_output_data_stream(), LTO_section_asm, lto_write_stream(), lto_asm_header::main_size, output_block::main_stream, lto_header::major_version, memset(), lto_header::minor_version, asm_node::next, asm_node::order, streamer_write_char_stream(), streamer_write_hwi(), streamer_write_string_cst(), lto_asm_header::string_size, output_block::string_stream, and lto_output_stream::total_size.
Referenced by output_symtab().
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 | ||
) |
Output a static or extern var DECL to OBS.
References LTO_DECL_STREAM_VAR_DECL, lto_output_decl_index(), and lto_out_decl_state::streams.
Referenced by lto_output_tree_ref(), lto_output_varpool_node(), and stream_out_bitmap().
|
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 | ) |
Initialize all the streamer hooks used for streaming GIMPLE.
References streamer_hooks::input_location, lto_input_location(), lto_input_tree(), lto_output_location(), lto_output_tree(), streamer_hooks::output_location, streamer_hooks::read_tree, streamer_hooks_init(), and streamer_hooks::write_tree.
Referenced by compile().
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 | ||
) |
Remove NODE from encoder.
References lto_symtab_encoder_d::map, lto_encoder_entry::node, lto_symtab_encoder_d::nodes, and pointer_map_contains().
|
inlinestatic |
Return the cgraph node corresponding to REF using ENCODER.
References lto_symtab_encoder_d::nodes.
Referenced by compute_ltrans_boundary(), inline_read_section(), inline_write_summary(), ipa_prop_read_section(), ipa_reference_read_optimization_summary(), ipa_reference_write_optimization_summary(), lto_output(), output_cgraph_opt_summary(), output_symtab(), pure_const_read_summary(), and read_replacements_section().
int lto_symtab_encoder_encode | ( | lto_symtab_encoder_t | encoder, |
symtab_node | node | ||
) |
Return the existing reference number of NODE in the symtab encoder in output block OB. Assign a new reference if this is the first time NODE is encoded.
References lto_symtab_encoder_d::map, lto_symtab_encoder_d::nodes, pointer_map_contains(), and pointer_map_insert().
Referenced by add_node_to(), add_references(), inline_write_summary(), input_cgraph_1(), ipa_reference_write_optimization_summary(), ipa_write_node_info(), lto_set_symtab_encoder_encode_body(), lto_set_symtab_encoder_in_partition(), pure_const_write_summary(), and write_agg_replacement_chain().
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().
bool lto_symtab_encoder_in_partition_p | ( | lto_symtab_encoder_t | encoder, |
symtab_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(), lsei_next_function_in_partition(), lsei_next_in_partition(), lsei_next_variable_in_partition(), lsei_start_function_in_partition(), lsei_start_in_partition(), lsei_start_variable_in_partition(), lto_output_node(), lto_output_varpool_node(), output_node_opt_summary(), reachable_from_other_partition_p(), reachable_from_this_partition_p(), referenced_from_other_partition_p(), and referenced_from_this_partition_p().
|
inlinestatic |
Look up NODE in encoder. Return NODE's reference if it has been encoded or LCC_NOT_FOUND if it is not there.
References lto_symtab_encoder_d::map, and pointer_map_contains().
Referenced by lto_output_edge(), lto_output_node(), lto_output_ref(), lto_output_varpool_node(), lto_set_symtab_encoder_encode_initializer(), lto_symtab_encoder_encode_body_p(), lto_symtab_encoder_encode_initializer_p(), lto_symtab_encoder_in_partition_p(), and output_refs().
lto_symtab_encoder_t lto_symtab_encoder_new | ( | bool | ) |
In lto-cgraph.c
|
inlinestatic |
Return number of encoded nodes in ENCODER.
References lto_symtab_encoder_d::nodes.
Referenced by compute_ltrans_boundary(), inline_write_summary(), ipa_reference_write_optimization_summary(), lsei_end_p(), lto_output(), output_cgraph_opt_summary(), and output_symtab().
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().
void lto_symtab_merge_symbols | ( | void | ) |
Merge cgraph nodes according to the symbol merging done by lto_symtab_merge_decls.
References cgraph_get_node(), cgraph_remove_node(), cgraph_node::clone_of, symtab_node_base::decl, lto_cgraph_replace_node(), lto_symtab_merge_symbols_1(), lto_symtab_symbol_p(), cgraph_node::symbol, symtab_initialize_asm_name_hash(), symtab_insert_node_to_hashtable(), symtab_node_for_asm(), and symtab_resolve_alias().
|
inlinestatic |
Check that tag ACTUAL == EXPECTED.
References internal_error(), and lto_tag_name().
Referenced by input_function(), and streamer_read_tree_bitfields().
|
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 | , | ||
... | |||
) |
|
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().
|
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.
|
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().
|
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().
|
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().
|
inlinestatic |
Return the IDX-th tree in ENCODER.
References lto_tree_ref_encoder::trees.
Referenced by write_global_references(), and write_global_stream().
|
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_options | ( | void | ) |
In lto-opts.c.
Write currently held options to an LTO IL section.
References append_to_collect_gcc_options(), cl_decoded_option::canonical_option, cl_decoded_option::canonical_option_num_elements, cl_options, cl_option::cl_reject_driver, cl_option::flags, free(), lto_begin_section(), lto_end_section(), lto_get_section_name(), lto_output_data_stream(), LTO_section_opts, lto_write_stream(), memset(), obstack, cl_decoded_option::opt_index, option(), save_decoded_options, save_decoded_options_count, and strlen().
Referenced by produce_asm_for_decls().
void lto_write_stream | ( | struct lto_output_stream * | ) |
void output_symtab | ( | void | ) |
Output the part of the symtab in SET and VSET.
References cgraph_node::callees, lto_simple_output_block::decl_state, cgraph_node::indirect_calls, lsei_cgraph_node(), lsei_end_p(), lsei_next_function_in_partition(), lsei_start_function_in_partition(), lto_create_simple_output_block(), lto_destroy_simple_output_block(), lto_output_node(), lto_output_toplevel_asms(), lto_output_varpool_node(), LTO_section_symtab_nodes, lto_symtab_encoder_deref(), lto_symtab_encoder_size(), lto_simple_output_block::main_stream, output_cgraph_opt_summary(), output_outgoing_cgraph_edges(), output_profile_summary(), output_refs(), streamer_write_uhwi_stream(), lto_out_decl_state::symtab_node_encoder, and varpool().
Referenced by lto_output().
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().
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().
@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 k@na tural brid ge.co 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 wan@ googl e.co 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().