GCC Middle and Back End API Reference
ipa_call_context Class Reference

#include <ipa-fnsummary.h>

Inheritance diagram for ipa_call_context:
Collaboration diagram for ipa_call_context:

Public Member Functions

 ipa_call_context (cgraph_node *node, clause_t possible_truths, clause_t nonspec_possible_truths, vec< inline_param_summary > inline_param_summary, ipa_auto_call_arg_values *arg_values)
 
 ipa_call_context ()
 
void estimate_size_and_time (ipa_call_estimates *estimates, bool est_times=true, bool est_hints=true)
 
bool equal_to (const ipa_call_context &)
 
bool exists_p ()
 

Private Attributes

cgraph_nodem_node
 
clause_t m_possible_truths
 
clause_t m_nonspec_possible_truths
 
vec< inline_param_summarym_inline_param_summary
 
ipa_call_arg_values m_avals
 
friend ipa_cached_call_context
 

Detailed Description

This object describe a context of call.  That is a summary of known
information about its parameters.  Main purpose of this context is
to give more realistic estimations of function runtime, size and
inline hints.   

Constructor & Destructor Documentation

◆ ipa_call_context() [1/2]

ipa_call_context::ipa_call_context ( cgraph_node * node,
clause_t possible_truths,
clause_t nonspec_possible_truths,
vec< inline_param_summary > inline_param_summary,
ipa_auto_call_arg_values * arg_values )
Main constructor for ipa call context.  Memory allocation of ARG_VALUES
is owned by the caller.  INLINE_PARAM_SUMMARY is also owned by the
caller.   

◆ ipa_call_context() [2/2]

ipa_call_context::ipa_call_context ( )
inline

Member Function Documentation

◆ equal_to()

◆ estimate_size_and_time()

void ipa_call_context::estimate_size_and_time ( ipa_call_estimates * estimates,
bool est_times = true,
bool est_hints = true )
Fill in the selected fields in ESTIMATES with value estimated for call in
this context.  Always compute size and min_size.  Only compute time and
nonspecialized_time if EST_TIMES is true.  Only compute hints if EST_HINTS
is true.   

References ipa_fn_summary::builtin_constant_p_parms, cgraph_node::callees, ipa_fn_summary::conds, symtab_node::decl, DECL_DECLARED_INLINE_P, dump_condition(), dump_file, dump_flags, symtab_node::dump_name(), estimate_calls_size_and_time(), ipa_predicate::evaluate(), size_time_entry::exec_predicate, ipa_predicate::first_dynamic_condition, ipa_freqcounting_predicate::freq, gcc_checking_assert, ipa_call_estimates::hints, i, cgraph_node::indirect_calls, INLINE_HINT_builtin_constant_p, INLINE_HINT_declared_inline, INLINE_HINT_in_scc, INLINE_HINT_loop_iterations, INLINE_HINT_loop_stride, ipa_fn_summaries, ipa_fn_summary::loop_iterations, ipa_fn_summary::loop_strides, ipa_call_estimates::loops_with_known_iterations, ipa_call_estimates::loops_with_known_strides, m_avals, m_inline_param_summary, m_node, m_nonspec_possible_truths, m_possible_truths, ipa_call_estimates::min_size, size_time_entry::nonconst_predicate, ipa_call_estimates::nonspecialized_time, ipa_predicate::not_inlined_condition, NULL, ipa_freqcounting_predicate::predicate, ipa_predicate::probability(), RDIV, REG_BR_PROB_BASE, ipa_fn_summary::scc_no, ipa_call_estimates::size, size_time_entry::size, ipa_fn_summary::size_scale, ipa_fn_summary::size_time_table, TDF_DETAILS, ipa_call_estimates::time, size_time_entry::time, sreal::to_double(), vec_safe_iterate(), and vec_safe_length().

Referenced by do_estimate_edge_hints(), do_estimate_edge_size(), do_estimate_edge_time(), and estimate_ipcp_clone_size_and_time().

◆ exists_p()

bool ipa_call_context::exists_p ( )
inline

References m_node, and NULL.

Referenced by do_estimate_edge_time().

Field Documentation

◆ ipa_cached_call_context

friend ipa_call_context::ipa_cached_call_context
private

◆ m_avals

◆ m_inline_param_summary

◆ m_node

◆ m_nonspec_possible_truths

clause_t ipa_call_context::m_nonspec_possible_truths
private

◆ m_possible_truths

clause_t ipa_call_context::m_possible_truths
private

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