GCC Middle and Back End API Reference
thunk_info Struct 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_infooperator= (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_infoget (cgraph_node *node)
 
static thunk_infoget_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
 

Detailed Description

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.   

Constructor & Destructor Documentation

◆ thunk_info() [1/2]

thunk_info::thunk_info ( )
inline

◆ thunk_info() [2/2]

thunk_info::thunk_info ( const thunk_info & t)
inline

Member Function Documentation

◆ dump()

void thunk_info::dump ( FILE * f)

◆ get()

◆ get_create()

thunk_info * thunk_info::get_create ( cgraph_node * node)
static
Return thunk_info possibly creating new one.   

References ggc_alloc(), symbol_table::m_thunks, and symtab.

Referenced by cgraph_node::create_thunk(), cgraph_node::create_wrapper(), inline_call(), input_node(), and process_early_thunks().

◆ hash()

hashval_t thunk_info::hash ( )
Hash THIS.   

References ggc_alloc().

Referenced by ipa_icf::sem_function::init().

◆ operator!=()

bool thunk_info::operator!= ( const thunk_info & other) const
inline

◆ operator=()

thunk_info & thunk_info::operator= ( const thunk_info & other)
inline

◆ operator==()

bool thunk_info::operator== ( const thunk_info & other) const
inline

◆ process_early_thunks()

void thunk_info::process_early_thunks ( )
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().

◆ register_early()

void thunk_info::register_early ( cgraph_node * node)
Add unprocessed thunk.   

References ggc_alloc(), unprocessed_thunk::info, thunks, and vec_safe_push().

◆ release()

void thunk_info::release ( void )
inlinestatic
Free thunk info summaries.   

References ggc_delete(), symbol_table::m_thunks, NULL, and symtab.

Referenced by cgraph_cc_finalize().

◆ remove()

void thunk_info::remove ( cgraph_node * node)
inlinestatic
Remove thunk_info association for NODE.   

References symbol_table::m_thunks, and symtab.

Referenced by cgraph_node::create_wrapper().

◆ stream_in()

void thunk_info::stream_in ( class lto_input_block * ib)
Stream in THIS from IB.   

References ggc_alloc(), and streamer_read_uhwi().

Referenced by input_node().

◆ stream_out()

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().

Field Documentation

◆ alias

tree thunk_info::alias

◆ fixed_offset

◆ indirect_offset

HOST_WIDE_INT thunk_info::indirect_offset

◆ this_adjusting

bool thunk_info::this_adjusting

◆ virtual_offset_p

◆ virtual_value

HOST_WIDE_INT thunk_info::virtual_value

The documentation for this struct was generated from the following files: