GCC Middle and Back End API Reference
|
#include <symtab-thunks.h>
Public Member Functions | |
thunk_info () | |
thunk_info (const thunk_info &t) | |
bool | operator== (const thunk_info &other) const |
bool | operator!= (const thunk_info &other) const |
thunk_info & | operator= (const thunk_info &other) |
void | dump (FILE *) |
void | stream_out (class lto_simple_output_block *) |
void | stream_in (class lto_input_block *) |
hashval_t | hash () |
void | register_early (cgraph_node *node) |
Static Public Member Functions | |
static thunk_info * | get (cgraph_node *node) |
static thunk_info * | get_create (cgraph_node *node) |
static void | remove (cgraph_node *node) |
static void | process_early_thunks () |
static void | release (void) |
Data Fields | |
HOST_WIDE_INT | fixed_offset |
HOST_WIDE_INT | virtual_value |
HOST_WIDE_INT | indirect_offset |
tree | alias |
bool | this_adjusting |
bool | virtual_offset_p |
Representation of thunks inside symbol table. Copyright (C) 2003-2024 Free Software Foundation, Inc. Contributed by Jan Hubicka This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
This symbol annotation holds information about thunk. Thunks are basically wrappers around methods which are introduced in case of multiple inheritance in order to adjust the value of the "this" pointer or of the returned value. In the case of this-adjusting thunks, each back-end can override the can_output_mi_thunk/output_mi_thunk target hooks to generate a minimal thunk (with a tail call for instance) directly as assembly. For the default hook or for the case where the can_output_mi_thunk hooks return false, the thunk is gimplified and lowered using the regular machinery.
|
inline |
|
inline |
void thunk_info::dump | ( | FILE * | f | ) |
Dump THIS to F.
References DECL_ASSEMBLER_NAME, lang_hooks::decl_printable_name, and IDENTIFIER_POINTER.
Referenced by cgraph_node::dump().
|
inlinestatic |
Return thunk_info, if available.
References symbol_table::m_thunks, NULL, and symtab.
Referenced by cgraph_node::analyze(), analyze_function(), cgraph_node::call_for_symbol_thunks_and_aliases(), clone_of_p(), convert_all_function_calls(), cgraph_node::create_wrapper(), cgraph_node::dump(), duplicate_thunk_for_node(), ipa_icf::sem_function::equals_wpa(), expand_call_inline(), expand_thunk(), cgraph_node::former_thunk_p(), cgraph_node::function_or_virtual_thunk_symbol(), ipa_icf::sem_function::init(), inline_call(), ipa_polymorphic_call_context::ipa_polymorphic_call_context(), ipa_tm_execute(), ipa_tm_mayenterirr_function(), lto_output_node(), and set_const_flag_1().
|
static |
Return thunk_info possibly creating new one.
References ggc_alloc_no_dtor(), symbol_table::m_thunks, and symtab.
Referenced by cgraph_node::create_thunk(), cgraph_node::create_wrapper(), inline_call(), input_node(), and process_early_thunks().
hashval_t thunk_info::hash | ( | ) |
Hash THIS.
References inchash::hash::add_flag(), inchash::hash::add_hwi(), and inchash::hash::end().
Referenced by ipa_icf::sem_function::init().
|
inline |
|
inline |
References alias, fixed_offset, indirect_offset, this_adjusting, virtual_offset_p, and virtual_value.
|
inline |
References fixed_offset, indirect_offset, this_adjusting, virtual_offset_p, and virtual_value.
|
static |
Attach recorded thunks to cgraph_nodes. All this is done only to avoid need to stream summaries to PCH.
References FOR_EACH_VEC_ELT, get_create(), i, unprocessed_thunk::info, unprocessed_thunk::node, NULL, thunks, and vec_free().
Referenced by analyze_functions().
void thunk_info::register_early | ( | cgraph_node * | node | ) |
Add unprocessed thunk.
References ggc_alloc(), unprocessed_thunk::info, thunks, and vec_safe_push().
|
inlinestatic |
Free thunk info summaries.
References ggc_delete(), symbol_table::m_thunks, NULL, and symtab.
Referenced by cgraph_cc_finalize().
|
inlinestatic |
Remove thunk_info association for NODE.
References symbol_table::m_thunks, and symtab.
Referenced by cgraph_node::create_wrapper().
void thunk_info::stream_in | ( | class lto_input_block * | ib | ) |
void thunk_info::stream_out | ( | class lto_simple_output_block * | ob | ) |
Stream out THIS to OB.
References lto_simple_output_block::main_stream, and streamer_write_uhwi_stream().
Referenced by lto_output_node().
tree thunk_info::alias |
Referenced by cgraph_node::analyze(), convert_all_function_calls(), and operator=().
HOST_WIDE_INT thunk_info::fixed_offset |
HOST_WIDE_INT thunk_info::indirect_offset |
Referenced by expand_call_inline(), expand_thunk(), operator=(), and operator==().
bool thunk_info::this_adjusting |
Referenced by expand_call_inline(), expand_thunk(), operator=(), and operator==().
bool thunk_info::virtual_offset_p |
HOST_WIDE_INT thunk_info::virtual_value |
Referenced by expand_call_inline(), expand_thunk(), operator=(), and operator==().