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 |
function_summary () | |
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 ) |
References function_summary(), function_summary_base< T >::function_summary_base(), m_ggc, m_map, MEM_STAT_DECL, PASS_MEM_STAT, symtab, symtab_duplication(), symtab_insertion(), symtab_removal(), T, and true.
Referenced by function_summary(), symtab_duplication(), symtab_insertion(), symtab_removal(), and ~function_summary().
|
virtual |
|
private |
|
inlineprotectedinherited |
References ggc_internal_alloc(), is_ggc(), m_allocator, and T.
Referenced by fast_function_summary< T *, V >::get_create(), and function_summary< T * >::get_create().
|
inlineinherited |
References m_symtab, m_symtab_duplication_hook, and NULL.
Referenced by unregister_hooks().
|
inlineinherited |
References m_symtab, m_symtab_insertion_hook, and NULL.
Referenced by unregister_hooks().
|
inlinevirtualinherited |
References gcc_unreachable, and T.
Referenced by fast_function_summary< T *, V >::symtab_duplication().
|
inlineinherited |
References m_symtab, m_symtab_duplication, m_symtab_duplication_hook, and NULL.
Referenced by function_summary_base().
|
inlineinherited |
References m_symtab, m_symtab_insertion, m_symtab_insertion_hook, and NULL.
Referenced by function_summary_base().
|
inline |
References symtab_node::get_uid(), m_map, and NULL.
|
inline |
|
inline |
References function_summary_base< T >::allocate_new(), symtab_node::get_uid(), m_map, and T.
|
inlinevirtualinherited |
References gcc_unreachable, and T.
|
inlinefinaloverrideprivatevirtual |
Implements function_summary_base< T >.
|
inlineprotectedinherited |
|
inline |
References symtab_node::get_uid(), m_map, function_summary_base< T >::release(), and T.
|
inlinevirtualinherited |
References T.
|
static |
References function_summary(), and T.
Referenced by function_summary().
|
static |
References function_summary(), gcc_checking_assert, and symtab_node::get_uid().
Referenced by function_summary().
|
static |
References function_summary(), gcc_checking_assert, and symtab_node::get_uid().
Referenced by function_summary().
|
inline |
|
protectedinherited |
|
friend |
|
privateinherited |
Referenced by allocate_new(), function_summary_base(), and release().
|
protected |
Referenced by function_summary(), and is_ggc().
Referenced by exists(), function_summary(), get(), get_create(), remove(), traverse(), and ~function_summary().
|
protectedinherited |
|
protectedinherited |
Referenced by enable_duplication_hook(), and function_summary_base().
|
protectedinherited |
Referenced by disable_duplication_hook(), enable_duplication_hook(), and function_summary_base().
|
protectedinherited |
Referenced by enable_insertion_hook(), and function_summary_base().
|
protectedinherited |
Referenced by disable_insertion_hook(), enable_insertion_hook(), and function_summary_base().
|
protectedinherited |
Referenced by function_summary_base().
|
protectedinherited |
Referenced by function_summary_base(), and unregister_hooks().