GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | bitpack_d |
Typedefs | |
typedef unsigned HOST_WIDE_INT | bitpack_word_t |
Variables | |
static unsigned const | BITS_PER_BITPACK_WORD = HOST_BITS_PER_WIDE_INT |
typedef unsigned HOST_WIDE_INT bitpack_word_t |
|
staticread |
Returns a new bit-packing context for bit-packing into S.
References bitpack_d::pos, bitpack_d::stream, and bitpack_d::word.
Referenced by inline_write_summary(), ipa_write_indirect_edge_info(), ipa_write_jump_function(), ipa_write_node_info(), lto_output_edge(), lto_output_node(), lto_output_ref(), lto_output_varpool_node(), lto_write_tree_1(), output_eh_region(), output_gimple_stmt(), output_node_opt_summary(), output_phi(), output_profile_summary(), output_struct_function_base(), pure_const_write_summary(), stream_out_histogram_value(), and write_agg_replacement_chain().
|
inlinestatic |
Output VAL into BP and verify it is in range MIN...MAX that is supposed to be compile time constant. Be host independent, limit range to 31bits.
References bp_pack_value(), floor_log2(), and HOST_WIDE_INT.
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(), streamer_string_index(), and strlen().
Referenced by 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(), and streamer_string_index().
|
inlinestatic |
Pack the NBITS bit sized value VAL into the bit-packing context BP.
References BITS_PER_BITPACK_WORD, bitpack_d::pos, bitpack_d::stream, streamer_write_uhwi_stream(), and bitpack_d::word.
Referenced by bp_pack_int_in_range(), bp_pack_var_len_int(), bp_pack_var_len_unsigned(), inline_write_summary(), ipa_write_indirect_edge_info(), ipa_write_jump_function(), ipa_write_node_info(), lto_output_edge(), lto_output_location(), lto_output_node(), lto_output_ref(), lto_output_varpool_node(), output_gimple_stmt(), output_node_opt_summary(), output_profile_summary(), output_struct_function_base(), pack_ts_base_value_fields(), pack_ts_block_value_fields(), pack_ts_decl_common_value_fields(), pack_ts_decl_with_vis_value_fields(), pack_ts_decl_wrtl_value_fields(), pack_ts_function_decl_value_fields(), pack_ts_optimization(), pack_ts_real_cst_value_fields(), pack_ts_target_option(), pack_ts_type_common_value_fields(), pure_const_write_summary(), stream_out_histogram_value(), and write_agg_replacement_chain().
void bp_pack_var_len_int | ( | struct bitpack_d * | , |
HOST_WIDE_INT | |||
) |
void bp_pack_var_len_unsigned | ( | struct bitpack_d * | , |
unsigned | HOST_WIDE_INT | ||
) |
In data-streamer.c
const char* bp_unpack_indexed_string | ( | struct data_in * | data_in, |
struct bitpack_d * | bp, | ||
unsigned int * | rlen | ||
) |
Read a string from the string table in DATA_IN using the bitpack BP. Write the length to RLEN.
References bp_unpack_var_len_unsigned(), and string_for_index().
Referenced by bp_unpack_string().
|
inlinestatic |
Input VAL into BP and verify it is in range MIN...MAX that is supposed to be compile time constant. PURPOSE is used for error reporting.
References bp_unpack_value(), floor_log2(), HOST_WIDE_INT, and lto_value_range_error().
|
inlinestatic |
Unpacks NBITS bits from the bit-packing context BP and returns them.
References BITS_PER_BITPACK_WORD, bitpack_d::pos, bitpack_d::stream, streamer_read_uhwi(), and bitpack_d::word.
Referenced by bp_unpack_int_in_range(), bp_unpack_var_len_int(), bp_unpack_var_len_unsigned(), inline_read_section(), input_edge(), input_gimple_stmt(), input_node_opt_summary(), input_overwrite_node(), input_profile_summary(), input_ref(), input_struct_function_base(), input_varpool_node(), ipa_read_indirect_edge_info(), ipa_read_jump_function(), ipa_read_node_info(), lto_input_location(), pure_const_read_summary(), read_agg_replacement_chain(), stream_in_histogram_value(), streamer_read_tree_bitfields(), unpack_ts_base_value_fields(), unpack_ts_block_value_fields(), unpack_ts_decl_common_value_fields(), unpack_ts_decl_with_vis_value_fields(), unpack_ts_decl_wrtl_value_fields(), unpack_ts_function_decl_value_fields(), unpack_ts_optimization(), unpack_ts_real_cst_value_fields(), unpack_ts_target_option(), and unpack_ts_type_common_value_fields().
HOST_WIDE_INT bp_unpack_var_len_int | ( | struct bitpack_d * | ) |
unsigned HOST_WIDE_INT bp_unpack_var_len_unsigned | ( | struct bitpack_d * | ) |
|
staticread |
Returns a new bit-packing context for bit-unpacking from IB.
References bitpack_d::pos, bitpack_d::stream, streamer_read_uhwi(), and bitpack_d::word.
Referenced by inline_read_section(), input_edge(), input_eh_region(), input_gimple_stmt(), input_node(), input_node_opt_summary(), input_phi(), input_profile_summary(), input_ref(), input_struct_function_base(), input_varpool_node(), ipa_read_indirect_edge_info(), ipa_read_jump_function(), ipa_read_node_info(), pure_const_read_summary(), read_agg_replacement_chain(), stream_in_histogram_value(), and streamer_read_tree_bitfields().
gcov_type streamer_read_gcov_count | ( | struct lto_input_block * | ) |
HOST_WIDE_INT streamer_read_hwi | ( | struct lto_input_block * | ) |
|
inlinestatic |
Input VAL into OBS and verify it is in range MIN...MAX that is supposed to be compile time constant. PURPOSE is used for error reporting.
References HOST_WIDE_INT, lto_value_range_error(), and streamer_read_uhwi().
const char* streamer_read_indexed_string | ( | struct data_in * | data_in, |
struct lto_input_block * | ib, | ||
unsigned int * | rlen | ||
) |
Read a string from the string table in DATA_IN using input block IB. Write the length to RLEN.
References streamer_read_uhwi(), and string_for_index().
Referenced by input_identifier(), streamer_read_string(), and streamer_read_string_cst().
|
inlinestatic |
Return the next tag in the input block IB.
References LTO_NUM_TAGS.
Referenced by input_bb(), input_eh_lp(), input_eh_region(), input_eh_regions(), input_function(), lto_input_eh_catch_list(), lto_input_scc(), and lto_input_tree().
const char* streamer_read_string | ( | struct data_in * | , |
struct lto_input_block * | |||
) |
|
inlinestatic |
Read byte from the input block.
References lto_input_block::data, lto_input_block::len, lto_section_overrun(), and lto_input_block::p.
Referenced by input_eh_regions(), input_ssa_names(), lto_input_data_block(), lto_input_scc(), lto_read_tree(), and streamer_read_hwi().
unsigned HOST_WIDE_INT streamer_read_uhwi | ( | struct lto_input_block * | ) |
unsigned streamer_string_index | ( | struct output_block * | ob, |
const char * | s, | ||
unsigned int | len, | ||
bool | persistent | ||
) |
@verbatim Routines for saving various data types to a file stream. This deals
with various data types like strings, integers, enums, etc.
Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi llo@ 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/.
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, Allocator >::find_slot(), len, string_slot::len, lto_output_data_stream(), memcpy(), output_block::obstack, string_slot::s, string_slot::slot_num, 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(), lto_output_location(), and streamer_write_string_with_length().
|
inlinestatic |
Finishes bit-packing of BP.
References bitpack_d::pos, bitpack_d::stream, streamer_write_uhwi_stream(), and bitpack_d::word.
Referenced by inline_write_summary(), ipa_write_indirect_edge_info(), ipa_write_jump_function(), ipa_write_node_info(), lto_output_edge(), lto_output_node(), lto_output_ref(), lto_output_varpool_node(), lto_write_tree_1(), output_eh_region(), output_gimple_stmt(), output_node_opt_summary(), output_phi(), output_profile_summary(), output_struct_function_base(), pure_const_write_summary(), stream_out_histogram_value(), and write_agg_replacement_chain().
|
inlinestatic |
Write a character to the output block.
References lto_output_stream::current_pointer, lto_output_stream::left_in_block, lto_append_block(), and lto_output_stream::total_size.
Referenced by inline_write_summary(), ipa_prop_write_all_agg_replacement(), ipa_prop_write_jump_functions(), lto_output_toplevel_asms(), output_eh_regions(), output_function(), output_ssa_names(), produce_asm_for_decls(), streamer_write_string(), streamer_write_string_with_length(), and streamer_write_zero().
void streamer_write_gcov_count | ( | struct output_block * | , |
gcov_type | |||
) |
void streamer_write_gcov_count_stream | ( | struct lto_output_stream * | , |
gcov_type | |||
) |
void streamer_write_hwi | ( | struct output_block * | , |
HOST_WIDE_INT | |||
) |
|
inlinestatic |
Output VAL into OBS and verify it is in range MIN...MAX that is supposed to be compile time constant. Be host independent, limit range to 31bits.
References HOST_WIDE_INT, and streamer_write_uhwi_stream().
void streamer_write_hwi_stream | ( | struct lto_output_stream * | , |
HOST_WIDE_INT | |||
) |
|
inlinestatic |
Output the start of a record with TAG to output block OB.
References LTO_NUM_TAGS, and output_block::main_stream.
Referenced by DFS_write_tree(), lto_output_tree(), lto_output_tree_ref(), output_bb(), output_eh_lp(), output_eh_region(), output_eh_regions(), output_eh_try_list(), output_function(), output_gimple_stmt(), output_phi(), output_type_ref(), streamer_write_builtin(), streamer_write_integer_cst(), and streamer_write_tree_header().
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(), streamer_write_string_with_length(), and strlen().
Referenced by output_gimple_stmt(), and streamer_write_builtin().
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 streamer_string_index(), streamer_write_char_stream(), and streamer_write_uhwi_stream().
Referenced by streamer_write_string(), streamer_write_string_cst(), and write_identifier().
void streamer_write_uhwi | ( | struct output_block * | , |
unsigned | HOST_WIDE_INT | ||
) |
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_decl_index(), lto_output_node(), output_profile_summary(), output_refs(), output_symtab(), pure_const_write_summary(), streamer_string_index(), streamer_write_bitpack(), streamer_write_hwi_in_range(), streamer_write_string_with_length(), and streamer_write_uhwi().
void streamer_write_zero | ( | struct output_block * | ) |
In data-streamer-out.c
const char* string_for_index | ( | struct data_in * | , |
unsigned | int, | ||
unsigned int * | |||
) |
In data-streamer-in.c
|
static |
Data structures used to pack values and bitflags into a vector of words. Used to stream values of a fixed number of bits in a space efficient way.
Referenced by bp_pack_value(), and bp_unpack_value().