GCC Middle and Back End API Reference
|
Public Member Functions | |
~autofdo_source_profile () | |
function_instance * | get_function_instance_by_decl (tree decl) const |
bool | get_count_info (gimple *stmt, count_info *info) const |
gcov_type | get_callsite_total_count (struct cgraph_edge *edge) const |
bool | update_inlined_ind_target (gcall *stmt, count_info *info) |
void | mark_annotated (location_t loc) |
Static Public Member Functions | |
static autofdo_source_profile * | create () |
Private Types | |
typedef std::map< unsigned, function_instance * > | name_function_instance_map |
Private Member Functions | |
autofdo_source_profile () | |
bool | read () |
function_instance * | get_function_instance_by_inline_stack (const inline_stack &stack) const |
Private Attributes | |
name_function_instance_map | map_ |
Profile for all functions.
|
private |
autofdo::autofdo_source_profile::~autofdo_source_profile | ( | ) |
Member functions for autofdo_source_profile.
References map_.
|
inlineprivate |
Referenced by create().
|
inlinestatic |
References autofdo_source_profile(), map, and NULL.
Referenced by autofdo::read_profile().
gcov_type autofdo::autofdo_source_profile::get_callsite_total_count | ( | struct cgraph_edge * | edge | ) | const |
Find total count of the callee of EDGE.
References autofdo::afdo_string_table, DECL_ASSEMBLER_NAME, get_function_instance_by_inline_stack(), autofdo::string_table::get_index(), autofdo::get_inline_stack(), gimple_location(), IDENTIFIER_POINTER, autofdo::function_instance::name(), NULL, and autofdo::function_instance::total_count().
Referenced by afdo_callsite_hot_enough_for_early_inline().
bool autofdo::autofdo_source_profile::get_count_info | ( | gimple * | stmt, |
count_info * | info ) const |
Find count_info for a given gimple STMT. If found, store the count_info in INFO and return true; otherwise return false.
References cfun, autofdo::function_instance::get_count_info(), get_function_instance_by_inline_stack(), autofdo::get_inline_stack(), gimple_location(), LOCATION_LOCUS, and NULL.
Referenced by autofdo::afdo_set_bb_count(), autofdo::afdo_vpt_for_early_inline(), and update_inlined_ind_target().
function_instance * autofdo::autofdo_source_profile::get_function_instance_by_decl | ( | tree | decl | ) | const |
For a given DECL, returns the top-level function_instance.
References autofdo::afdo_string_table, autofdo::string_table::get_index_by_decl(), map_, and NULL.
Referenced by autofdo::afdo_annotate_cfg(), and autofdo::afdo_vpt_for_early_inline().
|
private |
Return the function_instance in the profile that correspond to the inline STACK.
References autofdo::afdo_string_table, autofdo::function_instance::get_function_instance_by_decl(), autofdo::string_table::get_index_by_decl(), i, map_, and NULL.
Referenced by get_callsite_total_count(), get_count_info(), mark_annotated(), and update_inlined_ind_target().
void autofdo::autofdo_source_profile::mark_annotated | ( | location_t | loc | ) |
Mark LOC as annotated.
References get_function_instance_by_inline_stack(), autofdo::get_inline_stack(), autofdo::function_instance::mark_annotated(), and NULL.
Referenced by autofdo::afdo_annotate_cfg(), and autofdo::afdo_set_bb_count().
|
private |
Read AutoFDO profile and returns TRUE on success.
source profile format: GCOV_TAG_AFDO_FUNCTION: 4 bytes LENGTH: 4 bytes NUM_FUNCTIONS: 4 bytes FUNCTION_INSTANCE_1 FUNCTION_INSTANCE_2 ... FUNCTION_INSTANCE_N.
References gcov_read_counter(), gcov_read_unsigned(), GCOV_TAG_AFDO_FUNCTION, i, inform(), map_, autofdo::function_instance::name(), autofdo::function_instance::read_function_instance(), and UNKNOWN_LOCATION.
bool autofdo::autofdo_source_profile::update_inlined_ind_target | ( | gcall * | stmt, |
count_info * | info ) |
Update value profile INFO for STMT from the inlined indirect callsite. Return true if INFO is updated.
References cfun, autofdo::count_info::count, dump_file, autofdo::function_instance::find_icall_target_map(), get_count_info(), get_function_instance_by_inline_stack(), autofdo::get_inline_stack(), gimple_location(), LOCATION_LOCUS, map, NULL, print_gimple_stmt(), autofdo::count_info::targets, and TDF_SLIM.
Referenced by autofdo::afdo_vpt_for_early_inline().
|
private |