GCC Middle and Back End API Reference
|
Go to the source code of this file.
Macros | |
#define | ALIAS_SET_MEMORY_BARRIER ((alias_set_type) -1) |
#define ALIAS_SET_MEMORY_BARRIER ((alias_set_type) -1) |
This alias set can be used to force a memory to conflict with all other memories, creating a barrier across which no memory reference can move. Note that there are other legacy ways to create such memory barriers, including an address of SCRATCH.
Referenced by check_mem_read_rtx(), get_builtin_sync_mem(), may_alias_p(), read_dependence(), true_dependence_1(), and write_dependence_p().
Return whether the pointer-types T1 and T2 used to determine two alias sets of two references will yield the same answer from get_deref_alias_set.
References get_deref_alias_set(), ref_all_alias_ptr_type_p(), TREE_TYPE, and TYPE_MAIN_VARIANT.
Referenced by ao_compare::compare_ao_refs(), and operand_compare::operand_equal_p().
|
extern |
Return true if the first alias set is a subset of the second.
References alias_set_entry::children, hash_map< KeyId, Value, Traits >::get(), get_alias_set_entry(), alias_set_entry::has_pointer, alias_set_entry::has_zero_child, alias_set_entry::is_pointer, ptr_type_node, and TYPE_ALIAS_SET.
Referenced by access_path_may_continue_p(), compute_avail(), cse_insn(), dse_optimize_redundant_stores(), eliminate_dom_walker::eliminate_stmt(), mems_same_for_tbaa_p(), refs_same_for_tbaa_p(), and visit_reference_op_store().
|
extern |
Return true if the two specified alias sets may conflict.
References alias_sets_must_conflict_p(), alias_stats, alias_set_entry::children, hash_map< KeyId, Value, Traits >::get(), get_alias_set_entry(), alias_set_entry::has_pointer, alias_set_entry::is_pointer, ptr_type_node, and TYPE_ALIAS_SET.
Referenced by check_scan_store(), dr_may_alias_p(), gimplify_init_ctor_preeval_1(), indirect_ref_may_alias_decl_p(), indirect_refs_may_alias_p(), mems_in_disjoint_alias_sets_p(), modref_may_conflict(), refs_may_alias_p_2(), safe_from_p(), same_type_for_tbaa(), set_mem_alias_set(), vect_analyze_data_ref_dependence(), vect_create_data_ref_ptr(), vectorizable_load(), and vectorizable_store().
|
extern |
Return true if the two specified alias sets will always conflict.
References alias_stats.
Referenced by alias_sets_conflict_p(), and objects_must_conflict_p().
BASE1 and BASE2 are decls. Return 1 if they refer to same object, 0 if they refer to different objects and -1 if we cannot decide.
References DECL_ASSEMBLER_NAME_RAW, DECL_ASSEMBLER_NAME_SET_P, DECL_HARD_REGISTER, decl_in_symtab_p(), DECL_P, symtab_node::equal_address_to(), gcc_checking_assert, symtab_node::get(), and VAR_P.
Referenced by compare_base_symbol_refs(), decl_refs_may_alias_p(), nonoverlapping_memrefs_p(), and ptr_deref_may_alias_decl_p().
|
extern |
Return the outermost parent of component present in the chain of component references handled by get_inner_reference in T with the following property: - the component is non-addressable or NULL_TREE if no such parent exists. In the former cases, the alias set of this parent is the alias set that must be used for T itself.
References ends_tbaa_access_path_p(), handled_component_p(), NULL_TREE, and TREE_OPERAND.
Referenced by reference_alias_ptr_type_1(), and set_mem_attributes_minus_bitpos().
|
extern |
References alias_stats.
Referenced by dump_alias_stats().
|
extern |
Return true if T is an end of the access path which can be used by type based alias oracle.
References DECL_NONADDRESSABLE_P, gcc_unreachable, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_NONALIASED_COMPONENT.
Referenced by aliasing_component_refs_p(), ao_compare::compare_ao_refs(), component_uses_parent_alias_set_from(), nonoverlapping_component_refs_p(), and nonoverlapping_refs_since_match_p().
|
extern |
Return the alias set for T, which may be either a type or an expression. Call language-specific routine for help, if needed.
References AGGREGATE_TYPE_P, build_pointer_type(), build_reference_type(), canonical_type_used_p(), COMPLETE_TYPE_P, DECL_RTL, DECL_RTL_SET_P, error_mark_node, gcc_checking_assert, get_alias_set(), lang_hooks::get_alias_set, get_alias_set_entry(), get_deref_alias_set(), alias_set_entry::has_pointer, init_alias_set_entry(), alias_set_entry::is_pointer, MEM_ALIAS_SET, MEM_P, new_alias_set(), NULL, odr_type_p(), POINTER_TYPE_P, prevailing_odr_type(), ptr_type_node, record_component_aliases(), reference_alias_ptr_type_1(), STRIP_NOPS, TREE_CODE, TREE_TYPE, TYPE_ALIAS_SET, TYPE_ALIAS_SET_KNOWN_P, TYPE_CANONICAL, TYPE_MAIN_VARIANT, TYPE_NONALIASED_COMPONENT, TYPE_P, TYPE_STRUCTURAL_EQUALITY_P, TYPE_TYPELESS_STORAGE, type_with_alias_set_p(), and VAR_P.
Referenced by ao_ref_alias_set(), ao_ref_base_alias_set(), assign_stack_temp_for_type(), check_scan_store(), dr_may_alias_p(), dump_lto_records(), expand_assignment(), expand_builtin_va_copy(), get_alias_set(), get_deref_alias_set(), ipa_polymorphic_call_context::get_dynamic_type(), get_group_alias_ptr_type(), gimple_get_alias_set(), gimplify_init_constructor(), gimplify_init_ctor_preeval_1(), make_bit_field_ref(), objects_must_conflict_p(), record_component_aliases(), record_component_aliases(), safe_from_p(), same_type_for_tbaa(), set_mem_attributes_minus_bitpos(), store_constructor(), vect_analyze_data_ref_dependence(), vect_create_data_ref_ptr(), vectorizable_load(), and vectorizable_store().
|
extern |
Return the alias set for the memory pointed to by T, which may be either a type or an expression.
References get_alias_set(), get_deref_alias_set_1(), TREE_TYPE, and TYPE_P.
Referenced by alias_ptr_types_compatible_p(), call_may_clobber_ref_p_1(), get_alias_set(), ipa_icf::sem_item_optimizer::read_section(), ref_maybe_used_by_call_p_1(), and vn_reference_lookup_3().
|
extern |
References frame_set, and new_alias_set().
Referenced by gen_frame_mem(), gen_tmp_stack_mem(), and setup_save_areas().
|
extern |
References new_alias_set(), and varargs_set.
Similar to refs_same_for_tbaa_p() but for use on MEM rtxs.
References alias_set_subset_of(), gcc_assert, MEM_ALIAS_SET, MEM_EXPR, MEM_P, and refs_same_for_tbaa_p().
Referenced by cselib_redundant_set_p(), record_store(), and store_expr().
|
extern |
Exported functions from alias.cc Copyright (C) 2004-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/>.
Return a brand-new alias set.
References alias_sets, NULL, and vec_safe_push().
Referenced by asan_init_shadow_ptr_types(), expand_builtin_longjmp(), expand_builtin_setjmp_setup(), get_alias_set(), get_frame_alias_set(), get_spill_slot_decl(), get_varargs_alias_set(), and rt_bb_visited::rt_bb_visited().
Return true if we can determine the exprs corresponding to memrefs X and Y and they do not overlap. If LOOP_VARIANT is set, skip offset-based disambiguation
References adjust_offset_for_component_ref(), compare_base_decls(), CONSTANT_P, decl_for_component_ref(), DECL_P, DECL_RTL, DECL_RTL_SET_P, GET_MODE, GET_MODE_SIZE(), get_spill_slot_decl(), is_gimple_reg(), MEM_ADDR_SPACE, MEM_EXPR, MEM_OFFSET, MEM_OFFSET_KNOWN_P, MEM_P, MEM_SIZE, MEM_SIZE_KNOWN_P, offset_overlap_p(), REG_P, REGNO, REGNO_PTR_FRAME_P, rtx_equal_p(), strip_offset_and_add(), TREE_CODE, XEXP, and y.
Referenced by may_alias_p(), true_dependence_1(), and write_dependence_p().
Return true if any MEM object of type T1 will always conflict (using the dependency routines in this file) with any MEM object of type T2. This is used when allocating temporary storage. If T1 and/or T2 are NULL_TREE, it means we know nothing about the storage.
References alias_sets_must_conflict_p(), alias_stats, get_alias_set(), and TYPE_VOLATILE.
Referenced by assign_stack_temp_for_type().
|
extern |
Indicate that things in SUBSET can alias things in SUPERSET, but that not everything that aliases SUPERSET also aliases SUBSET. For example, in C, a store to an `int' can alias a load of a structure containing an `int', and vice versa. But it can't alias a load of a 'double' member of the same structure. Here, the structure would be the SUPERSET and `int' the SUBSET. This relationship is also described in the comment at the beginning of this file. This function should be called only once per SUPERSET/SUBSET pair. It is illegal for SUPERSET to be zero; everything is implicitly a subset of alias set zero.
References hash_map< KeyId, Value, Traits >::begin(), alias_set_entry::children, hash_map< KeyId, Value, Traits >::create_ggc(), hash_map< KeyId, Value, Traits >::end(), gcc_assert, get_alias_set_entry(), alias_set_entry::has_pointer, alias_set_entry::has_zero_child, init_alias_set_entry(), and hash_map< KeyId, Value, Traits >::put().
Referenced by record_component_aliases().
|
extern |
Record that component types of TYPE, if any, are part of that type for aliasing purposes. For record types, we only record component types for fields that are not marked non-addressable. For array types, we only record the component type if it is not marked non-aliased.
References get_alias_set(), and record_component_aliases().
Return the pointer-type relevant for TBAA purposes from the gimple memory reference tree T. This is the type to be used for the offset operand of MEM_REF or TARGET_MEM_REF replacements of T and guarantees that get_alias_set will return the same alias set for T and the replacement.
References build_pointer_type(), lang_hooks::get_alias_set, NULL_TREE, ptr_type_node, reference_alias_ptr_type_1(), TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_MAIN_VARIANT.
Referenced by ao_ref_alias_ptr_type(), ao_ref_base_alias_ptr_type(), build_debug_ref_for_model(), build_ref_for_offset(), check_scan_store(), compute_avail(), dr_analyze_indices(), gather_mem_refs_stmt(), get_group_alias_ptr_type(), gimplify_expr(), initialize_data_dependence_relation(), instrument_bool_enum_load(), maybe_trim_constructor_store(), predicate_load_or_store(), ref_at_iteration(), rewrite_use_address(), set_mem_attributes_minus_bitpos(), vect_recog_cond_store_pattern(), vect_setup_realignment(), vectorizable_load(), vectorizable_scan_store(), and vectorizable_store().
Return the pointer-type relevant for TBAA purposes from the memory reference tree *T or NULL_TREE in which case *T is adjusted to point to the outermost component reference that can be used for assigning an alias set.
References component_uses_parent_alias_set_from(), handled_component_p(), INDIRECT_REF_P, NULL_TREE, ref_all_alias_ptr_type_p(), TMR_OFFSET, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MAIN_VARIANT, and view_converted_memref_p().
Referenced by get_alias_set(), and reference_alias_ptr_type().
Return true if the ref EARLIER behaves the same as LATER with respect to TBAA for every memory reference that might follow LATER.
References alias_set_subset_of(), ao_ref_alias_set(), ao_ref_base_alias_set(), and ao_ref_init().
Referenced by cse_insn(), mems_same_for_tbaa_p(), and dom_opt_dom_walker::optimize_stmt().
Return true if access with BASE is view converted. Base must not be stripped from inner MEM_REF (&decl) which is done by ao_ref_base and thus one extra walk of handled components is needed.
References same_type_for_tbaa(), TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Referenced by ao_compare::compare_ao_refs(), and reference_alias_ptr_type_1().