GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "alloc-pool.h"
#include "tree-pass.h"
#include "ssa.h"
#include "tree-streamer.h"
#include "cgraph.h"
#include "diagnostic.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "tree-eh.h"
#include "calls.h"
#include "stor-layout.h"
#include "print-tree.h"
#include "gimplify.h"
#include "gimplify-me.h"
#include "gimple-walk.h"
#include "symbol-summary.h"
#include "sreal.h"
#include "ipa-cp.h"
#include "ipa-prop.h"
#include "tree-cfg.h"
#include "tree-dfa.h"
#include "tree-inline.h"
#include "ipa-fnsummary.h"
#include "gimple-pretty-print.h"
#include "ipa-utils.h"
#include "dbgcnt.h"
#include "domwalk.h"
#include "builtins.h"
#include "tree-cfgcleanup.h"
#include "options.h"
#include "symtab-clones.h"
#include "attr-fnspec.h"
#include "gimple-range.h"
#include "value-range-storage.h"
#include "vr-values.h"
#include "gt-ipa-prop.h"
Data Structures | |
struct | ipa_vr_ggc_hash_traits |
struct | ipa_cst_ref_desc |
struct | ipa_return_value_summary |
class | ipa_return_value_sum_t |
struct | prop_type_change_info |
struct | ipa_known_agg_contents_list |
class | analysis_dom_walker |
class | ipcp_modif_dom_walker |
Variables | |
ipa_node_params_t * | ipa_node_params_sum = NULL |
function_summary< ipcp_transformation * > * | ipcp_transformation_sum = NULL |
ipa_edge_args_sum_t * | ipa_edge_args_sum |
static hash_table< ipa_vr_ggc_hash_traits > * | ipa_vr_hash_table |
static struct cgraph_node_hook_list * | function_insertion_hook_holder |
static object_allocator< ipa_cst_ref_desc > | ipa_refdesc_pool ("IPA-PROP ref descriptions") |
static function_summary< ipa_return_value_summary * > * | ipa_return_value_sum |
|
inlinestatic |
Add an aggregate content item into a linked list of ipa_known_agg_contents_list structure, in which all elements are sorted ascendingly by offset.
References ipa_known_agg_contents_list::next, and ipa_known_agg_contents_list::offset.
Referenced by determine_known_aggregate_parts().
|
static |
Adjust the aggregate replacements in TS to reflect any parameter removals which might have already taken place. If after adjustments there are no aggregate replacements left, the m_agg_values will be set to NULL. In other cases, it may be shrunk.
References count, gcc_checking_assert, clone_info::get(), ipa_param_adjustments::get_updated_indices(), ggc_free(), i, ipa_argagg_value::index, ipcp_transformation::m_agg_values, NULL, and clone_info::param_adjustments.
Referenced by ipcp_transform_function().
|
static |
Given an assignment statement STMT, try to collect information into AGG_VALUE that will be used to construct jump function for RHS of the assignment, from which content value of an aggregate part comes. Besides constant and simple pass-through jump functions, also try to identify whether it matches the following pattern that can be described by a load-value-from-aggregate jump function, which is a derivative of simple pass-through jump function. foo (int *p) { ... *(q_5 + 4) = *(p_3(D) + 28) op 1; bar (q_5); } Here IPA_LOAD_AGG_DATA data structure is informative enough to describe constant, simple pass-through and load-vale-from-aggregate. If value is constant, it will be kept in field OPERAND, and field FORMAL_ID is set to -1. For simple pass-through and load-value-from-aggregate, field FORMAL_ID specifies the related formal parameter index, and field OFFSET can be used to distinguish them, -1 means simple pass-through, otherwise means load-value-from-aggregate.
References AGGREGATE_TYPE_P, ipa_load_agg_data::by_ref, commutative_tree_code(), contains_bitfld_component_ref_p(), CONVERT_EXPR_CODE_P, dyn_cast(), ipa_pass_through_data::formal_id, get_ssa_def_if_simple_copy(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), GIMPLE_BINARY_RHS, gimple_phi_arg_def(), gimple_phi_num_args(), GIMPLE_SINGLE_RHS, GIMPLE_UNARY_RHS, ipa_func_body_info::info, ipa_get_param_decl_index(), is_gimple_assign(), is_gimple_ip_invariant(), load_from_unmodified_param_or_agg(), NULL_TREE, ipa_load_agg_data::offset, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_load_agg_data::pass_through, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, swap_tree_comparison(), tcc_comparison, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_THIS_VOLATILE, TREE_TYPE, ipa_load_agg_data::type, and useless_type_conversion_p().
Referenced by extract_mem_content().
|
static |
Build aggregate jump function from LIST, assuming there are exactly VALUE_COUNT entries there and that offset of the passed argument is ARG_OFFSET and store it into JFUNC.
References ipa_jump_func::agg, ipa_agg_jf_item::jump_func_agg_value::constant, ipa_pass_through_data::formal_id, gcc_assert, IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, ipa_agg_jump_function::items, ipa_agg_jf_item::jftype, ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_known_agg_contents_list::next, ipa_agg_jf_item::offset, ipa_known_agg_contents_list::offset, ipa_load_agg_data::offset, ipa_pass_through_data::operand, ipa_agg_jf_item::jump_func_agg_value::pass_through, ipa_load_agg_data::pass_through, ipa_known_agg_contents_list::size, tree_to_shwi(), ipa_agg_jf_item::type, ipa_known_agg_contents_list::type, TYPE_SIZE, unshare_expr_without_location(), ipa_agg_jf_item::value, ipa_known_agg_contents_list::value, and vec_safe_reserve().
Referenced by determine_known_aggregate_parts().
Callback of walk_aliased_vdefs and a helper function for detect_type_change to check whether a particular statement may modify the virtual table pointerIt stores its result into DATA, which points to a prop_type_change_info structure.
References SSA_NAME_DEF_STMT, stmt_may_be_vtbl_ptr_store(), and prop_type_change_info::type_maybe_changed.
Referenced by detect_type_change_from_memory_writes().
|
inlinestatic |
Check whether a given aggregate content is clobbered by certain element in a linked list of ipa_known_agg_contents_list.
References ipa_known_agg_contents_list::next, ipa_known_agg_contents_list::offset, and ipa_known_agg_contents_list::size.
Referenced by determine_known_aggregate_parts().
|
static |
Combine two controlled uses counts as done during inlining.
References IPA_UNDESCRIBED_USE.
Referenced by propagate_controlled_uses().
|
static |
Given that an actual argument is an SSA_NAME that is a result of a phi statement PHI, try to find out whether NAME is in fact a multiple-inheritance typecast from a descendant into an ancestor of a formal parameter and thus can be described by an ancestor jump function and if so, write the appropriate function into JFUNC. Essentially we want to match the following pattern: if (obj_2(D) != 0B) goto <bb 3>; else goto <bb 4>; <bb 3>: iftmp.1_3 = &obj_2(D)->D.1762; <bb 4>: # iftmp.1_1 = PHI <iftmp.1_3(3), 0B(2)> D.1879_6 = middleman_1 (iftmp.1_1, i_5(D)); return D.1879_6;
References EDGE_PRED, expr, get_ancestor_addr_info(), gimple_bb(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_phi_num_args(), gsi_last_bb(), i, integer_zerop(), ipa_get_param_decl_index(), ipa_set_ancestor_jf(), offset, parm_ref_data_pass_through_p(), PHI_ARG_DEF, POINTER_TYPE_P, safe_dyn_cast(), single_pred(), single_pred_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by ipa_compute_jump_functions_for_edge().
|
static |
Given that an actual argument is an SSA_NAME (given in NAME) and is a result of an assignment statement STMT, try to determine whether we are actually handling any of the following cases and construct an appropriate jump function into JFUNC if so: 1) The passed value is loaded from a formal parameter which is not a gimple register (most probably because it is addressable, the value has to be scalar) and we can guarantee the value has not changed. This case can therefore be described by a simple pass-through jump function. For example: foo (int a) { int a.0; a.0_2 = a; bar (a.0_2); 2) The passed value can be described by a simple arithmetic pass-through jump function. E.g. foo (int a) { int D.2064; D.2064_4 = a.1(D) + 4; bar (D.2064_4); This case can also occur in combination of the previous one, e.g.: foo (int a, int z) { int a.0; int D.2064; a.0_3 = a; D.2064_4 = a.0_3 + 4; foo (D.2064_4); 3) The passed value is an address of an object within another one (which also passed by reference). Such situations are described by an ancestor jump function and describe situations such as: B::foo() (struct B * const this) { struct A * D.1845; D.1845_2 = &this_1(D)->D.1748; A::bar (D.1845_2); INFO is the structure describing individual parameters access different stages of IPA optimizations. PARMS_AINFO contains the information that is only needed for intraprocedural analysis.
References CONVERT_EXPR_CODE_P, ipa_node_params::descriptors, get_ref_base_and_extent_hwi(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_class(), gimple_assign_rhs_code(), GIMPLE_BINARY_RHS, GIMPLE_SINGLE_RHS, GIMPLE_UNARY_RHS, ipa_get_param_decl_index(), ipa_set_ancestor_jf(), ipa_set_jf_arith_pass_through(), ipa_set_jf_simple_pass_through(), ipa_set_jf_unary_pass_through(), is_gimple_ip_invariant(), load_from_unmodified_param(), mem_ref_offset(), offset, parm_ref_data_pass_through_p(), POINTER_TYPE_P, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, and useless_type_conversion_p().
Referenced by ipa_compute_jump_functions_for_edge().
int count_formal_params | ( | tree | fndecl | ) |
Return how many formal parameters FNDECL has.
References count, DECL_ARGUMENTS, DECL_CHAIN, gcc_assert, and gimple_has_body_p().
Referenced by analyze_function_body(), ipa_icf::sem_function::init(), ipa_analyze_node(), ipa_initialize_node_params(), ipcp_transform_function(), and ipcp_transformation::maybe_create_parm_idx_map().
|
static |
Detect whether the dynamic type of ARG of COMP_TYPE may have changed. If it is, return true. ARG is the object itself (not a pointer to it, unless dereferenced). BASE is the base of the memory access as returned by get_ref_base_and_extent, as is the offset.
References current_function_decl, detect_type_change_from_memory_writes(), offset, param_type_may_change_p(), TREE_CODE, and TREE_OPERAND.
Referenced by ipa_analyze_virtual_call_uses().
|
static |
Detect whether the dynamic type of ARG of COMP_TYPE has changed (before callsite CALL) by looking for assignments to its virtual table pointer. If it is, return true. ARG is the object itself (not a pointer to it, unless dereferenced). BASE is the base of the memory access as returned by get_ref_base_and_extent, as is the offset. This is helper function for detect_type_change and detect_type_change_ssa that does the heavy work which is usually unnecesary.
References ipa_func_body_info::aa_walk_budget, ao_ref_init(), BINFO_VTABLE, check_stmt_for_type_change(), DECL_P, gcc_checking_assert, get_base_address(), gimple_vuse(), handled_component_p(), NULL, prop_type_change_info::object, offset, prop_type_change_info::offset, POINTER_SIZE, TREE_CODE, TYPE_BINFO, TYPE_MAIN_VARIANT, prop_type_change_info::type_maybe_changed, and walk_aliased_vdefs().
Referenced by detect_type_change(), and detect_type_change_ssa().
|
static |
Like detect_type_change but ARG is supposed to be a non-dereferenced pointer SSA name (its dereference will become the base and the offset is assumed to be zero).
References build2(), build_int_cst(), current_function_decl, detect_type_change_from_memory_writes(), gcc_checking_assert, param_type_may_change_p(), POINTER_TYPE_P, ptr_type_node, TREE_CODE, and TREE_TYPE.
Referenced by ipa_analyze_virtual_call_uses().
|
static |
Traverse statements from CALL backwards, scanning whether an aggregate given in ARG is filled in constants or values that are derived from caller's formal parameter in the way described by some kinds of jump functions. FBI is the context of the caller function for interprocedural analysis. ARG can either be an aggregate expression or a pointer to an aggregate. ARG_TYPE is the type of the aggregate, JFUNC is the jump function for the aggregate.
References ipa_func_body_info::aa_walk_budget, add_to_agg_contents_list(), ipa_jump_func::agg, AGGREGATE_TYPE_P, ao_ref_init(), ao_ref_init_from_ptr_and_size(), arg_type, BITMAP_FREE, build_agg_jump_func_from_list(), ipa_agg_jump_function::by_ref, clobber_by_agg_contents_list_p(), symtab_node::decl, DECL_P, extract_mem_content(), ipa_pass_through_data::formal_id, gcc_checking_assert, get_continuation_for_phi(), get_ref_base_and_extent_hwi(), gimple_vuse(), ipa_func_body_info::node, NULL, NULL_TREE, ipa_known_agg_contents_list::offset, ipa_pass_through_data::operand, opt_for_fn, ipa_load_agg_data::pass_through, POINTER_TYPE_P, r, ipa_known_agg_contents_list::size, SSA_NAME_DEF_STMT, stmt_may_clobber_ref_p_1(), TREE_CODE, tree_fits_uhwi_p(), TREE_OPERAND, tree_to_uhwi(), TREE_TYPE, TYPE_SIZE, UINT_MAX, ipa_known_agg_contents_list::value, and visited.
Referenced by ipa_compute_jump_functions_for_edge().
|
static |
If STMT is a memory store to the object whose address is BASE, extract information (offset, size, and value) into CONTENT, and return true, otherwise we conservatively assume the whole object is modified with unknown content, and return false. CHECK_REF means that access to object is expected to be in form of MEM_REF expression.
References analyze_agg_content_value(), get_ref_base_and_extent_hwi(), gimple_assign_lhs(), integer_zerop(), is_gimple_assign(), ipa_known_agg_contents_list::next, NULL, ipa_known_agg_contents_list::offset, ipa_known_agg_contents_list::size, TREE_CODE, TREE_OPERAND, TREE_TYPE, ipa_known_agg_contents_list::type, and ipa_known_agg_contents_list::value.
Referenced by determine_known_aggregate_parts().
|
static |
Attempt to locate an interprocedural constant at a given REQ_OFFSET in CONSTRUCTOR and return it. Return NULL if the search fails for some reason.
References CONSTRUCTOR_ELTS, DECL_BIT_FIELD, find_constructor_constant_at_offset(), wi::fits_shwi_p(), FOR_EACH_CONSTRUCTOR_ELT, gcc_assert, gcc_checking_assert, gcc_unreachable, int_bit_position(), is_gimple_ip_invariant(), is_gimple_reg_type(), wi::lshift(), wi::neg_p(), NULL, wi::sext(), wi::to_offset(), TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_DOMAIN, TYPE_MIN_VALUE, TYPE_PRECISION, and TYPE_SIZE_UNIT.
Referenced by find_constructor_constant_at_offset(), and ipa_find_agg_cst_from_init().
|
static |
Find the nearest valid aa status for parameter specified by INDEX that dominates BB.
References CDI_DOMINATORS, get_immediate_dominator(), ipa_get_bb_info(), NULL, and ipa_bb_info::param_aa_statuses.
Referenced by parm_bb_aa_status_for_bb().
|
static |
Free stuff in BI.
References ipa_bb_info::cg_edges, and ipa_bb_info::param_aa_statuses.
Referenced by ipa_release_body_info(), and ipcp_transform_function().
Extract the base, offset and MEM_REF expression from a statement ASSIGN if it looks like: iftmp.1_3 = &obj_2(D)->D.1762; The base of the MEM_REF must be a default definition SSA NAME of a parameter. Return NULL_TREE if it looks otherwise. If case of success, the whole MEM_REF expression is returned and the offset calculated from any handled components and the MEM_REF itself is stored into *OFFSET. The whole RHS stripped off the ADDR_EXPR is stored into *OBJ_P.
References expr, get_ref_base_and_extent_hwi(), gimple_assign_rhs1(), gimple_assign_single_p(), mem_ref_offset(), NULL_TREE, offset, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, and TREE_OPERAND.
Referenced by compute_complex_ancestor_jump_func(), and ipa_analyze_virtual_call_uses().
If RHS is an SSA_NAME and it is defined by a simple copy assign statement, return the rhs of its defining statement, and this statement is stored in *RHS_STMT. Otherwise return RHS as it is.
References gimple_assign_rhs1(), gimple_assign_single_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and TREE_CODE.
Referenced by analyze_agg_content_value().
void gt_ggc_mx | ( | ipa_vr *& | x | ) |
References gt_ggc_mx().
Referenced by gt_ggc_mx().
void gt_pch_nx | ( | ipa_vr *& | x | ) |
References gt_pch_nx().
Referenced by gt_pch_nx().
|
static |
Analyze newly added function into callgraph.
References cgraph_node::has_gimple_body_p(), and ipa_analyze_node().
Referenced by ipa_register_cgraph_hooks().
|
static |
Return true if the two aggregate jump functions are known to be equivalent. The function can be used before the IPA phase of IPA-CP or inlining because it cannot cope with refdesc changes these passes can carry out.
References ipa_load_agg_data::by_ref, ipa_agg_jf_item::jump_func_agg_value::constant, gcc_unreachable, ipa_agg_pass_through_jf_equivalent_p(), IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, ipa_agg_jf_item::jftype, ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_agg_jf_item::offset, ipa_load_agg_data::offset, ipa_agg_jf_item::jump_func_agg_value::pass_through, ipa_load_agg_data::pass_through, ipa_agg_jf_item::type, ipa_load_agg_data::type, types_compatible_p(), ipa_agg_jf_item::value, and values_equal_for_ipcp_p().
Referenced by ipa_jump_functions_equivalent_p().
|
static |
Return true if the two pass_through components of two jump functions are known to be equivalent. AGG_JF denotes whether they are part of aggregate functions or not. The function can be used before the IPA phase of IPA-CP or inlining because it cannot cope with refdesc changes these passes can carry out.
References ipa_pass_through_data::agg_preserved, ipa_pass_through_data::formal_id, gcc_assert, NULL_TREE, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_pass_through_data::refdesc_decremented, and values_equal_for_ipcp_p().
Referenced by ipa_agg_jump_functions_equivalent_p(), and ipa_jump_functions_equivalent_p().
|
static |
If necessary, allocate vector of parameter descriptors in info of NODE. Return true if they were allocated, false if not.
References ipa_node_params::descriptors, ipa_node_params_sum, and vec_safe_grow_cleared().
Referenced by ipa_initialize_node_params(), and ipa_read_node_info().
|
static |
Analyze a call statement CALL whether and how it utilizes formal parameters of the caller (described by INFO). PARMS_AINFO is a pointer to a vector containing intermediate information about each formal parameter.
References ipa_func_body_info::aa_walk_budget, cgraph_indirect_call_info::context, current_function_decl, gcc_checking_assert, ipa_polymorphic_call_context::get_dynamic_type(), cgraph_node::get_edge(), gimple_call_fn(), cgraph_edge::indirect_info, cgraph_edge::indirect_unknown_callee, ipa_analyze_indirect_call_uses(), ipa_analyze_virtual_call_uses(), ipa_func_body_info::node, obj_type_ref_class(), OBJ_TYPE_REF_OBJECT, OBJ_TYPE_REF_TOKEN, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::polymorphic, TREE_CODE, tree_to_shwi(), virtual_method_call_p(), and cgraph_indirect_call_info::vptr_changed.
Referenced by ipa_analyze_stmt_uses().
|
static |
Calculate controlled uses of parameters of NODE.
References symtab_node::decl, DECL_STRUCT_FUNCTION, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, gimple_assign_rhs1(), gimple_assign_single_p(), gimple_call_arg(), gimple_call_fn(), gimple_call_internal_p(), gimple_call_num_args(), has_zero_uses(), i, ipa_get_param(), ipa_get_param_count(), ipa_node_params_sum, ipa_set_controlled_uses(), ipa_set_param_load_dereferenced(), ipa_set_param_used(), IPA_UNDESCRIBED_USE, is_gimple_call(), is_gimple_debug(), is_gimple_reg(), load_from_dereferenced_name(), and ssa_default_def().
Referenced by ipa_analyze_node().
|
static |
Analyze the CALL and examine uses of formal parameters of the caller NODE (described by INFO). PARMS_AINFO is a pointer to a vector containing intermediate information about each formal parameter. Currently it checks whether the call calls a pointer that is a formal parameter and if so, the parameter is marked with the called flag and an indirect call graph edge describing the call is created. This is very simple for ordinary pointers represented in SSA but not-so-nice when it comes to member pointers. The ugly part of this function does nothing more than trying to match the pattern of such a call. Look up the documentation of macro TARGET_PTRMEMFUNC_VBIT_LOCATION for details. An example of such a pattern is the gimple dump below, the call is on the last line: <bb 2>: f$__delta_5 = f.__delta; f$__pfn_24 = f.__pfn; or <bb 2>: f$__delta_5 = MEM[(struct *)&f]; f$__pfn_24 = MEM[(struct *)&f + 4B]; and a few lines below: <bb 5> D.2496_3 = (int) f$__pfn_24; D.2497_4 = D.2496_3 & 1; if (D.2497_4 != 0) goto <bb 3>; else goto <bb 4>; <bb 6>: D.2500_7 = (unsigned int) f$__delta_5; D.2501_8 = &S + D.2500_7; D.2502_9 = (int (*__vtbl_ptr_type) (void) * *) D.2501_8; D.2503_10 = *D.2502_9; D.2504_12 = f$__pfn_24 + -1; D.2505_13 = (unsigned int) D.2504_12; D.2506_14 = D.2503_10 + D.2505_13; D.2507_15 = *D.2506_14; iftmp.11_16 = (String:: *) D.2507_15; <bb 7>: # iftmp.11_1 = PHI <iftmp.11_16(3), f$__pfn_24(2)> D.2500_19 = (unsigned int) f$__delta_5; D.2508_20 = &S + D.2500_19; D.2493_21 = iftmp.11_1 (D.2508_20, 4); Such patterns are results of simple calls to a member pointer: int doprinting (int (MyString::* f)(int) const) { MyString S ("somestring"); return (S.*f)(4); } Moreover, the function also looks for called pointers loaded from aggregates passed by value or reference.
References cgraph_indirect_call_info::agg_contents, cgraph_indirect_call_info::by_ref, CONVERT_EXPR_CODE_P, d1, d2, ipa_node_params::descriptors, EDGE_PRED, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_assign_single_p(), gimple_bb(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_phi_num_args(), gsi_last_bb(), cgraph_indirect_call_info::guaranteed_unmodified, cgraph_edge::indirect_info, ipa_func_body_info::info, integer_onep(), integer_zerop(), ipa_get_param_decl_index(), ipa_get_stmt_member_ptr_load_param(), ipa_is_ssa_with_stmt_def(), ipa_load_from_parm_agg(), ipa_note_param_call(), is_gimple_assign(), cgraph_indirect_call_info::member_ptr, ipa_func_body_info::node, NULL, cgraph_indirect_call_info::offset, offset, parm_preserved_before_stmt_p(), parm_ref_data_preserved_p(), PHI_ARG_DEF, POINTER_TYPE_P, ptrmemfunc_vbit_in_delta, safe_dyn_cast(), single_pred(), single_pred_p(), single_succ(), single_succ_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TARGET_PTRMEMFUNC_VBIT_LOCATION, TREE_CODE, and TREE_TYPE.
Referenced by ipa_analyze_call_uses().
void ipa_analyze_node | ( | struct cgraph_node * | node | ) |
Initialize the array describing properties of formal parameters of NODE, analyze their uses and compute jump functions associated with actual arguments of calls from within NODE.
References ipa_func_body_info::aa_walk_budget, ipa_node_params::analysis_done, ipa_func_body_info::bb_infos, calculate_dominance_info(), cgraph_node::callees, CDI_DOMINATORS, cfun, ipa_bb_info::cg_edges, count_formal_params(), symtab_node::decl, DECL_STRUCT_FUNCTION, disable_ranger(), enable_ranger(), ENTRY_BLOCK_PTR_FOR_FN, free_dominance_info(), gcc_assert, gimple_bb(), cgraph_node::indirect_calls, ipa_func_body_info::info, ipa_analyze_controlled_uses(), ipa_check_create_edge_args(), ipa_check_create_node_params(), ipa_func_spec_opts_forbid_analysis_p(), ipa_get_bb_info(), ipa_get_param_count(), ipa_initialize_node_params(), ipa_node_params_sum, IPA_PROP_ARG_INDEX_LIMIT_BITS, ipa_release_body_info(), last_basic_block_for_fn, cgraph_edge::next_callee, ipa_func_body_info::node, opt_for_fn, ipa_func_body_info::param_count, pop_cfun(), push_cfun(), vNULL, and dom_walker::walk().
Referenced by cgraph_node::expand_all_artificial_thunks(), inline_indirect_intraprocedural_analysis(), ipa_add_new_function(), and ipcp_generate_summary().
|
static |
Scan the statements in BB and inspect the uses of formal parameters. Store the findings in various structures of the associated ipa_node_params structure, such as parameter flags, notes etc. FBI holds various data about the function being analyzed.
References gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), ipa_func_body_info::info, ipa_analyze_stmt_uses(), is_gimple_debug(), visit_ref_for_mod_analysis(), and walk_stmt_load_store_addr_ops().
Referenced by analysis_dom_walker::before_dom_children().
|
static |
Analyze the call statement STMT with respect to formal parameters (described in INFO) of caller given by FBI->NODE. Currently it only checks whether formal parameters are called.
References as_a(), ipa_analyze_call_uses(), and is_gimple_call().
Referenced by ipa_analyze_params_uses_in_bb().
|
static |
Analyze a CALL to an OBJ_TYPE_REF which is passed in TARGET and if the object referenced in the expression is a formal parameter of the caller FBI->node (described by FBI->info), create a call note for the statement.
References detect_type_change(), detect_type_change_ssa(), expr, gcc_assert, get_ancestor_addr_info(), cgraph_edge::indirect_info, ipa_func_body_info::info, ipa_get_param_decl_index(), ipa_note_param_call(), ipa_func_body_info::node, obj_type_ref_class(), OBJ_TYPE_REF_OBJECT, OBJ_TYPE_REF_TOKEN, cgraph_indirect_call_info::offset, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::polymorphic, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, TREE_OPERAND, and tree_to_uhwi().
Referenced by ipa_analyze_call_uses().
void ipa_check_create_edge_args | ( | void | ) |
Ensure that array of edge arguments infos is big enough to accommodate a structure for all edges and reallocates it if not. Also, allocate associated hash tables is they do not already exist.
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), ggc_alloc_no_dtor(), ipa_edge_args_sum, ipa_vr_hash_table, and symtab.
Referenced by ipa_analyze_node(), ipa_prop_read_jump_functions(), ipa_register_cgraph_hooks(), ipcp_driver(), and update_indirect_edges_after_inlining().
|
static |
Compute jump functions for all edges - both direct and indirect - outgoing from BB.
References cgraph_edge::call_stmt, cgraph_edge::callee, ipa_bb_info::cg_edges, symtab_node::definition, FOR_EACH_VEC_ELT_REVERSE, gimple_call_fnspec(), i, ipa_compute_jump_functions_for_edge(), ipa_get_bb_info(), attr_fnspec::known_p(), and cgraph_node::ultimate_alias_target().
Referenced by analysis_dom_walker::before_dom_children().
|
static |
Compute jump function for all arguments of callsite CS and insert the information in the jump_functions array in the ipa_edge_args corresponding to this callsite.
References ipa_func_body_info::aa_walk_budget, AGGREGATE_TYPE_P, as_a(), wi::bit_and_not(), cgraph_edge::call_stmt, cgraph_edge::caller, cfun, compute_complex_ancestor_jump_func(), compute_complex_assign_jump_func(), symtab_node::decl, determine_known_aggregate_parts(), wide_int_storage::from(), gcc_assert, ipa_polymorphic_call_context::get_dynamic_type(), get_pointer_alignment_1(), get_range_query(), gimple_call_arg(), gimple_call_internal_p(), gimple_call_num_args(), ipa_edge_args_sum, ipa_func_spec_opts_forbid_analysis_p(), ipa_get_callee_param_type(), ipa_get_ith_jump_func(), ipa_get_ith_polymorhic_call_context(), ipa_get_jf_ancestor_agg_preserved(), ipa_get_jf_pass_through_agg_preserved(), ipa_get_param_decl_index(), IPA_JF_ANCESTOR, IPA_JF_PASS_THROUGH, ipa_node_params_sum, ipa_set_jf_constant(), ipa_set_jf_simple_pass_through(), ipa_set_jfunc_vr(), ipa_vr_supported_type_p(), is_gimple_assign(), is_gimple_ip_invariant(), is_gimple_reg_type(), is_global_var(), ipa_jump_func::m_vr, wi::mask(), NULL, opt_for_fn, parm_preserved_before_stmt_p(), parm_ref_data_pass_through_p(), POINTER_TYPE_P, range_cast(), value_range::set_nonzero(), value_range::set_varying(), value_range::singleton_p(), skip_a_safe_conversion_op(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, TREE_READONLY, tree_single_nonzero_warnv_p(), TREE_TYPE, ipa_jump_func::type, TYPE_PRECISION, value_range::undefined_p(), UNSIGNED, value_range::update_bitmask(), ipa_polymorphic_call_context::useless_p(), VAR_P, value_range::varying_p(), vec_free(), and vec_safe_grow_cleared().
Referenced by ipa_compute_jump_functions_for_bb().
DEBUG_FUNCTION void ipa_dump_jump_function | ( | FILE * | f, |
ipa_jump_func * | jump_func, | ||
class ipa_polymorphic_call_context * | ctx ) |
Print contents of JFUNC to F. If CTX is non-NULL, dump it too.
References ipa_jump_func::agg, ipa_ancestor_jf_data::agg_preserved, ipa_pass_through_data::agg_preserved, ipa_jump_func::jump_func_value::ancestor, ipa_agg_jump_function::by_ref, ipa_load_agg_data::by_ref, ipa_agg_jf_item::jump_func_agg_value::constant, ipa_jump_func::jump_func_value::constant, ipa_polymorphic_call_context::dump(), ipa_vr::dump(), dump_file, FOR_EACH_VEC_ELT, ipa_ancestor_jf_data::formal_id, ipa_pass_through_data::formal_id, get_tree_code_name(), HOST_WIDE_INT_PRINT_DEC, IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_print_constant_value(), ipa_agg_jump_function::items, ipa_agg_jf_item::jftype, ipa_ancestor_jf_data::keep_null, ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_jump_func::m_vr, ipa_agg_jf_item::offset, ipa_ancestor_jf_data::offset, ipa_load_agg_data::offset, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_agg_jf_item::jump_func_agg_value::pass_through, ipa_jump_func::jump_func_value::pass_through, print_generic_expr(), ipa_pass_through_data::refdesc_decremented, tree_to_uhwi(), ipa_agg_jf_item::type, ipa_jump_func::type, TYPE_SIZE, ipa_polymorphic_call_context::useless_p(), ipa_agg_jf_item::value, ipa_constant_data::value, and ipa_jump_func::value.
Referenced by ipa_print_node_jump_functions_for_edge().
void ipa_dump_param | ( | FILE * | file, |
class ipa_node_params * | info, | ||
int | i ) |
Return the declaration of Ith formal parameter of the function corresponding to INFO. Note there is no setter function as this array is built just once using ipa_initialize_node_params.
References ipa_node_params::descriptors, i, and print_generic_expr().
Referenced by decide_about_value(), estimate_local_effects(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), get_replacement_map(), and ipa_print_node_params().
|
static |
Copy information from SRC_JF to DST_JF which correstpond to call graph edges SRC and DST.
References ipa_jump_func::agg, ipa_jump_func::jump_func_value::ancestor, ipa_agg_jump_function::by_ref, cgraph_edge::call_stmt, cgraph_edge::caller, symtab_node::clone_reference(), ipa_jump_func::jump_func_value::constant, ipa_cst_ref_desc::cs, symtab_node::find_reference(), gcc_assert, gcc_checking_assert, cgraph_node::inlined_to, ipa_get_controlled_uses(), ipa_get_jf_pass_through_formal_id(), IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_node_params_sum, IPA_REF_ADDR, ipa_refdesc_pool, ipa_set_controlled_uses(), ipa_set_jf_cst_copy(), IPA_UNDESCRIBED_USE, ipa_agg_jump_function::items, jfunc_rdesc_usable(), cgraph_edge::lto_stmt_uid, ipa_jump_func::m_vr, ipa_cst_ref_desc::next_duplicate, NULL, ipa_jump_func::jump_func_value::pass_through, ipa_constant_data::rdesc, ipa_cst_ref_desc::refcount, ipa_ref::stmt, symtab_node_for_jfunc(), ipa_jump_func::type, ipa_jump_func::value, and vec_safe_copy().
Referenced by ipa_edge_args_sum_t::duplicate().
Check whether SCALAR could be used to look up an aggregate interprocedural invariant from a static constructor and if so, return it. Otherwise return NULL.
References DECL_INITIAL, find_constructor_constant_at_offset(), is_global_var(), NULL, offset, TREE_CODE, TREE_OPERAND, TREE_READONLY, and VAR_P.
Referenced by evaluate_conditions_for_known_args(), ipa_get_indirect_edge_target_1(), try_make_edge_direct_simple_call(), and try_make_edge_direct_virtual_call().
|
static |
Retrieve value from AGG_JFUNC for the given OFFSET or return NULL if there is none. BY_REF specifies whether the value has to be passed by reference or by value.
References ipa_agg_jump_function::by_ref, ipa_agg_value_from_jfunc(), ipa_agg_jump_function::items, NULL_TREE, ipa_agg_jf_item::offset, and offset.
Referenced by try_make_edge_direct_simple_call(), and try_make_edge_direct_virtual_call().
void ipa_free_all_edge_args | ( | void | ) |
Free all ipa_edge structures.
References ggc_delete(), ipa_edge_args_sum, and NULL.
Referenced by ipa_free_all_structures_after_iinln(), and ipa_free_all_structures_after_ipa_cp().
void ipa_free_all_node_params | ( | void | ) |
Free all ipa_node_params structures.
References ggc_delete(), ipa_node_params_sum, and NULL.
Referenced by analyze_function_body(), ipa_free_all_structures_after_iinln(), and ipa_free_all_structures_after_ipa_cp().
void ipa_free_all_structures_after_iinln | ( | void | ) |
Free all ipa_node_params and all ipa_edge_args structures if they are no longer needed after indirect inlining.
References ipa_free_all_edge_args(), ipa_free_all_node_params(), ipa_refdesc_pool, ipa_unregister_cgraph_hooks(), ipcp_agg_lattice_pool, ipcp_cst_values_pool, ipcp_poly_ctx_values_pool, and ipcp_sources_pool.
void ipa_free_all_structures_after_ipa_cp | ( | void | ) |
Free all ipa_node_params and all ipa_edge_args structures if they are no longer needed after ipa-cp.
References ipa_free_all_edge_args(), ipa_free_all_node_params(), ipa_refdesc_pool, ipa_unregister_cgraph_hooks(), ipcp_agg_lattice_pool, ipcp_cst_values_pool, ipcp_poly_ctx_values_pool, and ipcp_sources_pool.
Referenced by ipcp_driver().
|
static |
Return true if DECL_FUNCTION_SPECIFIC_OPTIMIZATION of the decl associated with NODE should prevent us from analyzing it for the purposes of IPA-CP.
References DECL_FUNCTION_SPECIFIC_OPTIMIZATION, and opt_for_fn.
Referenced by ipa_analyze_node(), and ipa_compute_jump_functions_for_edge().
|
static |
Get IPA BB information about the given BB. FBI is the context of analyzis of this function body.
References ipa_func_body_info::bb_infos, gcc_checking_assert, and basic_block_def::index.
Referenced by find_dominating_aa_status(), ipa_analyze_node(), ipa_compute_jump_functions_for_bb(), and parm_bb_aa_status_for_bb().
tree ipa_get_callee_param_type | ( | struct cgraph_edge * | e, |
int | i ) |
Return the Ith param type of callee associated with call graph edge E.
References cgraph_edge::call_stmt, cgraph_edge::callee, symtab_node::decl, DECL_ARGUMENTS, gimple_call_fntype(), i, NULL, TREE_CHAIN, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, and void_list_node.
Referenced by ipa_compute_jump_functions_for_edge().
int ipa_get_param_decl_index | ( | class ipa_node_params * | info, |
tree | ptree ) |
Return index of the formal whose tree is PTREE in function which corresponds to INFO.
References ipa_node_params::descriptors, and ipa_get_param_decl_index_1().
Referenced by analyze_agg_content_value(), compute_complex_ancestor_jump_func(), compute_complex_assign_jump_func(), ipa_analyze_indirect_call_uses(), ipa_analyze_virtual_call_uses(), ipa_compute_jump_functions_for_edge(), load_or_store_of_ptr_parameter(), unmodified_parm_or_parm_agg_item(), visit_ref_for_mod_analysis(), will_be_nonconstant_expr_predicate(), and will_be_nonconstant_predicate().
|
static |
Return index of the formal whose tree is PTREE in function which corresponds to INFO.
References count, i, and vec_safe_length().
Referenced by ipa_get_param_decl_index(), ipa_load_from_parm_agg(), and load_from_unmodified_param().
void ipa_get_range_from_ip_invariant | ( | vrange & | r, |
tree | val, | ||
cgraph_node * | context_node ) |
Given VAL that conforms to is_gimple_ip_invariant, produce a VRANGE that represents it as a range. CONTEXT_NODE is the call graph node representing the function for which optimization flags should be evaluated.
References symtab_node::decl, decl_in_symtab_p(), DECL_P, symtab_node::get(), symtab_node::nonzero_address(), opt_for_fn, r, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by evaluate_conditions_for_known_args(), and ipa_vr_intersect_with_arith_jfunc().
|
static |
If STMT looks like a statement loading a value from a member pointer formal parameter, return that parameter and store the offset of the field to *OFFSET_P, if it is non-NULL. Otherwise return NULL (but *OFFSET_P still might be clobbered). If USE_DELTA, then we look for a use of the delta field rather than the pfn.
References byte_position(), gimple_assign_rhs1(), gimple_assign_single_p(), int_bit_position(), integer_nonzerop(), NULL_TREE, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, and type_like_member_ptr_p().
Referenced by ipa_analyze_indirect_call_uses().
Return a pointer to an ipa_vr just like TMP, but either find it in ipa_vr_hash_table or allocate it in GC memory.
References inchash::add_vrange(), inchash::hash::end(), ggc_alloc(), and ipa_vr_hash_table.
Referenced by ipa_record_return_value_range(), and ipa_set_jfunc_vr().
tree ipa_impossible_devirt_target | ( | struct cgraph_edge * | ie, |
tree | target ) |
Return the target to be used in cases of impossible devirtualization. IE and target (the latter can be NULL) are dumped when dumping is enabled.
References builtin_decl_unreachable(), cgraph_edge::caller, DECL_ASSEMBLER_NAME, dump_file, symtab_node::dump_name(), cgraph_node::get_create(), and IDENTIFIER_POINTER.
Referenced by ipa_get_indirect_edge_target_1(), and try_make_edge_direct_virtual_call().
void ipa_initialize_node_params | ( | struct cgraph_node * | node | ) |
Initialize the ipa_node_params structure associated with NODE by counting the function parameters, creating the descriptors and populating their param_decls.
References count_formal_params(), symtab_node::decl, ipa_node_params::descriptors, ipa_alloc_node_params(), ipa_node_params_sum, and ipa_populate_param_decls().
Referenced by analyze_function_body(), and ipa_analyze_node().
Returns true iff T is an SSA_NAME defined by a statement.
References SSA_NAME_IS_DEFAULT_DEF, and TREE_CODE.
Referenced by ipa_analyze_indirect_call_uses().
bool ipa_jump_functions_equivalent_p | ( | ipa_jump_func * | jf1, |
ipa_jump_func * | jf2 ) |
Return true if the two jump functions are known to be equivalent. The function can be used before the IPA phase of IPA-CP or inlining because it cannot cope with refdesc changes these passes can carry out.
References ipa_jump_func::agg, ipa_ancestor_jf_data::agg_preserved, ipa_jump_func::jump_func_value::ancestor, ipa_agg_jump_function::by_ref, ipa_vr::equal_p(), ipa_ancestor_jf_data::formal_id, gcc_assert, gcc_unreachable, i, ipa_agg_jump_functions_equivalent_p(), ipa_agg_pass_through_jf_equivalent_p(), ipa_get_jf_constant(), IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_agg_jump_function::items, jfunc_rdesc_usable(), ipa_ancestor_jf_data::keep_null, ipa_jump_func::m_vr, ipa_cst_ref_desc::next_duplicate, ipa_ancestor_jf_data::offset, ipa_jump_func::jump_func_value::pass_through, ipa_cst_ref_desc::refcount, ipa_jump_func::type, ipa_jump_func::value, values_equal_for_ipcp_p(), and vec_safe_length().
Referenced by ipa_icf_gimple::func_checker::compare_gimple_call().
bool ipa_load_from_parm_agg | ( | struct ipa_func_body_info * | fbi, |
vec< ipa_param_descriptor, va_gc > * | descriptors, | ||
gimple * | stmt, | ||
tree | op, | ||
int * | index_p, | ||
HOST_WIDE_INT * | offset_p, | ||
poly_int64 * | size_p, | ||
bool * | by_ref_p, | ||
bool * | guaranteed_unmodified ) |
Return true if we can prove that OP is a memory reference loading data from an aggregate passed as a parameter. The function works in two modes. If GUARANTEED_UNMODIFIED is NULL, it return false if it cannot prove that the value has not been modified before the load in STMT. If GUARANTEED_UNMODIFIED is not NULL, it will return true even if it cannot prove the value has not been modified, in that case it will store false to *GUARANTEED_UNMODIFIED, otherwise it will store true there. INFO and PARMS_AINFO describe parameters of the current function (but the latter can be NULL), STMT is the load statement. If function returns true, *INDEX_P, *OFFSET_P and *BY_REF is filled with the parameter index, offset within the aggregate and whether it is a load from a value passed by reference respectively. Return false if the offset divided by BITS_PER_UNIT would not fit into an unsigned int.
References DECL_P, get_ref_base_and_extent_hwi(), integer_zerop(), ipa_get_param_decl_index_1(), load_from_unmodified_param(), parm_preserved_before_stmt_p(), parm_ref_data_preserved_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, and UINT_MAX.
Referenced by ipcp_modif_dom_walker::before_dom_children(), ipa_analyze_indirect_call_uses(), load_from_unmodified_param_or_agg(), and unmodified_parm_or_parm_agg_item().
struct cgraph_edge * ipa_make_edge_direct_to_target | ( | struct cgraph_edge * | ie, |
tree | target, | ||
bool | speculative ) |
If TARGET is an addr_expr of a function declaration, make it the (SPECULATIVE)destination of an indirect edge IE and return the edge. Otherwise, return NULL.
References profile_count::apply_scale(), builtin_decl_unreachable(), eni_weights::call_cost, cgraph_edge::call_stmt, ipa_call_summary::call_stmt_size, ipa_call_summary::call_stmt_time, cgraph_edge::callee, cgraph_edge::caller, symtab_node::can_be_discarded_p(), canonicalize_constructor_val(), cgraph_edge::count, dbg_cnt(), dump_enabled_p(), dump_file, symtab_node::dump_name(), dump_printf_loc(), dyn_cast(), eni_size_weights, eni_time_weights, gcc_assert, cgraph_node::get(), cgraph_node::get_create(), eni_weights::indirect_call_cost, cgraph_edge::indirect_info, cgraph_node::inlined_to, ipa_call_summaries, ipa_check_create_node_params(), is_gimple_ip_invariant(), cgraph_edge::lto_stmt_uid, cgraph_edge::make_direct(), cgraph_edge::make_speculative(), cgraph_indirect_call_info::member_ptr, MSG_OPTIMIZED_LOCATIONS, symtab_node::noninterposable_alias(), NULL, cgraph_indirect_call_info::polymorphic, print_gimple_stmt(), cgraph_edge::speculative, cgraph_edge::speculative_call_for_target(), TDF_SLIM, TREE_CODE, TREE_OPERAND, and TREE_PUBLIC.
Referenced by ipcp_discover_new_direct_edges(), try_make_edge_direct_simple_call(), and try_make_edge_direct_virtual_call().
|
static |
Find the indirect call graph edge corresponding to STMT and mark it as a call to a parameter number PARAM_INDEX. NODE is the caller. Return the indirect call graph edge. If POLYMORPHIC is true record is as a destination of polymorphic call.
References cgraph_indirect_call_info::agg_contents, cgraph_node::get_edge(), cgraph_indirect_call_info::guaranteed_unmodified, cgraph_edge::indirect_info, ipa_node_params_sum, ipa_set_param_used_by_indirect_call(), ipa_set_param_used_by_polymorphic_call(), cgraph_indirect_call_info::member_ptr, cgraph_indirect_call_info::param_index, and cgraph_indirect_call_info::polymorphic.
Referenced by ipa_analyze_indirect_call_uses(), and ipa_analyze_virtual_call_uses().
|
static |
Populate the param_decl field in parameter DESCRIPTORS that correspond to NODE.
References symtab_node::decl, DECL_ARGUMENTS, DECL_CHAIN, estimate_move_cost(), gcc_assert, gcc_checking_assert, gimple_has_body_p(), and TREE_TYPE.
Referenced by ipa_initialize_node_params(), and ipcp_transform_function().
void ipa_print_all_jump_functions | ( | FILE * | f | ) |
Print ipa_jump_func data structures of all nodes in the call graph to F.
References FOR_EACH_FUNCTION, and ipa_print_node_jump_functions().
Referenced by ipcp_driver().
void ipa_print_all_params | ( | FILE * | f | ) |
Print ipa_tree_map data structures of all functions in the callgraph to F.
References FOR_EACH_FUNCTION, and ipa_print_node_params().
Referenced by ipcp_driver().
void ipa_print_constant_value | ( | FILE * | f, |
tree | val ) |
Print VAL which is extracted from a jump function to F.
References DECL_IN_CONSTANT_POOL, DECL_INITIAL, print_generic_expr(), TREE_CODE, and TREE_OPERAND.
Referenced by ipa_dump_jump_function(), and print_ipcp_constant_value().
void ipa_print_node_jump_functions | ( | FILE * | f, |
struct cgraph_node * | node ) |
Print the jump functions of all arguments on all call graph edges going from NODE to file F.
References cgraph_indirect_call_info::agg_contents, cgraph_indirect_call_info::by_ref, cgraph_edge::call_stmt, cgraph_edge::callee, cgraph_node::callees, cgraph_indirect_call_info::context, ipa_polymorphic_call_context::dump(), symtab_node::dump_name(), HOST_WIDE_INT_PRINT_DEC, cgraph_node::indirect_calls, cgraph_edge::indirect_info, ipa_edge_args_info_available_for_edge_p(), ipa_print_node_jump_functions_for_edge(), cgraph_indirect_call_info::member_ptr, cgraph_edge::next_callee, cgraph_indirect_call_info::offset, cgraph_indirect_call_info::param_index, cgraph_indirect_call_info::polymorphic, print_gimple_stmt(), and TDF_SLIM.
Referenced by inline_indirect_intraprocedural_analysis(), and ipa_print_all_jump_functions().
|
static |
Print the jump functions associated with call graph edge CS to file F.
References count, i, ipa_dump_jump_function(), ipa_edge_args_sum, ipa_get_cs_argument_count(), ipa_get_ith_jump_func(), and ipa_get_ith_polymorhic_call_context().
Referenced by ipa_print_node_jump_functions().
void ipa_print_node_params | ( | FILE * | f, |
struct cgraph_node * | node ) |
Print ipa_tree_map data structures of all functions in the callgraph to F.
References count, symtab_node::definition, symtab_node::dump_name(), i, ipa_dump_param(), ipa_get_controlled_uses(), ipa_get_param_count(), ipa_get_param_load_dereferenced(), ipa_is_param_used(), ipa_is_param_used_by_indirect_call(), ipa_is_param_used_by_ipa_predicates(), ipa_is_param_used_by_polymorphic_call(), ipa_node_params_sum, and IPA_UNDESCRIBED_USE.
Referenced by inline_indirect_intraprocedural_analysis(), and ipa_print_all_params().
void ipa_prop_cc_finalize | ( | void | ) |
Reset all state within ipa-prop.cc so that we can rerun the compiler within the same process. For use by toplev::finalize.
References function_insertion_hook_holder, ggc_delete(), ipa_edge_args_sum, ipa_node_params_sum, NULL, symbol_table::remove_cgraph_insertion_hook(), and symtab.
Referenced by toplev::finalize().
void ipa_prop_read_jump_functions | ( | void | ) |
Read ipcp jump functions.
References ipa_check_create_edge_args(), ipa_check_create_node_params(), ipa_prop_read_section(), ipa_register_cgraph_hooks(), lto_get_file_decl_data(), lto_get_summary_section_data(), and LTO_section_jump_functions.
Referenced by ipa_fn_summary_read().
|
static |
Read section in file FILE_DATA of length LEN with data DATA.
References count, symtab_node::definition, dyn_cast(), data_in::file_data, gcc_assert, header, i, ipa_read_node_info(), lto_data_in_create(), lto_data_in_delete(), lto_free_section_data(), LTO_section_jump_functions, lto_symtab_encoder_deref(), NULL, streamer_read_uhwi(), lto_file_decl_data::symtab_node_encoder, and vNULL.
Referenced by ipa_prop_read_jump_functions().
void ipa_prop_write_jump_functions | ( | void | ) |
Write jump functions for nodes in SET.
References count, create_output_block(), output_block::decl_state, destroy_output_block(), cgraph_node::has_gimple_body_p(), ipa_edge_args_sum, ipa_node_params_sum, ipa_write_node_info(), lsei_cgraph_node(), lsei_end_p(), lsei_next_function_in_partition(), lsei_start_function_in_partition(), LTO_section_jump_functions, output_block::main_stream, NULL, produce_asm(), streamer_write_char_stream(), streamer_write_uhwi(), output_block::symbol, and lto_out_decl_state::symtab_node_encoder.
Referenced by ipa_fn_summary_write().
bool ipa_propagate_indirect_call_infos | ( | struct cgraph_edge * | cs, |
vec< cgraph_edge * > * | new_edges ) |
Update jump functions and call note functions on inlining the call site CS. CS is expected to lead to a node already cloned by cgraph_clone_inline_nodes. Newly discovered indirect edges will be added to *NEW_EDGES, unless NEW_EDGES is NULL. Return true iff a new edge(s) were + created.
References cgraph_edge::callee, changed, ipa_cst_ref_desc::cs, FOR_EACH_VEC_ELT, gcc_assert, i, ipa_edge_args_sum, ipa_get_jf_constant_rdesc(), IPA_JF_CONST, ipa_node_params_sum, ipcp_transformation_sum, propagate_controlled_uses(), propagate_info_to_inlined_callees(), ipa_edge_args_sum_t::remove(), and ipa_jump_func::type.
Referenced by inline_call().
|
static |
Stream in edge E from IB.
References BUILT_IN_NORMAL, cgraph_edge::callee, count, symtab_node::decl, fndecl_built_in_p(), ipa_edge_args_sum, ipa_get_ith_jump_func(), ipa_get_ith_polymorhic_call_context(), ipa_read_jump_function(), cgraph_edge::possibly_call_in_translation_unit_p(), ipa_polymorphic_call_context::stream_in(), streamer_read_uhwi(), and vec_safe_grow_cleared().
Referenced by ipa_read_node_info().
|
static |
Read in parts of cgraph_indirect_call_info corresponding to CS that are relevant to indirect inlining from IB.
References cgraph_indirect_call_info::agg_contents, bp_unpack_value(), cgraph_indirect_call_info::by_ref, cgraph_indirect_call_info::context, cgraph_indirect_call_info::guaranteed_unmodified, cgraph_edge::indirect_info, ipa_set_param_used_by_indirect_call(), ipa_set_param_used_by_polymorphic_call(), cgraph_indirect_call_info::member_ptr, cgraph_indirect_call_info::offset, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::param_index, cgraph_indirect_call_info::polymorphic, ipa_polymorphic_call_context::stream_in(), stream_read_tree, streamer_read_bitpack(), streamer_read_hwi(), and cgraph_indirect_call_info::vptr_changed.
Referenced by ipa_read_node_info().
|
static |
Read in jump function JUMP_FUNC from IB.
References ipa_jump_func::agg, bp_unpack_value(), build1(), build_pointer_type(), ipa_agg_jump_function::by_ref, ipa_load_agg_data::by_ref, ipa_agg_jf_item::jump_func_agg_value::constant, count, fatal_error(), ipa_pass_through_data::formal_id, i, IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_set_ancestor_jf(), ipa_set_jf_arith_pass_through(), ipa_set_jf_constant(), ipa_set_jf_simple_pass_through(), ipa_set_jf_unary_pass_through(), ipa_set_jf_unknown(), ipa_set_jfunc_vr(), ipa_agg_jump_function::items, ipa_agg_jf_item::jftype, ipa_vr::known_p(), ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_jump_func::m_vr, NULL, NULL_TREE, ipa_agg_jf_item::offset, ipa_load_agg_data::offset, offset, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_agg_jf_item::jump_func_agg_value::pass_through, stream_read_tree, ipa_vr::streamer_read(), streamer_read_bitpack(), streamer_read_uhwi(), tcc_unary, TREE_CODE_CLASS, TREE_TYPE, ipa_agg_jf_item::type, ipa_load_agg_data::type, UNKNOWN_LOCATION, ipa_agg_jf_item::value, and vec_safe_reserve().
Referenced by ipa_read_edge_info().
|
static |
Stream in NODE info from IB.
References ipa_node_params::analysis_done, bp_unpack_value(), cgraph_node::callees, ipa_node_params::descriptors, cgraph_node::indirect_calls, ipa_alloc_node_params(), ipa_get_param_count(), ipa_node_params_sum, ipa_read_edge_info(), ipa_read_indirect_edge_info(), ipa_set_controlled_uses(), ipa_set_param_load_dereferenced(), ipa_set_param_used(), cgraph_edge::next_callee, ipa_node_params::node_enqueued, NULL, symtab_node::prevailing_p(), stream_read_tree, streamer_read_bitpack(), streamer_read_hwi(), and streamer_read_uhwi().
Referenced by ipa_prop_read_section().
void ipa_record_return_value_range | ( | value_range | val | ) |
Record that current function return value range is VAL.
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), current_function_decl, value_range::dump(), dump_file, dump_flags, cgraph_node::get(), ggc_alloc_no_dtor(), ipa_get_value_range(), ipa_return_value_sum, ipa_vr_hash_table, symtab, and TDF_DETAILS.
Referenced by execute_ranger_vrp().
void ipa_register_cgraph_hooks | ( | void | ) |
Register our cgraph hooks if they are not already there.
References symbol_table::add_cgraph_insertion_hook(), function_insertion_hook_holder, ipa_add_new_function(), ipa_check_create_edge_args(), ipa_check_create_node_params(), NULL, and symtab.
Referenced by ipa_fn_summary_generate(), ipa_fn_summary_read(), ipa_prop_read_jump_functions(), and ipcp_generate_summary().
void ipa_release_body_info | ( | struct ipa_func_body_info * | fbi | ) |
Release body info FBI.
References ipa_func_body_info::bb_infos, FOR_EACH_VEC_ELT, free_ipa_bb_info(), and i.
Referenced by analyze_function_body(), and ipa_analyze_node().
bool ipa_return_value_range | ( | value_range & | range, |
tree | decl ) |
Return true if value range of DECL is known and if so initialize RANGE.
References AVAIL_AVAILABLE, symtab_node::decl, cgraph_node::get(), ipa_vr::get_vrange(), ipa_return_value_sum, TREE_TYPE, cgraph_node::ultimate_alias_target(), useless_type_conversion_p(), and ipa_return_value_summary::vr.
Referenced by fold_using_range::range_of_call().
|
static |
Set JFUNC to be an ancestor jump function.
References ipa_ancestor_jf_data::agg_preserved, ipa_jump_func::jump_func_value::ancestor, ipa_ancestor_jf_data::formal_id, IPA_JF_ANCESTOR, ipa_ancestor_jf_data::keep_null, ipa_ancestor_jf_data::offset, offset, ipa_jump_func::type, and ipa_jump_func::value.
Referenced by compute_complex_ancestor_jump_func(), compute_complex_assign_jump_func(), ipa_read_jump_function(), and update_jump_functions_after_inlining().
|
static |
Set JFUNC to be an arithmetic pass through jump function.
References ipa_pass_through_data::agg_preserved, ipa_pass_through_data::formal_id, IPA_JF_PASS_THROUGH, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_jump_func::jump_func_value::pass_through, ipa_pass_through_data::refdesc_decremented, ipa_jump_func::type, unshare_expr_without_location(), and ipa_jump_func::value.
Referenced by compute_complex_assign_jump_func(), ipa_read_jump_function(), and update_jump_functions_after_inlining().
|
static |
Set JFUNC to be a constant jmp function.
References ipa_jump_func::jump_func_value::constant, ipa_cst_ref_desc::cs, IPA_JF_CONST, ipa_refdesc_pool, ipa_cst_ref_desc::next_duplicate, NULL, ipa_constant_data::rdesc, ipa_cst_ref_desc::refcount, TREE_CODE, TREE_OPERAND, TREE_STATIC, ipa_jump_func::type, unshare_expr_without_location(), ipa_constant_data::value, ipa_jump_func::value, and VAR_P.
Referenced by ipa_compute_jump_functions_for_edge(), and ipa_read_jump_function().
|
static |
Set JFUNC to be a copy of another jmp (to be used by jump function combination code). The two functions will share their rdesc.
References ipa_jump_func::jump_func_value::constant, gcc_checking_assert, IPA_JF_CONST, ipa_jump_func::type, and ipa_jump_func::value.
Referenced by ipa_duplicate_jump_function(), and update_jump_functions_after_inlining().
|
static |
Set JFUNC to be a simple pass-through jump function.
References ipa_pass_through_data::agg_preserved, ipa_pass_through_data::formal_id, IPA_JF_PASS_THROUGH, NULL_TREE, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_jump_func::jump_func_value::pass_through, ipa_pass_through_data::refdesc_decremented, ipa_jump_func::type, and ipa_jump_func::value.
Referenced by compute_complex_assign_jump_func(), ipa_compute_jump_functions_for_edge(), ipa_read_jump_function(), and update_jump_functions_after_inlining().
|
static |
Set JFUNC to be an unary pass through jump function.
References ipa_pass_through_data::agg_preserved, ipa_pass_through_data::formal_id, IPA_JF_PASS_THROUGH, NULL_TREE, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_jump_func::jump_func_value::pass_through, ipa_pass_through_data::refdesc_decremented, ipa_jump_func::type, and ipa_jump_func::value.
Referenced by compute_complex_assign_jump_func(), ipa_read_jump_function(), and update_jump_functions_after_inlining().
|
static |
Set jfunc to be a know-really nothing jump function.
References IPA_JF_UNKNOWN, and ipa_jump_func::type.
Referenced by ipa_read_jump_function(), and update_jump_functions_after_inlining().
|
static |
References ipa_vr::get_vrange(), and ipa_set_jfunc_vr().
|
static |
Assign to JF a pointer to a range just like TMP but either fetch a copy from ipa_vr_hash_table or allocate a new on in GC memory.
References ipa_get_value_range(), and ipa_jump_func::m_vr.
Referenced by ipa_compute_jump_functions_for_edge(), ipa_read_jump_function(), ipa_set_jfunc_vr(), and update_jump_functions_after_inlining().
void ipa_set_node_agg_value_chain | ( | struct cgraph_node * | node, |
vec< ipa_argagg_value, va_gc > * | aggs ) |
Set the aggregate replacements of NODE to be AGGVALS.
References ipcp_transformation_initialize(), ipcp_transformation_sum, and ipcp_transformation::m_agg_values.
Referenced by create_specialized_node().
|
static |
Unregister our cgraph hooks if they are not already there.
References function_insertion_hook_holder, NULL, symbol_table::remove_cgraph_insertion_hook(), and symtab.
Referenced by ipa_free_all_structures_after_iinln(), and ipa_free_all_structures_after_ipa_cp().
|
static |
Stream out parts of cgraph_indirect_call_info corresponding to CS that are relevant to indirect inlining to OB.
References cgraph_indirect_call_info::agg_contents, bitpack_create(), bp_pack_value(), cgraph_indirect_call_info::by_ref, cgraph_indirect_call_info::context, gcc_assert, cgraph_indirect_call_info::guaranteed_unmodified, cgraph_edge::indirect_info, output_block::main_stream, cgraph_indirect_call_info::member_ptr, cgraph_indirect_call_info::offset, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::param_index, cgraph_indirect_call_info::polymorphic, ipa_polymorphic_call_context::stream_out(), stream_write_tree, streamer_write_bitpack(), streamer_write_hwi(), and cgraph_indirect_call_info::vptr_changed.
Referenced by ipa_write_node_info().
|
static |
Stream out jump function JUMP_FUNC to OB.
References ipa_jump_func::agg, ipa_ancestor_jf_data::agg_preserved, ipa_pass_through_data::agg_preserved, ipa_jump_func::jump_func_value::ancestor, bitpack_create(), bp_pack_value(), ipa_agg_jump_function::by_ref, ipa_load_agg_data::by_ref, ipa_agg_jf_item::jump_func_agg_value::constant, ipa_jump_func::jump_func_value::constant, count, EXPR_LOCATION, fatal_error(), FOR_EACH_VEC_SAFE_ELT, ipa_ancestor_jf_data::formal_id, ipa_pass_through_data::formal_id, gcc_assert, i, IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_agg_jump_function::items, ipa_agg_jf_item::jftype, ipa_ancestor_jf_data::keep_null, ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_jump_func::m_vr, output_block::main_stream, ipa_agg_jf_item::offset, ipa_ancestor_jf_data::offset, ipa_load_agg_data::offset, ipa_pass_through_data::operand, ipa_pass_through_data::operation, ipa_agg_jf_item::jump_func_agg_value::pass_through, ipa_jump_func::jump_func_value::pass_through, ipa_pass_through_data::refdesc_decremented, stream_write_tree, ipa_vr::streamer_write(), streamer_write_bitpack(), streamer_write_uhwi(), tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, ipa_agg_jf_item::type, ipa_jump_func::type, ipa_load_agg_data::type, UNKNOWN_LOCATION, ipa_agg_jf_item::value, ipa_constant_data::value, ipa_jump_func::value, and vec_safe_length().
Referenced by ipa_write_node_info().
|
static |
Stream out NODE info to OB.
References ipa_node_params::analysis_done, bitpack_create(), bp_pack_value(), cgraph_node::callees, output_block::decl_state, gcc_assert, cgraph_node::indirect_calls, ipa_edge_args_sum, ipa_get_controlled_uses(), ipa_get_cs_argument_count(), ipa_get_ith_jump_func(), ipa_get_ith_polymorhic_call_context(), ipa_get_param_count(), ipa_get_param_load_dereferenced(), ipa_get_param_move_cost(), ipa_get_type(), ipa_is_param_used(), ipa_node_params_sum, IPA_UNDESCRIBED_USE, ipa_write_indirect_edge_info(), ipa_write_jump_function(), ipa_node_params::ipcp_orig_node, lto_symtab_encoder_encode(), output_block::main_stream, cgraph_edge::next_callee, ipa_node_params::node_enqueued, NULL, ipa_polymorphic_call_context::stream_out(), stream_write_tree, streamer_write_bitpack(), streamer_write_hwi(), streamer_write_uhwi(), and lto_out_decl_state::symtab_node_encoder.
Referenced by ipa_prop_write_jump_functions().
void ipcp_free_transformation_sum | ( | void | ) |
Release the IPA CP transformation summary.
References ggc_free(), ipcp_transformation_sum, and NULL.
Referenced by ipa_cp_cc_finalize().
tree ipcp_get_aggregate_const | ( | struct function * | func, |
tree | parm, | ||
bool | by_ref, | ||
HOST_WIDE_INT | bit_offset, | ||
HOST_WIDE_INT | bit_size ) |
If IPA-CP discovered a constant in parameter PARM at OFFSET of a given SIZE - whether passed by reference or not is given by BY_REF - return that constant. Otherwise return NULL_TREE. The is supposed to be used only after clone materialization and transformation is done (because it asserts that killed constants have been pruned).
References ipa_argagg_value::by_ref, function::decl, gcc_assert, cgraph_node::get(), ipa_argagg_value_list::get_elt(), ipcp_transformation::get_param_index(), ipcp_get_transformation_summary(), ipa_argagg_value::killed, ipcp_transformation::m_agg_values, ipa_func_body_info::node, NULL_TREE, tree_to_poly_int64(), TREE_TYPE, TYPE_SIZE, and ipa_argagg_value::value.
Referenced by vn_reference_lookup_2().
bool ipcp_get_parm_bits | ( | tree | parm, |
tree * | value, | ||
widest_int * | mask ) |
Return true if we have recorded VALUE and MASK about PARM. Set VALUE and MASk accordingly.
References current_function_decl, cgraph_node::get(), clone_info::get(), value_range::get_bitmask(), ipa_param_adjustments::get_original_index(), ipcp_transformation::get_param_index(), i, ipa_vr_supported_type_p(), ipcp_get_transformation_summary(), ipcp_transformation::m_vr, irange_bitmask::mask(), clone_info::param_adjustments, TREE_TYPE, TYPE_SIGN, value_range::undefined_p(), irange_bitmask::value(), value_range::varying_p(), vec_safe_length(), and wide_int_to_tree().
Referenced by get_default_value().
void ipcp_read_transformation_summaries | ( | void | ) |
Read IPA-CP aggregate replacements.
References lto_get_file_decl_data(), lto_get_summary_section_data(), LTO_section_ipcp_transform, and read_replacements_section().
unsigned int ipcp_transform_function | ( | struct cgraph_node * | node | ) |
IPCP transformation phase doing propagation of aggregate values.
References ipa_func_body_info::aa_walk_budget, adjust_agg_replacement_values(), ipa_func_body_info::bb_infos, calculate_dominance_info(), CDI_DOMINATORS, cfg_changed, cfun, ipcp_modif_dom_walker::cleanup_eh(), count_formal_params(), current_function_decl, symtab_node::decl, delete_unreachable_blocks_update_callgraph(), ipa_argagg_value_list::dump(), dump_file, symtab_node::dump_name(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_VEC_ELT, free_dominance_info(), free_ipa_bb_info(), gcc_checking_assert, i, ipa_func_body_info::info, ipa_populate_param_decls(), ipcp_get_transformation_summary(), ipcp_update_vr(), ipa_argagg_value::killed, last_basic_block_for_fn, ipcp_transformation::m_agg_values, ipcp_transformation::m_vr, ipcp_transformation::maybe_create_parm_idx_map(), ipa_func_body_info::node, NULL, opt_for_fn, ipa_func_body_info::param_count, ipcp_transformation::remove_argaggs_if(), TODO_update_ssa_only_virtuals, vec_free(), vec_safe_grow_cleared(), vec_safe_is_empty(), vNULL, and dom_walker::walk().
void ipcp_transformation_initialize | ( | void | ) |
Initialize IPA CP transformation summary and also allocate any necessary hash tables if they do not already exist.
References hash_table< Descriptor, Lazy, Allocator >::create_ggc(), ipcp_transformation_t::create_ggc(), ipa_vr_hash_table, ipcp_transformation_sum, NULL, and symtab.
Referenced by ipa_set_node_agg_value_chain(), ipcp_store_vr_results(), and read_ipcp_transformation_info().
|
static |
Update value range of formal parameters of NODE as described in TS.
References ptr_info_def::align, as_a(), count, symtab_node::decl, DECL_STRUCT_FUNCTION, value_range::dump(), dump_file, gcc_checking_assert, clone_info::get(), value_range::get_bitmask(), get_ptr_info(), get_ptr_info_alignment(), ipa_param_adjustments::get_updated_indices(), i, INTEGRAL_TYPE_P, is_gimple_reg(), ipcp_transformation::m_vr, irange_bitmask::mask(), ptr_info_def::misalign, wi::ne_p(), ipa_func_body_info::node, opt_for_fn, clone_info::param_adjustments, POINTER_TYPE_P, print_hex(), push_function_arg_decls(), r, set_ptr_info_alignment(), set_range_info(), wi::shwi(), ssa_default_def(), generic_wide_int< storage >::to_uhwi(), TREE_TYPE, TYPE_PRECISION, value_range::undefined_p(), irange_bitmask::value(), value_range::varying_p(), and vec_safe_is_empty().
Referenced by ipcp_transform_function().
void ipcp_write_transformation_summaries | ( | void | ) |
Write all aggregate replacement for nodes in set.
References count, create_output_block(), output_block::decl_state, destroy_output_block(), dyn_cast(), i, ipcp_get_transformation_summary(), LTO_section_ipcp_transform, lto_symtab_encoder_deref(), lto_symtab_encoder_encode_body_p(), lto_symtab_encoder_size(), output_block::main_stream, NULL, produce_asm(), streamer_write_char_stream(), streamer_write_uhwi(), output_block::symbol, lto_out_decl_state::symtab_node_encoder, useful_ipcp_transformation_info_p(), and write_ipcp_transformation_info().
|
static |
If JFUNC has a reference description with refcount different from IPA_UNDESCRIBED_USE, return the reference description, otherwise return NULL. JFUNC must be a constant jump function.
References ipa_get_jf_constant_rdesc(), IPA_UNDESCRIBED_USE, NULL, and ipa_cst_ref_desc::refcount.
Referenced by ipa_duplicate_jump_function(), ipa_jump_functions_equivalent_p(), propagate_controlled_uses(), and try_decrement_rdesc_refcount().
Return true EXPR is a load from a dereference of SSA_NAME NAME.
References get_base_address(), TREE_CODE, and TREE_OPERAND.
Referenced by ipa_analyze_controlled_uses().
|
static |
If STMT is an assignment that loads a value from an parameter declaration, return the index of the parameter in ipa_node_params which has not been modified. Otherwise return -1.
References gimple_assign_rhs1(), gimple_assign_single_p(), ipa_get_param_decl_index_1(), parm_preserved_before_stmt_p(), and TREE_CODE.
Referenced by compute_complex_assign_jump_func(), ipa_load_from_parm_agg(), and load_from_unmodified_param_or_agg().
|
static |
If STMT is an assignment that loads a value from a parameter declaration, or from an aggregate passed as the parameter either by value or reference, return the index of the parameter in ipa_node_params. Otherwise return -1. FBI holds gathered information about the function. INFO describes parameters of the function, STMT is the assignment statement. If it is a memory load from an aggregate, *OFFSET_P is filled with offset within the aggregate, and *BY_REF_P specifies whether the aggregate is passed by reference.
References AGGREGATE_TYPE_P, contains_bitfld_component_ref_p(), ipa_node_params::descriptors, gcc_assert, gimple_assign_load_p(), gimple_assign_rhs1(), handled_component_p(), ipa_get_type(), ipa_load_from_parm_agg(), load_from_unmodified_param(), TREE_CODE, TREE_OPERAND, TREE_THIS_VOLATILE, tree_to_poly_int64(), TREE_TYPE, and TYPE_SIZE.
Referenced by analyze_agg_content_value().
Callback of walk_aliased_vdefs. Flags that it has been invoked to the boolean variable pointed to by DATA.
References b.
Referenced by parm_preserved_before_stmt_p(), parm_ref_data_pass_through_p(), and parm_ref_data_preserved_p().
See if ARG is PARAM_DECl describing instance passed by pointer or reference in FUNCTION. Return false if the dynamic type may change in between beggining of the function until CALL is invoked. Generally functions are not allowed to change type of such instances, but they call destructors. We assume that methods cannot destroy the THIS pointer. Also as a special cases, constructor and destructors may change type of the THIS pointer.
References BLOCK_SUPERCONTEXT, DECL_ARGUMENTS, DECL_CXX_CONSTRUCTOR_P, DECL_CXX_DESTRUCTOR_P, DECL_STRUCT_FUNCTION, ECF_CONST, ECF_PURE, flags_from_decl_or_type(), gimple_block(), inlined_polymorphic_ctor_dtor_block_p(), SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VAR, TREE_CODE, and TREE_TYPE.
Referenced by detect_type_change(), and detect_type_change_ssa().
|
static |
Get AA status structure for the given BB and parameter with INDEX. Allocate structures and/or intialize the result with a dominating description as necessary.
References find_dominating_aa_status(), gcc_checking_assert, ipa_get_bb_info(), ipa_bb_info::param_aa_statuses, ipa_func_body_info::param_count, ipa_param_aa_status::parm_modified, ipa_param_aa_status::pt_modified, ipa_param_aa_status::ref_modified, and ipa_param_aa_status::valid.
Referenced by parm_preserved_before_stmt_p(), parm_ref_data_pass_through_p(), and parm_ref_data_preserved_p().
|
static |
Return true if a load from a formal parameter PARM_LOAD is known to retrieve a value known not to be modified in this function before reaching the statement STMT. FBI holds information about the function we have so far gathered but do not survive the summary building stage.
References ipa_func_body_info::aa_walk_budget, ao_ref_init(), gcc_assert, gcc_checking_assert, get_base_address(), gimple_bb(), gimple_vuse(), mark_modified(), NULL, NULL_TREE, parm_bb_aa_status_for_bb(), ipa_param_aa_status::parm_modified, TREE_CODE, TREE_READONLY, and walk_aliased_vdefs().
Referenced by ipa_analyze_indirect_call_uses(), ipa_compute_jump_functions_for_edge(), ipa_load_from_parm_agg(), and load_from_unmodified_param().
|
static |
Return true if the data pointed to by PARM (which is a parameter with INDEX) is known to be unmodified in this function before reaching call statement CALL into which it is passed. FBI describes the function body.
References ipa_func_body_info::aa_walk_budget, ao_ref_init_from_ptr_and_size(), gimple_bb(), gimple_vuse(), mark_modified(), NULL, NULL_TREE, parm_bb_aa_status_for_bb(), POINTER_TYPE_P, ipa_param_aa_status::pt_modified, TREE_TYPE, and walk_aliased_vdefs().
Referenced by compute_complex_ancestor_jump_func(), compute_complex_assign_jump_func(), and ipa_compute_jump_functions_for_edge().
|
static |
Return true if memory reference REF (which must be a load through parameter with INDEX) loads data that are known to be unmodified in this function before reaching statement STMT.
References ipa_func_body_info::aa_walk_budget, ao_ref_init(), gcc_checking_assert, gimple_bb(), gimple_vuse(), mark_modified(), NULL, parm_bb_aa_status_for_bb(), ipa_param_aa_status::ref_modified, and walk_aliased_vdefs().
Referenced by ipa_analyze_indirect_call_uses(), and ipa_load_from_parm_agg().
|
static |
Propagate number of controlled users from CS->caleee to the new root of the tree of inlined nodes.
References cgraph_edge::callee, cgraph_edge::caller, cgraph_node::callers, combine_controlled_uses_counters(), count, symtab_node::create_reference(), ipa_cst_ref_desc::cs, dump_file, symtab_node::dump_name(), symtab_node::find_reference(), ipa_pass_through_data::formal_id, gcc_checking_assert, cgraph_node::get(), symtab_node::get(), i, cgraph_node::inlined_to, ipa_edge_args_sum, ipa_get_controlled_uses(), ipa_get_cs_argument_count(), ipa_get_ith_jump_func(), ipa_get_jf_constant(), ipa_get_jf_pass_through_formal_id(), ipa_get_jf_pass_through_operation(), ipa_get_jf_pass_through_refdesc_decremented(), ipa_get_param_count(), ipa_get_param_load_dereferenced(), IPA_JF_CONST, IPA_JF_PASS_THROUGH, ipa_node_params_sum, IPA_REF_ADDR, IPA_REF_LOAD, ipa_set_controlled_uses(), ipa_set_param_load_dereferenced(), IPA_UNDESCRIBED_USE, cgraph_node::ipcp_clone, ipa_node_params::ipcp_orig_node, jfunc_rdesc_usable(), ipa_node_params::known_csts, MIN, NULL, ipa_jump_func::jump_func_value::pass_through, ipa_cst_ref_desc::refcount, remove_described_reference(), ipa_ref::remove_reference(), TREE_CODE, TREE_OPERAND, ipa_jump_func::type, ipa_jump_func::value, and VAR_P.
Referenced by ipa_propagate_indirect_call_infos().
|
static |
Recursively traverse subtree of NODE (including node) made of inlined cgraph_edges when CS has been inlined and invoke update_indirect_edges_after_inlining on all nodes and update_jump_functions_after_inlining on all non-inlined edges that lead out of this subtree. Newly discovered indirect edges will be added to *NEW_EDGES, unless NEW_EDGES is NULL. Return true iff a new edge(s) were created.
References cgraph_edge::callee, cgraph_node::callees, cgraph_node::indirect_calls, cgraph_edge::inline_failed, cgraph_edge::next_callee, propagate_info_to_inlined_callees(), update_indirect_edges_after_inlining(), and update_jump_functions_after_inlining().
Referenced by ipa_propagate_indirect_call_infos(), and propagate_info_to_inlined_callees().
|
static |
Stream in the aggregate value replacement chain for NODE from IB.
References bp_unpack_value(), ipa_argagg_value::by_ref, count, i, ipa_argagg_value::index, ipcp_transformation_initialize(), ipcp_transformation_sum, ipa_argagg_value::killed, ipcp_transformation::m_agg_values, ipcp_transformation::m_vr, stream_read_tree, ipa_vr::streamer_read(), streamer_read_bitpack(), streamer_read_uhwi(), ipa_argagg_value::unit_offset, ipa_argagg_value::value, and vec_safe_grow_cleared().
Referenced by read_replacements_section().
|
static |
Read replacements section in file FILE_DATA of length LEN with data DATA.
References count, dyn_cast(), data_in::file_data, header, i, lto_data_in_create(), lto_data_in_delete(), lto_free_section_data(), LTO_section_jump_functions, lto_symtab_encoder_deref(), NULL, read_ipcp_transformation_info(), streamer_read_uhwi(), lto_file_decl_data::symtab_node_encoder, and vNULL.
Referenced by ipcp_read_transformation_summaries().
|
static |
Remove a reference to SYMBOL from the list of references of a node given by reference description RDESC. Return true if the reference has been successfully found and removed.
References cgraph_edge::call_stmt, cgraph_edge::caller, ipa_cst_ref_desc::cs, dump_file, symtab_node::dump_name(), symtab_node::find_reference(), IPA_REF_ADDR, cgraph_edge::lto_stmt_uid, and ipa_ref::remove_reference().
Referenced by propagate_controlled_uses(), and try_decrement_rdesc_refcount().
If T is an SSA_NAME that is the result of a simple type conversion statement from an integer type to another integer type which is known to be able to represent the values the operand of the conversion can hold, return the operand of that conversion, otherwise return T.
References as_a(), cfun, CONVERT_EXPR_CODE_P, get_range_query(), gimple_assign_rhs1(), gimple_assign_rhs_code(), INTEGRAL_TYPE_P, is_gimple_assign(), range_fits_type_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, TREE_CODE, TREE_TYPE, TYPE_PRECISION, TYPE_SIGN, and value_range::undefined_p().
Referenced by ipa_compute_jump_functions_for_edge().
Return true if STMT can modify a virtual method table pointer. This function makes special assumptions about both constructors and destructors which are all the functions that are allowed to alter the VMT pointers. It assumes that destructors begin with assignment into all VMT pointers and that constructors essentially look in the following way: 1) The very first thing they do is that they call constructors of ancestor sub-objects that have them. 2) Then VMT pointers of this and all its ancestors is set to new values corresponding to the type corresponding to the constructor. 3) Only afterwards, other stuff such as constructor of member sub-objects and the code written by the user is run. Only this may include calling virtual functions, directly or indirectly. There is no way to call a constructor of an ancestor sub-object in any other way. This means that we do not have to care whether constructors get the correct type information because they will always change it (in fact, if we define the type to be given by the VMT pointer, it is undefined). The most important fact to derive from the above is that if, for some statement in the section 3, we try to detect whether the dynamic type has changed, we can safely ignore all calls as we examine the function body backwards until we reach statements in section 2 because these calls cannot be ancestor constructors or destructors (if the input is not bogus) and so do not change the dynamic type (this holds true only for automatically allocated objects but at the moment we devirtualize only these). We then must detect that statements in section 2 change the dynamic type and can try to derive the new type. That is enough and we can stop, we will never see the calls into constructors of sub-objects in this code. Therefore we can safely ignore all call statements that we traverse.
References AGGREGATE_TYPE_P, DECL_VIRTUAL_P, gimple_assign_lhs(), gimple_clobber_p(), is_gimple_assign(), is_gimple_call(), POINTER_TYPE_P, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by check_stmt_for_type_change().
|
static |
If the value of constant jump function JFUNC is an address of a function declaration, return the associated call graph node. Otherwise return NULL.
References gcc_checking_assert, symtab_node::get(), ipa_get_jf_constant(), IPA_JF_CONST, NULL, TREE_CODE, TREE_OPERAND, and ipa_jump_func::type.
Referenced by ipa_duplicate_jump_function(), try_decrement_rdesc_refcount(), and try_make_edge_direct_simple_call().
|
static |
If JFUNC is a constant jump function with a usable rdesc, decrement its refcount and if it hits zero, remove reference to SYMBOL from the caller of the edge specified in the rdesc. Return false if either the symbol or the reference could not be found, otherwise return true.
References IPA_JF_CONST, jfunc_rdesc_usable(), ipa_cst_ref_desc::refcount, remove_described_reference(), symtab_node_for_jfunc(), and ipa_jump_func::type.
Referenced by ipa_edge_args_sum_t::remove(), and try_make_edge_direct_simple_call().
|
static |
Try to find a destination for indirect edge IE that corresponds to a simple call or a call of a member function pointer and where the destination is a pointer formal parameter described by jump function JFUNC. TARGET_TYPE is the type of the parameter to which the result of JFUNC is passed. If it can be determined, return the newly direct edge, otherwise return NULL. NEW_ROOT and NEW_ROOT_INFO is the node and its info that JFUNC lattices are relative to.
References ipa_jump_func::agg, cgraph_indirect_call_info::agg_contents, cgraph_indirect_call_info::by_ref, cgraph_edge::callee, gcc_checking_assert, cgraph_indirect_call_info::guaranteed_unmodified, cgraph_edge::indirect_info, ipa_find_agg_cst_from_init(), ipa_find_agg_cst_from_jfunc_items(), IPA_JF_CONST, ipa_make_edge_direct_to_target(), ipa_value_from_jfunc(), NULL, NULL_TREE, cgraph_indirect_call_info::offset, symtab_node_for_jfunc(), try_decrement_rdesc_refcount(), and ipa_jump_func::type.
Referenced by update_indirect_edges_after_inlining().
|
static |
Try to find a destination for indirect edge IE that corresponds to a virtual call based on a formal parameter which is described by jump function JFUNC and if it can be determined, make it direct and return the direct edge. Otherwise, return NULL. CTX describes the polymorphic context that the parameter the call is based on brings along with it. NEW_ROOT and NEW_ROOT_INFO is the node and its info that JFUNC lattices are relative to.
References ipa_jump_func::agg, cgraph_indirect_call_info::by_ref, cgraph_edge::caller, ipa_polymorphic_call_context::combine_with(), cgraph_indirect_call_info::context, symtab_node::decl, fndecl_built_in_p(), gcc_assert, cgraph_node::get(), cgraph_node::get_create(), gimple_get_virt_method_for_vtable(), cgraph_edge::in_polymorphic_cdtor, cgraph_edge::indirect_info, ipa_find_agg_cst_from_init(), ipa_find_agg_cst_from_jfunc_items(), ipa_get_jf_constant(), ipa_impossible_devirt_target(), IPA_JF_CONST, ipa_make_edge_direct_to_target(), cgraph_edge::maybe_hot_p(), NULL, NULL_TREE, cgraph_indirect_call_info::offset, offset, ipa_polymorphic_call_context::offset_by(), opt_for_fn, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, ipa_polymorphic_call_context::possible_dynamic_type_change(), possible_polymorphic_call_target_p(), possible_polymorphic_call_targets(), cgraph_edge::speculative, try_speculative_devirtualization(), ipa_jump_func::type, cgraph_indirect_call_info::vptr_changed, and vtable_pointer_value_to_vtable().
Referenced by update_indirect_edges_after_inlining().
Inspect the given TYPE and return true iff it has the same structure (the same number of fields of the same types) as a C++ member pointer. If METHOD_PTR and DELTA are non-NULL, store the trees representing the corresponding fields there.
References DECL_CHAIN, DECL_FIELD_OFFSET, INTEGRAL_TYPE_P, POINTER_TYPE_P, TREE_CODE, tree_fits_uhwi_p(), TREE_TYPE, and TYPE_FIELDS.
Referenced by ipa_get_stmt_member_ptr_load_param().
bool unadjusted_ptr_and_unit_offset | ( | tree | op, |
tree * | ret, | ||
poly_int64 * | offset_ret ) |
Walk pointer adjustemnts from OP (such as POINTER_PLUS and ADDR_EXPR) to find original pointer. Initialize RET to the pointer which results from the walk. If offset is known return true and initialize OFFSET_RET.
References get_addr_base_and_unit_offset(), get_base_address(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_assign_single_p(), i, is_gimple_assign(), mem_ref_offset(), offset, ptrdiff_tree_p(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, TREE_CODE, and TREE_OPERAND.
|
static |
Update the param called notes associated with NODE when CS is being inlined, assuming NODE is (potentially indirectly) inlined into CS->callee. Moreover, if the callee is discovered to be constant, create a new cgraph edge for it. Newly discovered indirect edges will be added to *NEW_EDGES, unless NEW_EDGES is NULL. Return true iff a new edge(s) were created.
References cgraph_indirect_call_info::agg_contents, cgraph_edge::callee, cgraph_edge::caller, symtab_node::decl, cgraph_edge::first_speculative_call_target(), cgraph_node::function_symbol(), cgraph_node::indirect_calls, cgraph_edge::indirect_info, cgraph_edge::indirect_inlining_edge, cgraph_node::inlined_to, ipa_check_create_edge_args(), ipa_context_from_jfunc(), ipa_edge_args_sum, ipa_get_cs_argument_count(), ipa_get_ith_jump_func(), ipa_get_jf_ancestor_agg_preserved(), ipa_get_jf_ancestor_formal_id(), ipa_get_jf_ancestor_offset(), ipa_get_jf_ancestor_type_preserved(), ipa_get_jf_pass_through_agg_preserved(), ipa_get_jf_pass_through_formal_id(), ipa_get_jf_pass_through_operation(), ipa_get_jf_pass_through_type_preserved(), ipa_get_type(), IPA_JF_ANCESTOR, IPA_JF_PASS_THROUGH, ipa_node_params_sum, ipa_set_param_used_by_indirect_call(), ipa_set_param_used_by_polymorphic_call(), cgraph_edge::next_callee, cgraph_edge::next_speculative_call_target(), NULL, cgraph_indirect_call_info::offset, opt_for_fn, cgraph_indirect_call_info::param_index, cgraph_indirect_call_info::polymorphic, cgraph_edge::speculative, try_make_edge_direct_simple_call(), try_make_edge_direct_virtual_call(), ipa_jump_func::type, and cgraph_indirect_call_info::vptr_changed.
Referenced by propagate_info_to_inlined_callees().
|
static |
Update the jump functions associated with call graph edge E when the call graph edge CS is being inlined, assuming that E->caller is already (possibly indirectly) inlined into CS->callee and that E has not been inlined.
References ipa_jump_func::agg, ipa_ancestor_jf_data::agg_preserved, ipa_pass_through_data::agg_preserved, ipa_jump_func::jump_func_value::ancestor, ipa_agg_jump_function::by_ref, ipa_load_agg_data::by_ref, ipa_polymorphic_call_context::combine_with(), ipa_agg_jf_item::jump_func_agg_value::constant, ipa_jump_func::jump_func_value::constant, count, FOR_EACH_VEC_ELT, FOR_EACH_VEC_SAFE_ELT, ipa_ancestor_jf_data::formal_id, ipa_pass_through_data::formal_id, gcc_assert, gcc_checking_assert, gcc_unreachable, ipa_vr::get_vrange(), i, cgraph_edge::in_polymorphic_cdtor, value_range::intersect(), ipa_edge_args_sum, ipa_get_cs_argument_count(), ipa_get_ith_jump_func(), ipa_get_ith_polymorhic_call_context(), ipa_get_jf_ancestor_agg_preserved(), ipa_get_jf_ancestor_formal_id(), ipa_get_jf_ancestor_keep_null(), ipa_get_jf_ancestor_offset(), ipa_get_jf_ancestor_type_preserved(), ipa_get_jf_pass_through_agg_preserved(), ipa_get_jf_pass_through_formal_id(), ipa_get_jf_pass_through_operand(), ipa_get_jf_pass_through_operation(), ipa_get_jf_pass_through_refdesc_decremented(), ipa_get_jf_pass_through_type_preserved(), IPA_JF_ANCESTOR, IPA_JF_CONST, IPA_JF_LOAD_AGG, IPA_JF_PASS_THROUGH, IPA_JF_UNKNOWN, ipa_set_ancestor_jf(), ipa_set_jf_arith_pass_through(), ipa_set_jf_cst_copy(), ipa_set_jf_simple_pass_through(), ipa_set_jf_unary_pass_through(), ipa_set_jf_unknown(), ipa_set_jfunc_vr(), ipa_vr_operation_and_type_effects(), ipa_zap_jf_refdesc(), ipa_agg_jump_function::items, ipa_agg_jf_item::jftype, ipa_ancestor_jf_data::keep_null, ipa_vr::known_p(), ipa_agg_jf_item::jump_func_agg_value::load_agg, ipa_jump_func::m_vr, ipa_agg_jf_item::offset, ipa_ancestor_jf_data::offset, ipa_load_agg_data::offset, ipa_polymorphic_call_context::offset_by(), ipa_pass_through_data::operation, ipa_agg_jf_item::jump_func_agg_value::pass_through, ipa_jump_func::jump_func_value::pass_through, ipa_polymorphic_call_context::possible_dynamic_type_change(), tcc_unary, TREE_CODE_CLASS, ipa_jump_func::type, ipa_vr::type(), value_range::undefined_p(), ipa_polymorphic_call_context::useless_p(), ipa_agg_jf_item::value, ipa_constant_data::value, ipa_jump_func::value, vec_safe_copy(), and vec_safe_grow_cleared().
Referenced by propagate_info_to_inlined_callees().
|
static |
Return true if the IPA-CP transformation summary TS is non-NULL and contains useful info.
References ipcp_transformation::m_agg_values, ipcp_transformation::m_vr, and vec_safe_is_empty().
Referenced by ipcp_write_transformation_summaries().
Callback of walk_stmt_load_store_addr_ops for the visit_load. If OP is a parameter declaration, mark it as used in the info structure passed in DATA.
References gcc_assert, get_base_address(), ipa_get_param_decl_index(), ipa_set_param_used(), and TREE_CODE.
Referenced by ipa_analyze_params_uses_in_bb().
void write_ipcp_transformation_info | ( | output_block * | ob, |
cgraph_node * | node, | ||
ipcp_transformation * | ts ) |
Write into OB IPA-CP transfromation summary TS describing NODE.
References bitpack_create(), bp_pack_value(), ipa_argagg_value::by_ref, output_block::decl_state, ipa_argagg_value::index, ipa_argagg_value::killed, lto_symtab_encoder_encode(), lto_symtab_encoder_only_for_inlining_p(), ipcp_transformation::m_agg_values, ipcp_transformation::m_vr, output_block::main_stream, stream_write_tree, ipa_vr::streamer_write(), streamer_write_bitpack(), streamer_write_uhwi(), lto_out_decl_state::symtab_node_encoder, ipa_argagg_value::unit_offset, ipa_argagg_value::value, and vec_safe_length().
Referenced by ipcp_write_transformation_summaries().
|
static |
Holders of ipa cgraph hooks:
Referenced by ipa_prop_cc_finalize(), ipa_register_cgraph_hooks(), and ipa_unregister_cgraph_hooks().
ipa_edge_args_sum_t* ipa_edge_args_sum |
Edge summary for IPA-CP edge information.
Referenced by adjust_references_in_caller(), analyze_function_body(), cgraph_edge_brings_all_scalars_for_node(), check_argument_count(), ipa_icf_gimple::func_checker::compare_gimple_call(), evaluate_properties_for_edge(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), ipa_check_create_edge_args(), ipa_compute_jump_functions_for_edge(), ipa_context_from_jfunc(), ipa_edge_args_info_available_for_edge_p(), ipa_free_all_edge_args(), ipa_merge_fn_summary_after_inlining(), ipa_print_node_jump_functions_for_edge(), ipa_prop_cc_finalize(), ipa_prop_write_jump_functions(), ipa_propagate_indirect_call_infos(), ipa_read_edge_info(), ipa_write_node_info(), propagate_constants_across_call(), propagate_context_across_jump_function(), propagate_controlled_uses(), push_agg_values_for_index_from_edge(), push_agg_values_from_edge(), remap_edge_params(), update_indirect_edges_after_inlining(), and update_jump_functions_after_inlining().
ipa_node_params_t* ipa_node_params_sum = NULL |
Interprocedural analyses. Copyright (C) 2005-2024 Free Software Foundation, Inc. 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/>.
Function summary where the parameter infos are actually stored.
Referenced by add_all_node_vals_to_toposort(), adjust_references_in_caller(), analyze_function_body(), calls_same_node_or_its_all_contexts_clone_p(), cgraph_edge_brings_all_agg_vals_for_node(), cgraph_edge_brings_all_scalars_for_node(), cgraph_edge_brings_value_p(), cgraph_edge_brings_value_p(), check_argument_count(), create_specialized_node(), decide_about_value(), decide_whether_version_node(), ipa_fn_summary_t::duplicate(), ipa_cached_call_context::duplicate_from(), early_inliner(), ipa_call_context::equal_to(), estimate_calls_size_and_time(), estimate_local_effects(), evaluate_properties_for_edge(), find_aggregate_values_for_callers_subset(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), gather_caller_stats(), get_info_about_necessary_edges(), good_cloning_opportunity_p(), has_undead_caller_from_outside_scc_p(), identify_dead_nodes(), initialize_node_lattices(), inline_read_section(), ipa_alloc_node_params(), ipa_analyze_controlled_uses(), ipa_analyze_node(), ipa_check_create_node_params(), ipa_compute_jump_functions_for_edge(), ipa_duplicate_jump_function(), ipa_free_all_node_params(), ipa_initialize_node_params(), ipa_merge_fn_summary_after_inlining(), ipa_note_param_call(), ipa_print_node_params(), ipa_prop_cc_finalize(), ipa_prop_write_jump_functions(), ipa_propagate_indirect_call_infos(), ipa_read_node_info(), ipa_write_node_info(), ipcp_discover_new_direct_edges(), ipcp_propagate_stage(), ipcp_store_vr_results(), ipcp_verify_propagated_values(), ipcp_versionable_function_p(), ipa_icf::sem_function::param_used_p(), pop_node_from_stack(), print_all_lattices(), propagate_aggregate_lattice(), propagate_aggs_across_jump_function(), propagate_bits_across_jump_function(), propagate_constants_across_call(), propagate_constants_topo(), propagate_context_across_jump_function(), propagate_controlled_uses(), propagate_scalar_across_jump_function(), propagate_vr_across_jump_function(), push_agg_values_for_index_from_edge(), push_node_to_stack(), remap_edge_params(), self_recursive_agg_pass_through_p(), self_recursive_pass_through_p(), set_single_call_flag(), spread_undeadness(), update_indirect_edges_after_inlining(), and want_remove_some_param_p().
|
static |
Allocation pool for reference descriptions.
Referenced by ipa_duplicate_jump_function(), ipa_free_all_structures_after_iinln(), ipa_free_all_structures_after_ipa_cp(), and ipa_set_jf_constant().
|
static |
Variable hoding the return value summary.
Referenced by ipa_record_return_value_range(), and ipa_return_value_range().
|
static |
Hash table for avoid repeated allocations of equal ranges.
Referenced by ipa_check_create_edge_args(), ipa_get_value_range(), ipa_record_return_value_range(), and ipcp_transformation_initialize().
function_summary<ipcp_transformation *>* ipcp_transformation_sum = NULL |
Function summary where the IPA CP transformations are actually stored.
Referenced by ipa_propagate_indirect_call_infos(), ipa_set_node_agg_value_chain(), ipcp_free_transformation_sum(), ipcp_get_transformation_summary(), ipcp_store_vr_results(), ipcp_transformation_initialize(), and read_ipcp_transformation_info().