GCC Middle and Back End API Reference
|
#include <symbol-summary.h>
Public Member Functions | |
function_summary (symbol_table *symtab, bool ggc=false CXX_MEM_STAT_INFO) | |
virtual | ~function_summary () |
template<typename Arg , bool(*)(const T &, Arg) f> | |
void | traverse (Arg a) const |
T * | get_create (cgraph_node *node) |
T * | get (cgraph_node *node) ATTRIBUTE_PURE |
void | remove (cgraph_node *node) |
bool | exists (cgraph_node *node) |
virtual void | insert (cgraph_node *, T *) |
virtual void | remove (cgraph_node *, T *) |
virtual void | duplicate (cgraph_node *, cgraph_node *, T *, T *) |
void | enable_insertion_hook () |
void | disable_insertion_hook () |
void | enable_duplication_hook () |
void | disable_duplication_hook () |
Static Public Member Functions | |
static void | symtab_insertion (cgraph_node *node, void *data) |
static void | symtab_removal (cgraph_node *node, void *data) |
static void | symtab_duplication (cgraph_node *node, cgraph_node *node2, void *data) |
Protected Member Functions | |
T * | allocate_new () |
void | release (T *item) |
void | unregister_hooks () |
Private Types | |
typedef int_hash< int, 0, -1 > | map_hash |
Private Member Functions | |
bool | is_ggc () final override |
Private Attributes | |
hash_map< map_hash, T * > | m_map |
object_allocator< T > | m_allocator |
Friends | |
template<typename U > | |
void | gt_ggc_mx (function_summary< U * > *const &) |
template<typename U > | |
void | gt_pch_nx (function_summary< U * > *const &) |
template<typename U > | |
void | gt_pch_nx (function_summary< U * > *const &, gt_pointer_operator, void *) |
Function summary is a helper class that is used to associate a data structure related to a callgraph node. Typical usage can be seen in IPA passes which create a temporary pass-related structures. The summary class registers hooks that are triggered when a new node is inserted, duplicated and deleted. A user of a summary class can ovewrite virtual methods than are triggered by the summary if such hook is triggered. Apart from a callgraph node, the user is given a data structure tied to the node. The function summary class can work both with a heap-allocated memory and a memory gained by garbage collected memory.
|
private |
function_summary< T * >::function_summary | ( | symbol_table * | symtab, |
bool ggc | MEM_STAT_DECL = false CXX_MEM_STAT_INFO ) |
|
virtual |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
References gcc_unreachable.
|
inlineinherited |
|
inlineinherited |
|
inline |
References cgraph_node::get_uid(), and NULL.
|
inline |
References NULL.
|
inline |
References cgraph_node::get_uid().
|
inlinevirtualinherited |
References gcc_unreachable.
|
inlinefinaloverrideprivatevirtual |
Implements function_summary_base< T >.
|
inlineprotectedinherited |
|
inline |
References cgraph_node::get_uid().
|
inlinevirtualinherited |
|
static |
|
static |
References gcc_checking_assert, and cgraph_node::get_uid().
|
static |
References gcc_checking_assert, and cgraph_node::get_uid().
|
inline |
References a.
|
protectedinherited |
|
friend |
|
privateinherited |
Referenced by function_summary_base< T >::allocate_new(), and function_summary_base< T >::release().
|
protected |
|
protectedinherited |
|
protectedinherited |
Referenced by function_summary_base< T >::enable_duplication_hook().
|
protectedinherited |
|
protectedinherited |
Referenced by function_summary_base< T >::enable_insertion_hook().
|
protectedinherited |
|
protectedinherited |
Referenced by function_summary_base< T >::function_summary_base().
|
protectedinherited |
Referenced by function_summary_base< T >::function_summary_base().