GCC Middle and Back End API Reference
callback-info.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "alloc-pool.h"
#include "cgraph.h"
#include "diagnostic.h"
#include "builtins.h"
#include "options.h"
#include "gimple-range.h"
#include "attribs.h"
#include "symbol-summary.h"
#include "data-streamer.h"
#include "attr-callback.h"
#include "callback-info.h"
Include dependency graph for callback-info.cc:

Functions

static void invert_arg_mapping (cgraph_edge *e, callback_info *ci)
static void stream_vector_out (lto_simple_output_block *ob, const auto_vec< int > &v)
static void stream_vector_in (lto_input_block *ib, auto_vec< int > &v)
tree callback_call_arg_summary (const gimple *stmt, int idx, callback_info *ci)
unsigned callback_call_num_args_summary (const gcall *stmt, callback_info *ci)
bool callback_ifn_assume_call_p (const gimple *stmt)
bool callback_ifn_assume_call_with_edge_p (cgraph_node *caller, gimple *stmt)

Variables

callback_info_sum_t * callback_info_sum = NULL

Function Documentation

◆ callback_call_arg_summary()

tree callback_call_arg_summary ( const gimple * stmt,
int idx,
callback_info * ci )
Return the argument at IDX if CI is null, otherwise use the mapping in CI and
return the remapped argument.  Presumes that the remapped index is not
ARG_MAPPING_UNKNOWN_IDX.   
Return the argument of STMT at IDX if CI is null, otherwise use the mapping
in CI and return the remapped argument.  Presumes that the remapped index is
not ARG_MAPPING_UNKNOWN_IDX.   

References callback_info::arg_mapping, ARG_MAPPING_UNKNOWN_IDX, callback_call_arg_summary(), gcc_checking_assert, and gimple_call_arg().

Referenced by callback_call_arg_summary(), and ipa_param_adjustments::modify_call().

◆ callback_call_num_args_summary()

unsigned callback_call_num_args_summary ( const gcall * stmt,
callback_info * ci )
Return the number of arguments of STMT if CI is null,
ci->arg_mapping.length() otherwise.   

References callback_info::arg_mapping, callback_call_num_args_summary(), and gimple_call_num_args().

Referenced by callback_call_num_args_summary(), ipa_compute_jump_functions_for_edge(), and ipa_param_adjustments::modify_call().

◆ callback_ifn_assume_call_p()

◆ callback_ifn_assume_call_with_edge_p()

bool callback_ifn_assume_call_with_edge_p ( cgraph_node * caller,
gimple * stmt )
Returns TRUE iff STMT is an internal call statement to IFN_ASSUME with a
callback edge pointing to the outlined body.   

References callback_ifn_assume_call_p(), callback_ifn_assume_call_with_edge_p(), and cgraph_node::get_edge().

Referenced by callback_ifn_assume_call_with_edge_p().

◆ invert_arg_mapping()

void invert_arg_mapping ( cgraph_edge * e,
callback_info * ci )
static

◆ stream_vector_in()

void stream_vector_in ( lto_input_block * ib,
auto_vec< int > & v )
static
Reads a vector from an LTO input block.  The format is supposed to be the
same as stream_vector_out.   

References i, stream_vector_in(), streamer_read_hwi(), and streamer_read_uhwi().

Referenced by callback_info::stream_in(), and stream_vector_in().

◆ stream_vector_out()

void stream_vector_out ( lto_simple_output_block * ob,
const auto_vec< int > & v )
static
Streams a vector into an output block, in format N ELEM_1 ... ELEM_N 

References lto_simple_output_block::main_stream, stream_vector_out(), streamer_write_hwi_stream(), and streamer_write_uhwi_stream().

Referenced by callback_info::stream_out(), and stream_vector_out().

Variable Documentation

◆ callback_info_sum

callback_info_sum_t* callback_info_sum = NULL
Callback attribute summary
Copyright (C) 2026 Free Software Foundation, Inc.
Contributed by Josef Melcr <jmelcr@gcc.gnu.org>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, 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/>.   

Referenced by callback_edge_useful_p(), callback_fetch_attr_by_edge(), callback_redirect_edge(), callback_info_sum_t::check_create_info_sum(), callback_info::create_internal_summary(), callback_info_sum_t::free_info_sum(), input_edge(), ipa_compute_jump_functions_for_edge(), lto_output_edge(), cgraph_edge::make_callback(), ipa_param_adjustments::modify_call(), ipa_param_body_adjustments::modify_call_stmt(), and cgraph_edge::redirect_callee().