|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "backend.h"#include "rtl.h"#include "tree.h"#include "gimple.h"#include "cgraph.h"#include "data-streamer.h"#include "langhooks.h"#include "lto-compress.h"#include "print-tree.h"
Functions | |
| static void | lto_append_data (const char *chars, unsigned int num_chars, void *opaque) |
| void | lto_begin_section (const char *name, bool compress) |
| void | lto_end_section (void) |
| void | lto_write_data (const void *data, unsigned int size) |
| void | lto_write_raw_data (const void *data, unsigned int size) |
| void | lto_write_stream (struct lto_output_stream *obs) |
| struct lto_simple_output_block * | lto_create_simple_output_block (enum lto_section_type section_type) |
| void | lto_destroy_simple_output_block (struct lto_simple_output_block *ob) |
| struct lto_out_decl_state * | lto_new_out_decl_state (void) |
| void | lto_delete_out_decl_state (struct lto_out_decl_state *state) |
| struct lto_out_decl_state * | lto_get_out_decl_state (void) |
| void | lto_push_out_decl_state (struct lto_out_decl_state *state) |
| struct lto_out_decl_state * | lto_pop_out_decl_state (void) |
| void | lto_record_function_out_decl_state (tree fn_decl, struct lto_out_decl_state *state) |
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 |
|
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, gcc_assert, lang_hooks::lto, and NULL.
| void lto_begin_section | ( | const char * | name, |
| bool | compress ) |
Begin a new output section named NAME. If COMPRESS is true, zlib compress the section.
In lto-section-out.cc
References lang_hooks_for_lto::begin_section, compression_stream, gcc_assert, lang_hooks::lto, lto_append_data(), lto_start_compression(), NULL, and streamer_dump_file.
Referenced by copy_function_or_variable(), lto_destroy_simple_output_block(), lto_output_toplevel_asms(), lto_write_mode_table(), lto_write_options(), produce_asm_for_decls(), produce_lto_section(), produce_symbol_asm(), produce_symtab(), and produce_symtab_extension().
| struct lto_simple_output_block * lto_create_simple_output_block | ( | enum lto_section_type | section_type | ) |
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_offload_tables(), output_refs(), output_symtab(), and pure_const_write_summary().
| void lto_delete_out_decl_state | ( | struct lto_out_decl_state * | state | ) |
Delete STATE and components.
References free(), i, lto_destroy_tree_ref_encoder(), and LTO_N_DECL_STREAMS.
Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and produce_asm_for_decls().
| void lto_destroy_simple_output_block | ( | struct lto_simple_output_block * | ob | ) |
Produce a simple section for one of the ipa passes.
References free(), header, lto_begin_section(), lto_end_section(), lto_get_section_name(), lto_write_data(), lto_write_stream(), lto_simple_output_block::main_stream, NULL, lto_simple_output_block::section_type, and lto_output_stream::total_size.
Referenced by ipa_profile_write_summary(), ipa_reference_write_optimization_summary(), output_offload_tables(), output_refs(), output_symtab(), and pure_const_write_summary().
| void lto_end_section | ( | void | ) |
End the current output section.
References compression_stream, lang_hooks_for_lto::end_section, lang_hooks::lto, lto_end_compression(), and NULL.
Referenced by copy_function_or_variable(), lto_destroy_simple_output_block(), lto_output_toplevel_asms(), lto_write_mode_table(), lto_write_options(), produce_asm_for_decls(), produce_lto_section(), produce_symbol_asm(), produce_symtab(), and produce_symtab_extension().
| struct lto_out_decl_state * lto_get_out_decl_state | ( | void | ) |
Get the currently used lto_out_decl_state structure.
References decl_state_stack.
Referenced by copy_function_or_variable(), 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().
| struct lto_out_decl_state * lto_new_out_decl_state | ( | void | ) |
Return a new lto_out_decl_state.
References i, lto_init_tree_ref_encoder(), and LTO_N_DECL_STREAMS.
Referenced by ipa_write_optimization_summaries(), ipa_write_summaries_1(), and lto_output().
| struct lto_out_decl_state * lto_pop_out_decl_state | ( | void | ) |
Pop the currently used out-decl state from top of stack.
References decl_state_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 * | state | ) |
Push STATE to top of out decl stack.
References decl_state_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, i, lto_function_decl_states, LTO_N_DECL_STREAMS, and NULL.
Referenced by lto_output().
| void lto_write_data | ( | const void * | data, |
| unsigned int | size ) |
Write SIZE bytes starting at DATA to the assembler.
References lang_hooks_for_lto::append_data, compression_stream, lang_hooks::lto, lto_compress_block(), and NULL.
Referenced by lto_destroy_simple_output_block(), lto_output_decl_state_refs(), lto_output_toplevel_asms(), lto_write_mode_table(), lto_write_options(), produce_asm_for_decls(), produce_lto_section(), produce_symbol_asm(), produce_symtab_extension(), write_global_references(), write_symbol(), and write_symbol_extension_info().
| void lto_write_raw_data | ( | const void * | data, |
| unsigned int | size ) |
Write SIZE bytes starting at DATA to the assembler.
References lang_hooks_for_lto::append_data, lang_hooks::lto, and NULL.
Referenced by copy_function_or_variable().
| void lto_write_stream | ( | struct lto_output_stream * | obs | ) |
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, compression_stream, lto_output_stream::first_block, free(), if(), lto_output_stream::left_in_block, lang_hooks::lto, lto_compress_block(), and lto_char_ptr_base::ptr.
Referenced by lto_destroy_simple_output_block(), lto_output_toplevel_asms(), lto_write_mode_table(), produce_asm_for_decls(), and produce_symbol_asm().
|
static |
Pointer to the current compression stream.
Referenced by lto_begin_section(), lto_end_section(), lto_write_data(), and lto_write_stream().
|
static |
Functions for writing LTO sections. Copyright (C) 2009-2026 Free Software Foundation, Inc. Contributed by Kenneth Zadeck <zadeck@naturalbridge.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Referenced by lto_get_out_decl_state(), lto_pop_out_decl_state(), and lto_push_out_decl_state().
| 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.
Holds all the out decl states of functions output so far in the current output file.
Referenced by cl_optimization_stream_in(), lto_record_function_out_decl_state(), and produce_asm_for_decls().