GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "stringpool.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include "tree-eh.h"
#include "tree-cfg.h"
#include "tree-inline.h"
#include "attribs.h"
#include "dumpfile.h"
#include "gimple-pretty-print.h"
#include "alloc-pool.h"
#include "symbol-summary.h"
#include "tree-vrp.h"
#include "sreal.h"
#include "ipa-cp.h"
#include "ipa-prop.h"
#include "ipa-fnsummary.h"
#include "symtab-thunks.h"
#include "symtab-clones.h"
#include "gt-cgraphclones.h"
Functions | |
static void | set_new_clone_decl_and_node_flags (cgraph_node *new_node) |
static cgraph_node * | duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node) |
void | dump_callgraph_transformation (const cgraph_node *original, const cgraph_node *clone, const char *suffix) |
static void | localize_profile (cgraph_node *n) |
tree | clone_function_name_numbered (const char *name, const char *suffix) |
tree | clone_function_name_numbered (tree decl, const char *suffix) |
tree | clone_function_name (const char *name, const char *suffix, unsigned long number) |
tree | clone_function_name (tree decl, const char *suffix, unsigned long number) |
tree | clone_function_name (tree decl, const char *suffix) |
static void | update_call_expr (cgraph_node *new_version) |
Variables | |
static hash_map< const char *, unsigned > * | clone_fn_ids |
tree clone_function_name | ( | const char * | name, |
const char * | suffix, | ||
unsigned long | number ) |
Return a new assembler name for a clone of decl named NAME. Apart from the string SUFFIX, the new name will end with the specified NUMBER. If clone numbering is not needed then the two argument clone_function_name should be used instead.
References ASM_FORMAT_PRIVATE_NAME, get_identifier(), and symbol_table::symbol_suffix_separator().
Referenced by clone_function_name(), clone_function_name_numbered(), create_dispatcher_calls(), create_target_clone(), cgraph_node::create_version_clone_with_body(), cgraph_node::create_virtual_clone(), expand_omp_target(), final_scan_insn_1(), and symtab_node::noninterposable_alias().
Return a new assembler name ending with the string SUFFIX for a clone of DECL.
References DECL_ASSEMBLER_NAME, get_identifier(), IDENTIFIER_POINTER, and symbol_table::symbol_suffix_separator().
Return a new assembler name for a clone of DECL. Apart from the string SUFFIX, the new name will end with the specified NUMBER. If clone numbering is not needed then the two argument clone_function_name should be used instead.
References clone_function_name(), DECL_ASSEMBLER_NAME, and IDENTIFIER_POINTER.
tree clone_function_name_numbered | ( | const char * | name, |
const char * | suffix ) |
Return a new assembler name for a clone of decl named NAME. Apart from the string SUFFIX, the new name will end with a unique (for each NAME) unspecified number. If clone numbering is not needed then the two argument clone_function_name should be used instead. Should not be called directly except for by lto-partition.cc:privatize_symbol_name_1.
References clone_fn_ids, clone_function_name(), clone_function_name_numbered(), hash_map< KeyId, Value, Traits >::create_ggc(), get_identifier(), and IDENTIFIER_POINTER.
Referenced by clone_function_name_numbered(), clone_function_name_numbered(), create_assumption_fn(), create_omp_child_function_name(), cgraph_node::create_version_clone_with_body(), duplicate_thunk_for_node(), and simd_clone_create().
Return a new assembler name for a clone of DECL. Apart from string SUFFIX, the new name will end with a unique (for each DECL assembler name) unspecified number. If clone numbering is not needed then the two argument clone_function_name should be used instead.
References clone_function_name_numbered(), DECL_ASSEMBLER_NAME, and IDENTIFIER_POINTER.
void dump_callgraph_transformation | ( | const cgraph_node * | original, |
const cgraph_node * | clone, | ||
const char * | suffix ) |
References symtab_node::asm_name(), symtab_node::decl, DECL_SOURCE_COLUMN, DECL_SOURCE_FILE, DECL_SOURCE_LINE, symtab_node::order, and symtab.
Referenced by clone_inlined_nodes(), cgraph_node::create_clone(), and cgraph_node::create_version_clone().
|
static |
Duplicate thunk THUNK if necessary but make it to refer to NODE. ARGS_TO_SKIP, if non-NULL, determines which parameters should be omitted. Function can return NODE if no thunk is necessary, which can happen when thunk is this_adjusting but we are removing this parameter.
References cgraph_edge::callee, cgraph_node::callees, cgraph_edge::caller, cgraph_node::callers, cgraph_node::can_change_signature, clone_function_name_numbered(), copy_node(), cgraph_node::count, cgraph_node::create(), cgraph_node::create_edge(), symtab_node::decl, DECL_ARGUMENTS, DECL_CHAIN, DECL_CONTEXT, DECL_IGNORED_P, DECL_INITIAL, DECL_NAME, DECL_RESULT, DECL_RTL_SET_P, DECL_STRUCT_FUNCTION, symtab_node::definition, duplicate_thunk_for_node(), ipa_param_adjustments::first_param_intact_p(), cgraph_node::former_clone_of, gcc_checking_assert, clone_info::get(), thunk_info::get(), clone_info::get_create(), cgraph_node::get_untransformed_body(), i, i2, cgraph_node::merged_comdat, cgraph_node::merged_extern_inline, ipa_param_body_adjustments::modify_formal_parameters(), cgraph_edge::next_caller, NULL, clone_info::param_adjustments, SET_DECL_ASSEMBLER_NAME, set_new_clone_decl_and_node_flags(), symtab, cgraph_node::thunk, cgraph_node::ultimate_alias_target(), symtab_node::unique_name, and cgraph_node::unit_id.
Referenced by duplicate_thunk_for_node(), and cgraph_edge::redirect_callee_duplicating_thunks().
|
static |
Turn profile of N to local profile.
References cgraph_node::callees, cgraph_node::count, profile_count::guessed_local(), cgraph_node::indirect_calls, localize_profile(), and cgraph_edge::next_callee.
Referenced by cgraph_node::create_clone(), and localize_profile().
|
static |
Set flags of NEW_NODE and its decl. NEW_NODE is a newly created private clone or its thunk.
References symtab_node::decl, DECL_COMDAT, DECL_EXTERNAL, DECL_IS_REPLACEABLE_OPERATOR, DECL_SET_IS_OPERATOR_DELETE, DECL_SET_IS_OPERATOR_NEW, DECL_STATIC_CONSTRUCTOR, DECL_STATIC_DESTRUCTOR, DECL_VIRTUAL_P, DECL_WEAK, symtab_node::externally_visible, cgraph_node::local, cgraph_node::lowered, symtab_node::semantic_interposition, and TREE_PUBLIC.
Referenced by cgraph_node::create_virtual_clone(), and duplicate_thunk_for_node().
|
static |
The edges representing the callers of the NEW_VERSION node were fixed by cgraph_function_versioning (), now the call_expr in their respective tree code should be updated to call the NEW_VERSION.
References cgraph_edge::call_stmt, cgraph_edge::caller, cgraph_node::callers, symtab_node::decl, DECL_STRUCT_FUNCTION, gcc_assert, gimple_call_set_fndecl(), maybe_clean_eh_stmt_fn(), and cgraph_edge::next_caller.
Referenced by cgraph_node::create_version_clone_with_body().
|
static |
Referenced by clone_function_name_numbered().