GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "predict.h"
#include "target.h"
#include "rtl.h"
#include "alloc-pool.h"
#include "cgraph.h"
#include "symbol-summary.h"
#include "symtab-thunks.h"
#include "lto-streamer.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "stor-layout.h"
#include "gimplify-me.h"
#include "varasm.h"
#include "output.h"
#include "cfg.h"
#include "cfghooks.h"
#include "gimple-ssa.h"
#include "gimple-fold.h"
#include "cfgloop.h"
#include "tree-into-ssa.h"
#include "tree-cfg.h"
#include "cfgcleanup.h"
#include "tree-pass.h"
#include "data-streamer.h"
#include "langhooks.h"
#include "gt-symtab-thunks.h"
Data Structures | |
struct | unprocessed_thunk |
Functions | |
tree | thunk_adjust (gimple_stmt_iterator *bsi, tree ptr, bool this_adjusting, HOST_WIDE_INT fixed_offset, tree virtual_offset, HOST_WIDE_INT indirect_offset) |
bool | expand_thunk (cgraph_node *node, bool output_asm_thunks, bool force_gimple_thunk) |
void | symtab_thunks_cc_finalize (void) |
Variables | |
static tree | vtable_entry_type |
static vec< unprocessed_thunk, va_gc > * | thunks |
bool expand_thunk | ( | cgraph_node * | node, |
bool | output_asm_thunks, | ||
bool | force_gimple_thunk ) |
Expand thunk NODE to gimple if possible. When FORCE_GIMPLE_THUNK is true, gimple thunk is created and no assembler is produced. When OUTPUT_ASM_THUNK is true, also produce assembler for thunks that are not lowered.
References a, add_bb_to_loop(), add_local_decl(), aggregate_value_p(), allocate_struct_function(), profile_probability::always(), symtab_node::analyzed, asm_out_file, BB_FREQ_MAX, bitmap_obstack_initialize(), bitmap_obstack_release(), BLOCK_SUPERCONTEXT, BLOCK_VARS, build2(), build_decl(), build_fold_addr_expr_loc(), build_int_cst(), build_zero_cst(), cgraph_edge::call_stmt, cgraph_edge::callee, cgraph_node::callees, CDI_DOMINATORS, cfun, checking_verify_flow_info(), basic_block_def::count, cgraph_node::count, create_basic_block(), create_tmp_reg(), create_tmp_var_name(), curr_insn_location(), current_function_decl, symtab_node::decl, DECL_ARG_TYPE, DECL_ARGUMENTS, DECL_ARTIFICIAL, DECL_BY_REFERENCE, DECL_CHAIN, DECL_CONTEXT, DECL_EXTERNAL, DECL_IGNORED_P, DECL_INITIAL, DECL_NOT_GIMPLE_REG_P, DECL_RESULT, DECL_SOURCE_LOCATION, DECL_STATIC_CHAIN, DECL_STRUCT_FUNCTION, delete_unreachable_blocks(), error(), EXIT_BLOCK_PTR_FOR_FN, thunk_info::fixed_offset, free_after_compilation(), free_dominance_info(), profile_count::from_gcov_type(), gcc_assert, thunk_info::get(), cgraph_node::get_untransformed_body(), gimple_block_label(), gimple_build_assign(), gimple_build_call_vec(), gimple_build_cond(), gimple_build_return(), gimple_call_set_chain(), gimple_call_set_ctrl_altering(), gimple_call_set_from_thunk(), gimple_call_set_lhs(), gimple_call_set_return_slot_opt(), gimple_call_set_tail(), gimple_fold_indirect_ref(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_start_bb(), profile_probability::guessed_always(), profile_count::guessed_local(), i, thunk_info::indirect_offset, init_function_start(), init_insn_lengths(), init_lowered_empty_function(), profile_count::initialized_p(), input_location, insn_locations_finalize(), insn_locations_init(), profile_count::ipa_p(), is_gimple_reg_type(), is_gimple_val(), basic_block_def::loop_father, cgraph_node::lowered, make_edge(), make_node(), make_single_succ_edge(), NULL, NULL_TREE, PROFILE_GUESSED, PROFILE_READ, profile_status_for_fn, prologue_location, remove_edge(), resolve_unique_section(), set_cfun(), set_curr_insn_location(), single_succ_edge(), size_int, function::static_chain_decl, stdarg_p(), targetm, thunk_info::this_adjusting, cgraph_node::thunk, thunk_adjust(), TODO_update_ssa, TREE_ADDRESSABLE, TREE_ASM_WRITTEN, TREE_CODE, TREE_READONLY, TREE_THIS_VOLATILE, TREE_TYPE, TREE_USED, type(), TYPE_MAIN_VARIANT, TYPE_SIZE_UNIT, update_max_bb_count(), update_ssa(), useless_type_conversion_p(), VAR_P, thunk_info::virtual_offset_p, thunk_info::virtual_value, and VOID_TYPE_P.
Referenced by cgraph_node::analyze(), cgraph_node::assemble_thunks_and_aliases(), cgraph_node::create_wrapper(), cgraph_node::expand_all_artificial_thunks(), inline_call(), and tree_profiling().
void symtab_thunks_cc_finalize | ( | void | ) |
tree thunk_adjust | ( | gimple_stmt_iterator * | bsi, |
tree | ptr, | ||
bool | this_adjusting, | ||
HOST_WIDE_INT | fixed_offset, | ||
tree | virtual_offset, | ||
HOST_WIDE_INT | indirect_offset ) |
Adjust PTR by the constant FIXED_OFFSET, by the vtable offset indicated by VIRTUAL_OFFSET, and by the indirect offset indicated by INDIRECT_OFFSET, if it is non-null. THIS_ADJUSTING is nonzero for a this adjusting thunk and zero for a result adjusting thunk.
References build1(), build_pointer_type(), build_simple_mem_ref, create_tmp_reg(), fold_build_pointer_plus_hwi_loc(), fold_build_pointer_plus_loc(), force_gimple_operand_gsi(), gimple_build_assign(), GSI_CONTINUE_LINKING, gsi_insert_after(), GSI_NEW_STMT, input_location, integer_type_node, layout_type(), make_node(), NULL_TREE, TREE_TYPE, TYPE_ARG_TYPES, VAR_P, and vtable_entry_type.
Referenced by expand_call_inline(), and expand_thunk().
|
static |
To be PCH safe we store thunks into a vector before end of compilation unit.
Referenced by thunk_info::process_early_thunks(), and thunk_info::register_early().
|
static |
Support for thunks in 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/>.
Used for vtable lookup in thunk adjusting.
Referenced by symtab_thunks_cc_finalize(), and thunk_adjust().