GCC Middle and Back End API Reference
autofdo::autofdo_source_profile Class Reference
Collaboration diagram for autofdo::autofdo_source_profile:

Public Member Functions

 ~autofdo_source_profile ()
function_instanceget_function_instance_by_decl (tree decl) const
function_instanceget_function_instance_by_name_index (int) const
void add_function_instance (function_instance *)
bool get_count_info (gimple *stmt, count_info *info, cgraph_node *node=NULL) const
bool get_count_info (location_t gimple_loc, count_info *info, cgraph_node *node=NULL) const
gcov_type get_callsite_total_count (struct cgraph_edge *edge) const
bool update_inlined_ind_target (gcall *stmt, count_info *info, cgraph_node *node)
void remove_icall_target (cgraph_edge *e)
void offline_external_functions ()
void offline_unrealized_inlines ()

Static Public Member Functions

static autofdo_source_profilecreate ()

Private Types

typedef std::map< unsigned, function_instance * > name_function_instance_map

Private Member Functions

 autofdo_source_profile ()
bool read ()
function_instanceget_function_instance_by_inline_stack (const inline_stack &stack) const

Private Attributes

name_function_instance_map map_
auto_vec< function_instance * > duplicate_functions_

Detailed Description

Profile for all functions.

Member Typedef Documentation

◆ name_function_instance_map

Constructor & Destructor Documentation

◆ ~autofdo_source_profile()

autofdo::autofdo_source_profile::~autofdo_source_profile ( )
Member functions for autofdo_source_profile.

References map_.

◆ autofdo_source_profile()

autofdo::autofdo_source_profile::autofdo_source_profile ( )
inlineprivate

Referenced by create().

Member Function Documentation

◆ add_function_instance()

void autofdo::autofdo_source_profile::add_function_instance ( function_instance * fn)
Add function instance FN.

References gcc_checking_assert, map_, and autofdo::function_instance::name().

◆ create()

autofdo_source_profile * autofdo::autofdo_source_profile::create ( )
inlinestatic

References autofdo_source_profile(), map, and NULL.

Referenced by autofdo::read_profile().

◆ get_callsite_total_count()

◆ get_count_info() [1/2]

bool autofdo::autofdo_source_profile::get_count_info ( gimple * stmt,
count_info * info,
cgraph_node * node = NULL ) const
Find count_info for a given gimple STMT. If found, store the count_info in INFO and return true; otherwise return false.

References get_count_info(), and gimple_location().

Referenced by get_count_info(), and update_inlined_ind_target().

◆ get_count_info() [2/2]

bool autofdo::autofdo_source_profile::get_count_info ( location_t gimple_loc,
count_info * info,
cgraph_node * node = NULL ) const

◆ get_function_instance_by_decl()

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, map_, and NULL.

◆ get_function_instance_by_inline_stack()

function_instance * autofdo::autofdo_source_profile::get_function_instance_by_inline_stack ( const inline_stack & stack) const
private

◆ get_function_instance_by_name_index()

function_instance * autofdo::autofdo_source_profile::get_function_instance_by_name_index ( int name_index) const
For a given NAME_INDEX, returns the top-level function_instance.

References map_, and NULL.

◆ offline_external_functions()

◆ offline_unrealized_inlines()

◆ read()

bool autofdo::autofdo_source_profile::read ( )
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 autofdo::afdo_count_scale, afdo_hot_bb_threshod, autofdo::afdo_profile_info, autofdo::afdo_source_profile, autofdo::afdo_string_table, dump_file, fatal_error(), gcc_checking_assert, gcov_read_counter(), gcov_read_unsigned(), GCOV_TAG_AFDO_FUNCTION, i, inform(), map_, MAX, profile_count::max_count, profile_count::n_bits, PRIu64, autofdo::function_instance::read_function_instance(), set_hot_bb_threshold(), and UNKNOWN_LOCATION.

◆ remove_icall_target()

void autofdo::autofdo_source_profile::remove_icall_target ( cgraph_edge * e)

◆ update_inlined_ind_target()

bool autofdo::autofdo_source_profile::update_inlined_ind_target ( gcall * stmt,
count_info * info,
cgraph_node * node )

Field Documentation

◆ duplicate_functions_

auto_vec<function_instance *> autofdo::autofdo_source_profile::duplicate_functions_
private

◆ map_


The documentation for this class was generated from the following file: