GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-streamer.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include "toplev.h"
#include "lto-section-names.h"
Functions | |
const char * | lto_tag_name (enum LTO_tags tag) |
char * | lto_get_section_name (int section_type, const char *name, int node_order, struct lto_file_decl_data *f) |
void | print_lto_report (const char *s) |
void | lto_streamer_init (void) |
bool | gate_lto_out (void) |
void | lto_check_version (int major, int minor, const char *file_name) |
void | lto_streamer_hooks_init (void) |
Variables | |
struct lto_stats_d | lto_stats |
const char * | section_name_prefix = LTO_SECTION_NAME_PREFIX |
bool | lto_stream_offload_p |
FILE * | streamer_dump_file |
bool gate_lto_out | ( | void | ) |
Gate function for all LTO streaming passes.
References seen_error().
void lto_check_version | ( | int | major, |
int | minor, | ||
const char * | file_name ) |
Check that the version MAJOR.MINOR is the correct version number.
References fatal_error(), input_location, LTO_major_version, and LTO_minor_version.
char * lto_get_section_name | ( | int | section_type, |
const char * | name, | ||
int | node_order, | ||
struct lto_file_decl_data * | f ) |
Get a section name for a particular type or name. The NAME field is only used if SECTION_TYPE is LTO_section_function_body. For all others it is ignored. The callee of this function is responsible to free the returned name.
References free(), gcc_assert, get_random_seed(), HOST_WIDE_INT_PRINT_HEX_PURE, lto_file_decl_data::id, internal_error(), LTO_N_SECTION_TYPES, LTO_section_function_body, lto_section_name, LTO_section_opts, NULL, and section_name_prefix.
Referenced by copy_function_or_variable(), lto_destroy_simple_output_block(), lto_output_toplevel_asms(), lto_write_mode_table(), lto_write_options(), produce_asm(), produce_asm_for_decls(), produce_lto_section(), produce_symtab(), and produce_symtab_extension().
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_location_and_block(), lto_output_tree(), streamer_hooks::output_location, streamer_hooks::output_location_and_block, streamer_hooks::read_tree, streamer_hooks_init(), and streamer_hooks::write_tree.
Referenced by symbol_table::compile().
void lto_streamer_init | ( | void | ) |
Initialization common to the LTO reader and writer.
References streamer_check_handled_ts_structures().
Referenced by lto_output(), and lto_reader_init().
const char * lto_tag_name | ( | enum LTO_tags | tag | ) |
Return a string representing LTO tag TAG.
References get_tree_code_name(), gimple_code_name, LTO_bb0, LTO_bb1, LTO_eh_region, LTO_eh_table, LTO_ert_allowed_exceptions, LTO_ert_cleanup, LTO_ert_must_not_throw, LTO_ert_try, LTO_function, LTO_global_stream_ref, LTO_null, LTO_ssa_name_ref, lto_tag_is_gimple_code_p(), lto_tag_is_tree_code_p(), lto_tag_to_gimple_code(), lto_tag_to_tree_code(), and LTO_tree_pickle_reference.
Referenced by input_gimple_stmt(), lto_tag_check(), lto_tag_check_range(), and lto_tag_check_set().
void print_lto_report | ( | const char * | s | ) |
Show various memory usage statistics related to LTO.
References get_tree_code_name(), HOST_WIDE_INT_PRINT_UNSIGNED, i, LTO_N_SECTION_TYPES, lto_section_name, lto_stats, lto_stats_d::num_cgraph_partitions, lto_stats_d::num_compressed_il_bytes, lto_stats_d::num_function_bodies, lto_stats_d::num_input_cgraph_nodes, lto_stats_d::num_input_files, lto_stats_d::num_input_il_bytes, lto_stats_d::num_output_files, lto_stats_d::num_output_il_bytes, lto_stats_d::num_output_symtab_nodes, lto_stats_d::num_pickle_refs_output, lto_stats_d::num_tree_bodies_output, NUM_TREE_CODES, lto_stats_d::num_trees, lto_stats_d::num_uncompressed_il_bytes, and lto_stats_d::section_size.
struct lto_stats_d lto_stats |
Miscellaneous utilities for GIMPLE streaming. Things that are used in both input and output are here. Copyright (C) 2009-2024 Free Software Foundation, Inc. Contributed by Doug Kwan <dougkwan@google.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/>.
Statistics gathered during LTO, WPA and LTRANS.
Referenced by varpool_node::get_constructor(), cgraph_node::get_untransformed_body(), lto_compress_block(), lto_compression_zlib(), lto_get_section_data(), lto_output_tree(), lto_uncompress_block(), lto_uncompression_zlib(), print_lto_report(), and streamer_write_tree_body().
bool lto_stream_offload_p |
Set when streaming LTO for offloading compiler.
Referenced by hash_tree(), inline_read_section(), ipa_fn_summary_write(), ipa_passes(), lto_output_node(), lto_write_mode_table(), lto_write_options(), output_symtab(), pack_ts_base_value_fields(), pack_ts_decl_common_value_fields(), pack_ts_type_common_value_fields(), preload_common_nodes(), produce_asm_for_decls(), select_what_to_stream(), streamer_write_tree_bitfields(), and write_ts_function_decl_tree_pointers().
const char* section_name_prefix = LTO_SECTION_NAME_PREFIX |
Can be either OFFLOAD_SECTION_NAME_PREFIX when we stream IR for offload compiler, or LTO_SECTION_NAME_PREFIX for LTO case.
Referenced by ipa_passes(), and lto_get_section_name().
FILE* streamer_dump_file |
Referenced by copy_function_or_variable(), create_output_block(), DFS::DFS(), ipa_write_summaries(), lto_begin_section(), lto_get_index(), lto_output_tree(), lto_write_tree_1(), output_bb(), output_constructor(), output_function(), produce_asm_for_decls(), streamer_write_integer_cst(), streamer_write_tree_header(), and write_global_stream().