GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | pt_solution |
class | ao_ref |
Enumerations | |
enum | translate_flags { TR_TRANSLATE , TR_VALUEIZE_AND_DISAMBIGUATE , TR_DISAMBIGUATE } |
Variables | |
struct pt_solution | ipa_escaped_pt |
enum translate_flags |
Returns a type satisfying get_deref_alias_set (type) == ao_ref_alias_set (REF).
References NULL_TREE, ao_ref::ref, and reference_alias_ptr_type().
Referenced by ao_compare::compare_ao_refs(), and ipa_icf::sem_function::hash_stmt().
|
extern |
Returns the reference alias set of the memory reference *REF.
References get_alias_set(), ao_ref::ref, and ao_ref::ref_alias_set.
Referenced by call_may_clobber_ref_p_1(), ao_compare::compare_ao_refs(), compute_avail(), dse_optimize_redundant_stores(), eliminate_dom_walker::eliminate_stmt(), gather_mem_refs_stmt(), ao_compare::hash_ao_ref(), modref_may_conflict(), ref_maybe_used_by_call_p_1(), refs_may_alias_p_2(), refs_same_for_tbaa_p(), visit_reference_op_store(), vn_reference_insert(), vn_reference_lookup(), and vn_reference_lookup_3().
|
extern |
Return the alignment of the access *REF and store it in the *ALIGN and *BITPOS pairs. Returns false if no alignment could be determined. See get_object_alignment_2 for details.
References ptr_info_def::align, ao_ref::base, get_object_alignment_1(), get_object_alignment_2(), poly_int< N, C >::is_constant(), ao_ref::offset, offset, and ao_ref::ref.
Referenced by compute_trims().
Returns the base object of the memory reference *REF.
References ao_ref::base, get_ref_base_and_extent(), ao_ref::max_size, ao_ref::offset, ao_ref::ref, and ao_ref::size.
Referenced by ao_ref_from_mem(), call_may_clobber_ref_p_1(), ao_compare::compare_ao_refs(), default_ref_may_alias_errno(), gather_mem_refs_stmt(), ao_compare::hash_ao_ref(), mark_aliased_reaching_defs_necessary_1(), maybe_warn_operand(), ptr_deref_may_alias_ref_p_1(), ref_may_alias_global_p(), ref_maybe_used_by_call_p_1(), ref_maybe_used_by_stmt_p(), refs_may_alias_p_2(), stmt_kills_ref_p(), valid_ao_ref_for_dse(), valid_ao_ref_kill_for_dse(), vn_reference_lookup(), vn_reference_lookup_2(), and vn_reference_lookup_3().
Returns a type satisfying get_deref_alias_set (type) == ao_ref_base_alias_set (REF).
References handled_component_p(), NULL_TREE, ao_ref::ref, reference_alias_ptr_type(), TREE_CODE, and TREE_OPERAND.
Referenced by ao_compare::compare_ao_refs(), and ipa_icf::sem_function::hash_stmt().
|
extern |
Returns the base object alias set of the memory reference *REF.
References ao_ref::base_alias_set, get_alias_set(), handled_component_p(), ao_ref::ref, TREE_CODE, and TREE_OPERAND.
Referenced by call_may_clobber_ref_p_1(), ao_compare::compare_ao_refs(), compute_avail(), dse_optimize_redundant_stores(), eliminate_dom_walker::eliminate_stmt(), gather_mem_refs_stmt(), ao_compare::hash_ao_ref(), modref_may_conflict(), ref_maybe_used_by_call_p_1(), refs_may_alias_p_2(), refs_same_for_tbaa_p(), visit_reference_op_store(), vn_reference_insert(), vn_reference_lookup(), and vn_reference_lookup_3().
In tree-ssa-alias.cc
Initializes the alias-oracle reference representation *R from REF.
References NULL_TREE, r, and TREE_THIS_VOLATILE.
Referenced by ao_ref_from_mem(), call_may_clobber_ref_p(), ipa_icf_gimple::func_checker::compare_operand(), compute_avail(), detect_type_change_from_memory_writes(), determine_known_aggregate_parts(), dse_classify_store(), dse_optimize_redundant_stores(), eliminate_dom_walker::eliminate_stmt(), pcom_worker::find_looparound_phi(), gather_mem_refs_stmt(), ipa_polymorphic_call_context::get_dynamic_type(), ipa_icf::sem_function::hash_stmt(), ifcvt_local_dce(), initialize_ao_ref_for_dse(), mark_aliased_reaching_defs_necessary(), mem_ref_alloc(), oacc_entry_exit_ok_1(), param_change_prob(), parm_preserved_before_stmt_p(), parm_ref_data_preserved_p(), ref_maybe_used_by_call_p_1(), ref_maybe_used_by_stmt_p(), refs_anti_dependent_p(), refs_may_alias_p(), refs_may_alias_p(), refs_output_dependent_p(), refs_same_for_tbaa_p(), stmt_kills_ref_p(), stmt_may_clobber_ref_p(), stmt_may_clobber_ref_p_1(), unmodified_parm_1(), vect_slp_analyze_load_dependences(), vect_slp_analyze_store_dependences(), visit_reference_op_call(), visit_reference_op_store(), vn_reference_insert(), vn_reference_lookup(), vn_reference_lookup_3(), vn_walk_cb_data::vn_walk_cb_data(), vuse_semi_invariant_p(), and warn_uninitialized_vars().
|
extern |
Init an alias-oracle reference representation from a gimple pointer PTR a range specified by OFFSET, SIZE and MAX_SIZE under the assumption that RANGE_KNOWN is set. The access is assumed to be only to or after of the pointer target adjusted by the offset, not before it (even in the case RANGE_KNOWN is false).
References ao_ref::base, ao_ref::base_alias_set, build2(), char_type_node, gcc_assert, get_addr_base_and_unit_offset(), get_base_address(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_assign_single_p(), is_gimple_assign(), ao_ref::max_size, null_pointer_node, NULL_TREE, ao_ref::offset, offset, POINTER_TYPE_P, ptrdiff_tree_p(), ao_ref::ref, ao_ref::ref_alias_set, ao_ref::size, SSA_NAME_DEF_STMT, TREE_CODE, TREE_OPERAND, TREE_TYPE, and ao_ref::volatile_p.
Referenced by ao_ref_init_from_ptr_and_size(), check_fnspec(), and modref_access_node::get_ao_ref().
Init an alias-oracle reference representation from a gimple pointer PTR and a gimple size SIZE in bytes. If SIZE is NULL_TREE then the size is assumed to be unknown. The access is assumed to be only to or after of the pointer target, not before it.
References ao_ref_init_from_ptr_and_range(), coeffs_in_range_p(), HOST_WIDE_INT_MAX, and poly_int_tree_p().
Referenced by call_may_clobber_ref_p_1(), determine_known_aggregate_parts(), ipa_polymorphic_call_context::get_dynamic_type(), gimple_fold_builtin_memory_op(), initialize_ao_ref_for_dse(), maybe_invalidate(), maybe_warn_pass_by_reference(), parm_ref_data_pass_through_p(), ref_maybe_used_by_call_p_1(), stmt_kills_ref_p(), and vn_reference_lookup_3().
If the call in statement CALL may clobber the memory reference REF return true, otherwise return false.
References alias_stats, ao_ref_init(), call_may_clobber_ref_p_1(), and r.
Referenced by dest_safe_for_nrv_p(), and find_tail_calls().
If the call in statement CALL may clobber the memory reference REF return true, otherwise return false.
References alias_stats, ao_ref_alias_set(), ao_ref_base(), ao_ref_base_alias_set(), ao_ref_init_from_ptr_and_size(), ao_ref::base, ao_ref::base_alias_set, bitmap_bit_p, check_fnspec(), CONSTANT_CLASS_P, DECL_P, dump_file, dump_flags, symtab_node::dump_name(), ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_NOVOPS, ECF_PURE, cgraph_node::get(), get_deref_alias_set(), get_modref_function_summary(), gimple_call_arg(), gimple_call_clobber_set(), gimple_call_flags(), gimple_call_fndecl(), gimple_call_internal_fn(), gimple_call_internal_p(), internal_fn_stored_value_index(), ipa_reference_get_written_global(), ipa_reference_var_uid(), is_global_var(), may_be_aliased(), modref_may_conflict(), NULL_TREE, print_generic_expr(), print_gimple_stmt(), ptr_info_def::pt, pt_solution_includes(), pt_solutions_intersect(), ao_ref::ref, ao_ref::ref_alias_set, refs_may_alias_p_1(), ao_ref::size, SSA_NAME_POINTS_TO_READONLY_MEMORY, SSA_NAME_PTR_INFO, modref_summary::stores, targetm, TDF_DETAILS, TREE_CODE, TREE_OPERAND, TREE_READONLY, TREE_STATIC, TREE_TYPE, TYPE_SIZE_UNIT, VAR_P, ao_ref::volatile_p, and modref_summary::writes_errno.
Referenced by call_may_clobber_ref_p(), stmt_may_clobber_ref_p_1(), and vn_reference_lookup_3().
|
extern |
In tree-ssa-structalias.cc
Compute points-to information for every SSA_NAME pointer in the current function and compute the transitive closure of escaped variables to re-initialize the call-clobber states of local variables.
References cfun, compute_dependence_clique(), compute_points_to_sets(), delete_points_to_sets(), dump_alias_info(), dump_file, dump_flags, gcc_assert, need_ssa_update_p(), TDF_ALIAS, and TDF_DETAILS.
Referenced by execute_function_todo().
|
extern |
Unified dump function for pt_solution.
References dump_points_to_solution().
|
extern |
References debug.
|
extern |
Dump alias information on stderr.
References dump_alias_info().
|
extern |
Dump points-to information for VAR into stderr.
References dump_points_to_info_for().
|
extern |
Dump alias information on FILE.
References cfun, current_function_decl, lang_hooks::decl_printable_name, dump_points_to_info_for(), dump_points_to_solution(), dump_variable(), FOR_EACH_LOCAL_DECL, FOR_EACH_SSA_NAME, i, may_be_aliased(), POINTER_TYPE_P, SSA_NAME_IN_FREE_LIST, SSA_NAME_PTR_INFO, and TREE_TYPE.
Referenced by compute_may_aliases(), and debug_alias_info().
|
extern |
References alias_stats, dump_alias_stats_in_alias_c(), and HOST_WIDE_INT_PRINT_DEC.
Referenced by dump_memory_report().
|
extern |
Dump points-to information for SSA_NAME PTR into FILE.
References dump_flags, dump_points_to_solution(), print_generic_expr(), ptr_info_def::pt, and SSA_NAME_PTR_INFO.
Referenced by debug_points_to_info_for(), dump_alias_info(), and dump_variable().
|
extern |
Dump the points-to set *PT into FILE.
References pt_solution::anything, pt_solution::const_pool, dump_decl_set(), pt_solution::escaped, pt_solution::ipa_escaped, pt_solution::nonlocal, pt_solution::null, ptr_info_def::pt, pt_solution::vars, pt_solution::vars_contains_escaped, pt_solution::vars_contains_escaped_heap, pt_solution::vars_contains_interposable, pt_solution::vars_contains_nonlocal, and pt_solution::vars_contains_restrict.
Referenced by debug(), dump_alias_info(), and dump_points_to_info_for().
|
extern |
References HOST_WIDE_INT_PRINT_DEC, and pta_stats.
Referenced by dump_memory_report().
|
extern |
|
extern |
Return true if the points-to solution *PT is empty.
References pt_solution::anything, bitmap_empty_p(), cfun, pt_solution::escaped, pt_solution::ipa_escaped, ipa_escaped_pt, pt_solution::nonlocal, pt_solution_empty_p(), and pt_solution::vars.
Referenced by dump_gimple_call(), pt_solution_empty_p(), and pt_solutions_intersect_1().
|
extern |
|
extern |
Return true if the points-to solution *PT contains a reference to a constant pool entry.
References cfun, pt_solution::const_pool, pt_solution::escaped, pt_solution::ipa_escaped, ipa_escaped_pt, and pt_solution::nonlocal.
Referenced by ptrs_compare_unequal().
|
extern |
Return true if the points-to solution *PT includes global memory. If ESCAPED_LOCAL_P is true then escaped local variables are also considered global.
References pt_solution::anything, cfun, pt_solution::escaped, pt_solution::ipa_escaped, ipa_escaped_pt, pt_solution::nonlocal, pt_solution_includes_global(), pt_solution::vars_contains_escaped, pt_solution::vars_contains_escaped_heap, and pt_solution::vars_contains_nonlocal.
Referenced by pt_solution_includes_global(), and ptr_deref_may_alias_global_p().
|
extern |
Reset the points-to solution *PT to a conservative default (point to anything).
References pt_solution::anything, and pt_solution::null.
Referenced by delete_tree_ssa(), expand_call_inline(), get_ptr_info(), gimple_call_reset_alias_info(), init_tree_ssa(), ipa_pta_execute(), parallelize_loops(), and pt_solution_ior_into().
|
extern |
Set the points-to solution *PT to point only to the variables in VARS. VARS_CONTAINS_GLOBAL specifies whether that contains global variables and VARS_CONTAINS_RESTRICT specifies whether it contains restrict tag variables.
References bitmap_intersect_p(), cfun, pt_solution::vars, pt_solution::vars_contains_escaped, and pt_solution::vars_contains_nonlocal.
Referenced by update_alias_info_with_stack_vars().
|
extern |
Set the points-to solution *PT to point only to the variable VAR.
References bitmap_bit_p, BITMAP_GGC_ALLOC, bitmap_set_bit, cfun, DECL_PT_UID, is_global_var(), pt_solution::vars, pt_solution::vars_contains_escaped, and pt_solution::vars_contains_nonlocal.
Referenced by copy_ref_info().
|
extern |
Return true if the points-to solution *PT only point to a single var, and return the var uid in *UID.
References pt_solution::anything, bitmap_first_set_bit(), bitmap_single_bit_set_p(), pt_solution::escaped, pt_solution::ipa_escaped, pt_solution::nonlocal, NULL, and pt_solution::vars.
Referenced by fold_builtin_alloca_with_align(), and same_addr_size_stores_p().
|
extern |
References pt_solutions_intersect_1(), and pta_stats.
Referenced by call_may_clobber_ref_p_1(), ptr_derefs_may_alias_p(), ptrs_compare_unequal(), and ref_maybe_used_by_call_p_1().
Return true, if dereferencing PTR may alias with a global variable. When ESCAPED_LOCAL_P is true escaped local memory is also considered global.
References ptr_info_def::pt, pt_solution_includes_global(), SSA_NAME_PTR_INFO, and TREE_CODE.
Referenced by points_to_local_or_readonly_memory_p(), ref_may_alias_global_p_1(), ref_maybe_used_by_stmt_p(), and thread_private_new_memory().
Return true if dereferenced PTR1 and PTR2 may alias. The caller is responsible for applying TBAA to see if accesses through PTR1 and PTR2 may conflict at all.
References CONSTANT_CLASS_P, DECL_P, get_base_address(), POINTER_TYPE_P, ptr_info_def::pt, pt_solutions_intersect(), ptr_deref_may_alias_decl_p(), ptr_derefs_may_alias_p(), SSA_NAME_PTR_INFO, STRIP_NOPS, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by dr_may_alias_p(), generate_memcpy_builtin(), indirect_refs_may_alias_p(), ptr_deref_may_alias_ref_p_1(), and ptr_derefs_may_alias_p().
Returns true if PTR1 and PTR2 compare unequal because of points-to.
References decl_binds_to_current_def_p(), DECL_EXTERNAL, varpool_node::get(), get_base_address(), integer_zerop(), symtab_node::nonzero_address(), pt_solution::null, NULL_TREE, ptr_info_def::pt, pt_solution_includes(), pt_solution_includes_const_pool(), pt_solutions_intersect(), SSA_NAME_PTR_INFO, TREE_CODE, TREE_OPERAND, TREE_STATIC, VAR_P, pt_solution::vars_contains_interposable, pt_solution::vars_contains_nonlocal, and pt_solution::vars_contains_restrict.
|
inline |
Return true, if the two ranges [POS1, SIZE1] and [POS2, SIZE2] overlap. SIZE1 and/or SIZE2 can be (unsigned)-1 in which case the range is open-ended. Otherwise return false.
Return whether REF can be subject to store data races.
References auto_var_p(), get_base_address(), and may_be_aliased().
Referenced by cond_store_replacement(), execute_sm(), and ifcvt_memrefs_wont_trap().
References ao_ref_base(), and ref_may_alias_global_p_1().
Referenced by dse_classify_store(), modref_may_conflict(), stmt_kills_ref_p(), and stmt_may_clobber_global_p().
References get_base_address(), and ref_may_alias_global_p_1().
If the statement STMT may use the memory reference REF return true, otherwise return false.
References ao_ref_base(), as_a(), DECL_P, dyn_cast(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_assign_single_p(), gimple_return_retval(), is_gimple_assign(), is_gimple_call(), is_gimple_min_invariant(), is_gimple_reg(), is_global_var(), ptr_deref_may_alias_global_p(), ref_maybe_used_by_call_p(), refs_may_alias_p(), TREE_CODE, and TREE_OPERAND.
Referenced by dest_safe_for_nrv_p(), dse_classify_store(), find_tail_calls(), propagate_with_phi(), ref_conflicts_with_region(), ref_indep_loop_p(), ref_maybe_used_by_stmt_p(), statement_sink_location(), and vect_slp_analyze_store_dependences().
References ao_ref_init(), r, and ref_maybe_used_by_stmt_p().
Returns true if there is a anti-dependence for the STORE that executes after the LOAD.
References ao_ref_init(), and refs_may_alias_p_1().
Referenced by dr_may_alias_p().
References ao_ref_init(), and refs_may_alias_p_1().
Return true, if the two memory references REF1 and REF2 may alias and update statistics.
References alias_stats, and refs_may_alias_p_2().
Referenced by call_may_clobber_ref_p_1(), check_fnspec(), gimple_fold_builtin_memory_op(), mem_refs_may_alias_p(), modref_may_conflict(), ref_maybe_used_by_call_p_1(), refs_anti_dependent_p(), refs_may_alias_p(), refs_may_alias_p(), refs_output_dependent_p(), rtx_refs_may_alias_p(), stmt_may_clobber_ref_p_1(), and vn_reference_lookup_3().
Returns true if there is a output dependence for the stores STORE1 and STORE2.
References ao_ref_init(), and refs_may_alias_p_1().
Referenced by dr_may_alias_p().
If STMT kills the memory reference REF return true, otherwise return false.
References alias_stats, ao_ref_base(), ao_ref_init_from_ptr_and_size(), array_ref_flexible_size_p(), as_a(), ao_ref::base, symtab_node::binds_to_current_def_p(), BUILT_IN_NORMAL, cfun, dbg_cnt(), DECL_FUNCTION_CODE(), dump_file, dump_flags, symtab_node::dump_name(), fold_build2, cgraph_node::get(), get_modref_function_summary(), get_ref_base_and_extent(), gimple_call_arg(), gimple_call_builtin_p(), gimple_call_fndecl(), gimple_call_lhs(), gimple_get_lhs(), gimple_has_lhs(), handled_component_p(), integer_zero_node, is_gimple_call(), kill, modref_summary::kills, ao_ref::max_size_known_p(), NULL, NULL_TREE, OEP_ADDRESS_OF, OEP_MATCH_SIDE_EFFECTS, offset, operand_equal_p(), poly_int_tree_p(), print_generic_expr(), print_gimple_stmt(), ao_ref::ref, ref_may_alias_global_p(), ref_maybe_used_by_call_p_1(), stmt_can_throw_external(), stmt_can_throw_internal(), store_kills_ref_p(), TDF_DETAILS, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_SIZE.
Referenced by check_defs(), dse_classify_store(), dse_optimize_redundant_stores(), statement_sink_location(), stmt_kills_ref_p(), and vn_reference_lookup_3().
References ao_ref_init(), r, and stmt_kills_ref_p().
Return true whether STMT may clobber global memory. When ESCAPED_LOCAL_P is true escaped local memory is also considered global.
References gimple_assign_lhs(), gimple_vdef(), ref_may_alias_global_p(), and TREE_CODE.
Referenced by mark_stmt_if_obviously_necessary().
References ao_ref_init(), r, and stmt_may_clobber_ref_p_1().
Referenced by compute_avail(), find_local_vars_to_propagate(), and find_replaceable_in_bb().
If the statement STMT may clobber the memory reference REF return true, otherwise return false.
References ao_ref_init(), as_a(), call_may_clobber_ref_p_1(), gimple_assign_lhs(), gimple_assign_single_p(), gimple_call_lhs(), is_gimple_call(), r, refs_may_alias_p_1(), and TREE_CODE.
Referenced by determine_known_aggregate_parts(), pcom_worker::find_looparound_phi(), maybe_invalidate(), maybe_skip_until(), ref_conflicts_with_region(), ref_indep_loop_p(), stmt_may_clobber_ref_p(), value_dies_in_block_x(), vect_slp_analyze_load_dependences(), vect_slp_analyze_store_dependences(), visit_reference_op_call(), vuse_semi_invariant_p(), walk_aliased_vdefs_1(), and walk_non_aliased_vuses().
|
extern |
References BITMAP_FREE, NULL, timevar_pop(), timevar_push(), visited, and walk_aliased_vdefs_1().
Referenced by detect_type_change_from_memory_writes(), ipa_polymorphic_call_context::get_dynamic_type(), mark_aliased_reaching_defs_necessary(), mark_all_reaching_defs_necessary(), maybe_warn_operand(), param_change_prob(), parm_preserved_before_stmt_p(), parm_ref_data_pass_through_p(), parm_ref_data_preserved_p(), and unmodified_parm_1().
|
extern |
|
extern |
IPA PTA solutions for ESCAPED.
Referenced by ipa_pta_execute(), pt_solution_empty_p(), pt_solution_includes_1(), pt_solution_includes_const_pool(), pt_solution_includes_global(), and pt_solutions_intersect_1().