GCC Middle and Back End API Reference
|
Data Structures | |
struct | lto_buffer |
struct | lto_data_header |
struct | lto_renaming_slot |
Variables | |
const char * | lto_section_name [LTO_N_SECTION_TYPES] |
static struct lto_file_decl_data ** | file_decl_data |
static lto_get_section_data_f * | get_section_f |
static lto_free_section_data_f * | free_section_f |
|
static |
Returns nonzero if P1 and P2 are equal.
References lto_renaming_slot::new_name.
Referenced by lto_create_renaming_table().
|
static |
Returns a hash code for P.
References lto_renaming_slot::new_name.
Referenced by lto_create_renaming_table().
|
static |
Compression callback, append LENGTH bytes from DATA to the buffer pointed to by OPAQUE.
References buffer, lto_buffer::data, lto_buffer::length, and memcpy().
Referenced by lto_get_section_data().
htab_t lto_create_renaming_table | ( | void | ) |
Create an empty hash table for recording declaration renamings.
References eq_name(), hash_name(), and renaming_slot_free().
|
read |
Load a section of type SECTION_TYPE from FILE_DATA, parse the header and then return an input block pointing to the section. The raw pointer to the section is returned in DATAR and LEN. These are used to free the section. Return NULL if the section is not present.
References lto_get_section_data(), and lto_simple_header::main_size.
Referenced by input_symtab(), ipa_profile_read_summary(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().
void lto_delete_in_decl_state | ( | ) |
Delete STATE and its components.
References ggc_free(), LTO_N_DECL_STREAMS, lto_in_decl_state::streams, and lto_tree_ref_table::trees.
void lto_destroy_simple_input_block | ( | struct lto_file_decl_data * | file_data, |
enum lto_section_type | section_type, | ||
struct lto_input_block * | ib, | ||
const char * | data, | ||
size_t | len | ||
) |
Close the section returned from a call to LTO_CREATE_SIMPLE_INPUT_BLOCK. IB is the input block returned from that call. The FILE_DATA and SECTION_TYPE are the same as what was passed to that call and the DATA and LEN are what was returned from that call.
References free(), and lto_free_section_data().
Referenced by input_symtab(), ipa_profile_read_summary(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().
int lto_eq_in_decl_state | ( | ) |
Return true if the fn_decl field of the lto_in_decl_state pointed to by P1 equals to the function decl P2.
References lto_in_decl_state::fn_decl.
void lto_free_section_data | ( | struct lto_file_decl_data * | file_data, |
enum lto_section_type | section_type, | ||
const char * | name, | ||
const char * | data, | ||
size_t | len | ||
) |
Free the data found from the above call. The first three parameters are the same as above. DATA is the data to be freed and LEN is the length of that data.
References lto_data_header::data, free(), free_section_f, and lto_data_header::len.
Referenced by cgraph_get_body(), copy_function(), inline_read_section(), input_cgraph_opt_section(), ipa_prop_read_section(), lto_destroy_simple_input_block(), lto_input_toplevel_asms(), and read_replacements_section().
const char* lto_get_decl_name_mapping | ( | struct lto_file_decl_data * | decl_data, |
const char * | name | ||
) |
Given a string NAME, return the string that it has been mapped to by lto_record_renamed_decl. If NAME was not renamed, it is returned unchanged. DECL_DATA holds the renaming hash table to use.
References lto_renaming_slot::new_name, lto_renaming_slot::old_name, and lto_file_decl_data::renaming_hash_table.
Referenced by cgraph_get_body(), and copy_function().
|
read |
Return an array of file decl datas for all of the files passed to this compilation.
References file_decl_data.
Referenced by inline_read_summary(), input_cgraph_opt_summary(), input_symtab(), ipa_profile_read_summary(), ipa_prop_read_all_agg_replacement(), ipa_prop_read_jump_functions(), ipa_reference_read_optimization_summary(), and pure_const_read_summary().
|
read |
Search the in-decl state of a function FUNC contained in the file associated with FILE_DATA. Return NULL if not found.
References lto_in_decl_state::fn_decl, and lto_file_decl_data::function_decl_states.
Referenced by copy_function(), and lto_read_body().
const char* lto_get_section_data | ( | struct lto_file_decl_data * | file_data, |
enum lto_section_type | section_type, | ||
const char * | name, | ||
size_t * | len | ||
) |
Return a char pointer to the start of a data stream for an LTO pass or function. FILE_DATA indicates where to obtain the data. SECTION_TYPE is the type of information to be obtained. NAME is the name of the function and is only used when finding a function body; otherwise it is NULL. LEN is the size of the data returned.
References lto_buffer::data, lto_data_header::data, get_section_f, lto_data_header::len, len, lto_buffer::length, lto_append_data(), lto_end_uncompression(), lto_start_uncompression(), lto_stats, lto_uncompress_block(), and lto_stats_d::section_size.
Referenced by cgraph_get_body(), copy_function(), inline_read_summary(), input_cgraph_opt_summary(), ipa_prop_read_all_agg_replacement(), ipa_prop_read_jump_functions(), lto_create_simple_input_block(), and lto_input_toplevel_asms().
hashval_t lto_hash_in_decl_state | ( | ) |
Hashtable helpers. lto_in_decl_states are hash by their function decls.
References lto_in_decl_state::fn_decl.
|
read |
Input decl state object.
Return a newly created in-decl state object.
void lto_record_renamed_decl | ( | struct lto_file_decl_data * | decl_data, |
const char * | old_name, | ||
const char * | new_name | ||
) |
Record a declaration name mapping OLD_NAME -> NEW_NAME. DECL_DATA holds the renaming hash table to use.
References lto_renaming_slot::new_name, lto_renaming_slot::old_name, and lto_file_decl_data::renaming_hash_table.
void lto_section_overrun | ( | ) |
Report read pass end of the section.
References fatal_error(), lto_input_block::len, and lto_input_block::p.
Referenced by streamer_read_uchar(), and streamer_read_uhwi().
void lto_set_in_hooks | ( | struct lto_file_decl_data ** | data, |
lto_get_section_data_f * | get_f, | ||
lto_free_section_data_f * | free_f | ||
) |
This is called from the lto front end to set up the hooks that are used by the ipa passes to get the data that they will deserialize.
References free_section_f, and get_section_f.
void lto_value_range_error | ( | const char * | purpose, |
HOST_WIDE_INT | val, | ||
HOST_WIDE_INT | min, | ||
HOST_WIDE_INT | max | ||
) |
Report out of range value.
References fatal_error().
Referenced by bp_unpack_int_in_range(), and streamer_read_hwi_in_range().
|
static |
Free a renaming table entry.
References free(), lto_renaming_slot::new_name, and lto_renaming_slot::old_name.
Referenced by lto_create_renaming_table().
|
static |
Hooks so that the ipa passes can call into the lto front end to get sections.
Referenced by lto_get_file_decl_data().
|
static |
Referenced by lto_free_section_data(), and lto_set_in_hooks().
|
static |
Referenced by lto_get_section_data(), and lto_set_in_hooks().
const char* lto_section_name[LTO_N_SECTION_TYPES] |
@verbatim Input functions for reading 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/.
Section names. These must correspond to the values of enum lto_section_type.
Referenced by lto_get_section_name(), and print_lto_report().