GCC Middle and Back End API Reference
|
Public Member Functions | |
string_table () | |
~string_table () | |
int | get_index (const char *name) const |
int | get_index_by_decl (tree decl) const |
const char * | get_name (int index) const |
bool | read () |
Private Types | |
typedef std::map< const char *, unsigned, string_compare > | string_index_map |
Private Attributes | |
string_vector | vector_ |
string_index_map | map_ |
Store a string array, indexed by string position in the array.
|
private |
|
inline |
autofdo::string_table::~string_table | ( | ) |
Return the index of a given function NAME. Return -1 if NAME is not found in string table.
Referenced by autofdo::autofdo_source_profile::get_callsite_total_count(), autofdo::function_instance::get_function_instance_by_decl(), and get_index_by_decl().
int autofdo::string_table::get_index_by_decl | ( | tree | decl | ) | const |
Return the index of a given function DECL. Return -1 if DECL is not found in string table.
References DECL_ABSTRACT_ORIGIN, DECL_ASSEMBLER_NAME, DECL_FROM_INLINE, lang_hooks::dwarf_name, free(), get_index(), get_index_by_decl(), autofdo::get_original_name(), ggc_alloc(), and IDENTIFIER_POINTER.
Referenced by autofdo::autofdo_source_profile::get_function_instance_by_decl(), autofdo::function_instance::get_function_instance_by_decl(), autofdo::autofdo_source_profile::get_function_instance_by_inline_stack(), and get_index_by_decl().
Return the function name of a given INDEX.
References gcc_assert, and vector_.
Referenced by autofdo::afdo_indirect_call(), and autofdo::function_instance::find_icall_target_map().
bool autofdo::string_table::read | ( | ) |
Read the string table. Return TRUE if reading is successful.
References gcov_read_string(), gcov_read_unsigned(), GCOV_TAG_AFDO_FILE_NAMES, autofdo::get_original_name(), ggc_alloc(), i, map_, and vector_.
Referenced by autofdo::read_profile().
|
private |
Referenced by get_index(), and read().
|
private |
Referenced by get_name(), read(), and ~string_table().