GCC Middle and Back End API Reference
|
Variables | |
static vec < lto_out_decl_state_ptr > | decl_state_stack |
vec< lto_out_decl_state_ptr > | lto_function_decl_states |
static struct lto_compression_stream * | compression_stream = NULL |
void lto_append_block | ( | ) |
Adds a new block to output stream OBS.
References lto_output_stream::block_size, lto_output_stream::current_block, lto_output_stream::current_pointer, lto_output_stream::first_block, lto_output_stream::left_in_block, and lto_char_ptr_base::ptr.
Referenced by lto_output_data_stream(), streamer_write_char_stream(), streamer_write_hwi_stream(), and streamer_write_uhwi_stream().
|
static |
Flush compressed stream data function, sends NUM_CHARS from CHARS to the append lang hook, OPAQUE is currently always NULL.
References lang_hooks_for_lto::append_data, and lang_hooks::lto.
Referenced by lto_begin_section().
void lto_begin_section | ( | ) |
Begin a new output section named NAME. If COMPRESS is true, zlib compress the section.
References lang_hooks_for_lto::begin_section, lang_hooks::lto, lto_append_data(), and lto_start_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().
|
read |
Create the output block and return it.
References lto_simple_output_block::decl_state, lto_get_out_decl_state(), lto_simple_output_block::main_stream, and lto_simple_output_block::section_type.
Referenced by ipa_profile_write_summary(), ipa_reference_write_optimization_summary(), output_refs(), output_symtab(), and pure_const_write_summary().
void lto_delete_out_decl_state | ( | ) |
Delete STATE and components.
References free(), lto_destroy_tree_ref_encoder(), LTO_N_DECL_STREAMS, and lto_out_decl_state::streams.
Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and produce_asm_for_decls().
void lto_destroy_simple_output_block | ( | ) |
Produce a simple section for one of the ipa passes.
References lto_simple_header::compressed_size, free(), lto_begin_section(), lto_end_section(), lto_get_section_name(), lto_simple_header::lto_header, lto_output_data_stream(), lto_write_stream(), lto_simple_header::main_size, lto_simple_output_block::main_stream, lto_header::major_version, memset(), lto_header::minor_version, lto_simple_output_block::section_type, and lto_output_stream::total_size.
Referenced by ipa_profile_write_summary(), ipa_reference_write_optimization_summary(), output_refs(), output_symtab(), and pure_const_write_summary().
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().
|
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().
|
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().
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_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_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_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 | ( | ) |
Push STATE to top of out decl stack.
Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().
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_write_stream | ( | ) |
Write all of the chars in OBS to the assembler. Recycle the blocks in obs as this is being done.
References lang_hooks_for_lto::append_data, lto_output_stream::first_block, lto_output_stream::left_in_block, lang_hooks::lto, lto_compress_block(), and lto_char_ptr_base::ptr.
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().
|
static |
Pointer to the current compression stream.
|
static |
@verbatim Functions for writing 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/.
vec<lto_out_decl_state_ptr> lto_function_decl_states |
List of out decl states used by functions. We use this to generate the decl directory later.
Referenced by produce_asm_for_decls().