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 "cgraph.h"
#include "data-streamer.h"
#include "value-range.h"
#include "streamer-hooks.h"
Functions | |
void | lto_append_block (struct lto_output_stream *obs) |
static unsigned | streamer_string_index (struct output_block *ob, const char *s, unsigned int len, bool persistent) |
void | streamer_write_string_with_length (struct output_block *ob, struct lto_output_stream *index_stream, const char *s, unsigned int len, bool persistent) |
void | streamer_write_string (struct output_block *ob, struct lto_output_stream *index_stream, const char *string, bool persistent) |
void | bp_pack_string_with_length (struct output_block *ob, struct bitpack_d *bp, const char *s, unsigned int len, bool persistent) |
void | bp_pack_string (struct output_block *ob, struct bitpack_d *bp, const char *s, bool persistent) |
void | streamer_write_zero (struct output_block *ob) |
void | streamer_write_uhwi (struct output_block *ob, unsigned HOST_WIDE_INT work) |
void | streamer_write_hwi (struct output_block *ob, HOST_WIDE_INT work) |
void | streamer_write_poly_uint64 (struct output_block *ob, poly_uint64 work) |
void | streamer_write_poly_int64 (struct output_block *ob, poly_int64 work) |
void | streamer_write_gcov_count (struct output_block *ob, gcov_type work) |
void | streamer_write_uhwi_stream (struct lto_output_stream *obs, unsigned HOST_WIDE_INT work) |
void | streamer_write_hwi_stream (struct lto_output_stream *obs, HOST_WIDE_INT work) |
void | streamer_write_gcov_count_stream (struct lto_output_stream *obs, gcov_type work) |
void | streamer_write_data_stream (struct lto_output_stream *obs, const void *data, size_t len) |
void | streamer_write_real_value (struct output_block *ob, const REAL_VALUE_TYPE *r) |
void | streamer_write_vrange (struct output_block *ob, const vrange &v) |
void | streamer_write_wide_int (struct output_block *ob, const wide_int &val) |
void | streamer_write_widest_int (struct output_block *ob, const widest_int &w) |
void bp_pack_string | ( | struct output_block * | ob, |
struct bitpack_d * | bp, | ||
const char * | s, | ||
bool | persistent ) |
Output the '\0' terminated STRING to the string table in OB. Then put the index onto the bitpack BP. When PERSISTENT is set, the string S is supposed to not change during duration of the OB and thus OB can keep pointer into it.
References bp_pack_var_len_unsigned(), string_slot::s, and streamer_string_index().
Referenced by lto_output_location_1(), lto_write_mode_table(), and pack_ts_translation_unit_decl_value_fields().
void bp_pack_string_with_length | ( | struct output_block * | ob, |
struct bitpack_d * | bp, | ||
const char * | s, | ||
unsigned int | len, | ||
bool | persistent ) |
Output STRING of LEN characters to the string table in OB. Then put the index into BP. When PERSISTENT is set, the string S is supposed to not change during duration of the OB and thus OB can keep pointer into it.
References bp_pack_var_len_unsigned(), string_slot::len, string_slot::s, and streamer_string_index().
void lto_append_block | ( | struct lto_output_stream * | obs | ) |
Routines for saving various data types to a file stream. This deals with various data types like strings, integers, enums, etc. Copyright (C) 2011-2024 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@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/>.
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, gcc_assert, lto_output_stream::left_in_block, NULL, and lto_char_ptr_base::ptr.
Referenced by streamer_write_char_stream(), streamer_write_data_stream(), streamer_write_hwi_stream(), and streamer_write_uhwi_stream().
|
static |
Return index used to reference STRING of LEN characters in the string table in OB. The string might or might not include a trailing '\0'. Then put the index onto the INDEX_STREAM. When PERSISTENT is set, the string S is supposed to not change during duration of the OB and thus OB can keep pointer into it.
References hash_table< Descriptor, Lazy, Allocator >::find_slot(), string_slot::len, NULL, output_block::obstack, string_slot::s, string_slot::slot_num, streamer_write_data_stream(), streamer_write_uhwi_stream(), output_block::string_hash_table, output_block::string_stream, and lto_output_stream::total_size.
Referenced by bp_pack_string(), bp_pack_string_with_length(), and streamer_write_string_with_length().
void streamer_write_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 lto_output_stream::current_pointer, lto_output_stream::left_in_block, string_slot::len, lto_append_block(), and lto_output_stream::total_size.
Referenced by lto_output_node(), lto_output_varpool_node(), and streamer_string_index().
void streamer_write_gcov_count | ( | struct output_block * | ob, |
gcov_type | work ) |
Write a gcov counter value WORK to OB->main_stream.
References output_block::main_stream, and streamer_write_gcov_count_stream().
Referenced by profile_count::stream_out(), and stream_out_histogram_value().
void streamer_write_gcov_count_stream | ( | struct lto_output_stream * | obs, |
gcov_type | work ) |
Write a GCOV counter value WORK to OBS.
References gcc_assert, and streamer_write_hwi_stream().
Referenced by ipa_profile_write_summary(), output_profile_summary(), output_refs(), profile_count::stream_out(), and streamer_write_gcov_count().
void streamer_write_hwi | ( | struct output_block * | ob, |
HOST_WIDE_INT | work ) |
Write a HOST_WIDE_INT value WORK to OB->main_stream.
References output_block::main_stream, and streamer_write_hwi_stream().
Referenced by ipa_fn_summary_write(), ipa_write_indirect_edge_info(), ipa_write_node_info(), lto_output_toplevel_asms(), output_bb(), output_cfg(), output_eh_lp(), output_eh_region(), output_eh_regions(), output_gimple_stmt(), output_node_opt_summary(), output_struct_function_base(), ipa_polymorphic_call_context::stream_out(), modref_access_node::stream_out(), sreal::stream_out(), stream_out_histogram_value(), stream_write_tree_ref(), streamer_write_integer_cst(), streamer_write_tree_header(), streamer_write_wide_int(), and streamer_write_widest_int().
void streamer_write_hwi_stream | ( | struct lto_output_stream * | obs, |
HOST_WIDE_INT | work ) |
Write a HOST_WIDE_INT value WORK to OBS.
References lto_output_stream::current_pointer, lto_output_stream::left_in_block, lto_append_block(), and lto_output_stream::total_size.
Referenced by ipa_profile_write_edge_summary(), lto_output_edge(), lto_output_node(), lto_output_ref(), lto_output_varpool_node(), omp_lto_output_declare_variant_alt(), output_offload_tables(), stream_out_bitmap(), streamer_write_gcov_count_stream(), streamer_write_hwi(), and streamer_write_poly_int64().
void streamer_write_poly_int64 | ( | struct output_block * | ob, |
poly_int64 | work ) |
Write a poly_int64 value WORK to OB->main_stream.
References poly_int< N, C >::coeffs, i, output_block::main_stream, NUM_POLY_INT_COEFFS, and streamer_write_hwi_stream().
Referenced by modref_access_node::stream_out().
void streamer_write_poly_uint64 | ( | struct output_block * | ob, |
poly_uint64 | work ) |
Write a poly_uint64 value WORK to OB->main_stream.
References poly_int< N, C >::coeffs, i, output_block::main_stream, NUM_POLY_INT_COEFFS, and streamer_write_uhwi_stream().
void streamer_write_real_value | ( | struct output_block * | ob, |
const REAL_VALUE_TYPE * | r ) |
Write REAL_VALUE_TYPE into OB.
References bitpack_create(), bp_pack_real_value(), output_block::main_stream, r, and streamer_write_bitpack().
void streamer_write_string | ( | struct output_block * | ob, |
struct lto_output_stream * | index_stream, | ||
const char * | string, | ||
bool | persistent ) |
Output the '\0' terminated STRING to the string table in OB. Then put the index onto the INDEX_STREAM. When PERSISTENT is set, the string S is supposed to not change during duration of the OB and thus OB can keep pointer into it.
References streamer_write_char_stream(), and streamer_write_string_with_length().
Referenced by ipa_odr_summary_write(), lto_write_tree_1(), and output_gimple_stmt().
void streamer_write_string_with_length | ( | struct output_block * | ob, |
struct lto_output_stream * | index_stream, | ||
const char * | s, | ||
unsigned int | len, | ||
bool | persistent ) |
Output STRING of LEN characters to the string table in OB. The string might or might not include a trailing '\0'. Then put the index onto the INDEX_STREAM. When PERSISTENT is set, the string S is supposed to not change during duration of the OB and thus OB can keep pointer into it.
References string_slot::len, string_slot::s, streamer_string_index(), streamer_write_char_stream(), and streamer_write_uhwi_stream().
Referenced by streamer_write_string(), streamer_write_string_cst(), streamer_write_tree_header(), and write_identifier().
void streamer_write_uhwi | ( | struct output_block * | ob, |
unsigned HOST_WIDE_INT | work ) |
Write an unsigned HOST_WIDE_INT value WORK to OB->main_stream.
References output_block::main_stream, and streamer_write_uhwi_stream().
Referenced by DFS::DFS(), ipa_fn_summary_write(), ipa_odr_summary_write(), ipa_prop_write_jump_functions(), ipa_write_jump_function(), ipa_write_node_info(), ipcp_write_transformation_summaries(), lto_output_tree(), lto_write_tree_1(), output_bb(), output_cfg(), output_cgraph_opt_summary(), output_eh_region(), output_function(), output_gimple_stmt(), output_node_opt_summary(), output_phi(), output_ssa_names(), output_struct_function_base(), ipa_predicate::stream_out(), modref_access_node::stream_out(), profile_count::stream_out(), profile_probability::stream_out(), stream_out_histogram_value(), streamer_write_integer_cst(), streamer_write_tree_header(), streamer_write_wide_int(), streamer_write_widest_int(), write_ipa_call_summary(), write_ipcp_transformation_info(), and ipa_icf::sem_item_optimizer::write_summary().
void streamer_write_uhwi_stream | ( | struct lto_output_stream * | obs, |
unsigned HOST_WIDE_INT | work ) |
Write an unsigned HOST_WIDE_INT value WORK to OBS.
References lto_output_stream::current_pointer, lto_output_stream::left_in_block, lto_append_block(), and lto_output_stream::total_size.
Referenced by bp_pack_value(), ipa_profile_write_summary(), ipa_reference_write_optimization_summary(), lto_output_fn_decl_ref(), lto_output_var_decl_ref(), output_offload_tables(), output_profile_summary(), output_refs(), output_symtab(), pure_const_write_summary(), profile_count::stream_out(), profile_probability::stream_out(), thunk_info::stream_out(), streamer_string_index(), streamer_write_bitpack(), streamer_write_hwi_in_range(), streamer_write_poly_uint64(), streamer_write_string_with_length(), streamer_write_uhwi(), and ipa_icf::sem_item_optimizer::write_summary().
void streamer_write_vrange | ( | struct output_block * | ob, |
const vrange & | v ) |
Referenced by ipa_vr::streamer_write().
void streamer_write_wide_int | ( | struct output_block * | ob, |
const wide_int & | val ) |
Emit the physical representation of wide_int VAL to output block OB.
References generic_wide_int< storage >::elt(), wide_int_storage::get_len(), wide_int_storage::get_precision(), i, string_slot::len, streamer_write_hwi(), and streamer_write_uhwi().
Referenced by ipa_odr_summary_write().
void streamer_write_widest_int | ( | struct output_block * | ob, |
const widest_int & | w ) |
Emit the physical representation of widest_int W to output block OB.
References generic_wide_int< storage >::elt(), widest_int_storage< N >::get_len(), widest_int_storage< N >::get_precision(), i, string_slot::len, streamer_write_hwi(), and streamer_write_uhwi().
Referenced by output_cfg().
void streamer_write_zero | ( | struct output_block * | ob | ) |
Write a zero to the output stream.
References output_block::main_stream, and streamer_write_char_stream().
Referenced by output_eh_lp(), output_eh_region(), output_ssa_names(), and stream_write_tree_ref().