GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | modref_summary |
Typedefs | |
typedef modref_tree< alias_set_type > | modref_records |
typedef unsigned short | eaf_flags_t |
Functions | |
modref_summary * | get_modref_function_summary (cgraph_node *func) |
modref_summary * | get_modref_function_summary (gcall *call, bool *interposed) |
void | ipa_modref_cc_finalize () |
void | ipa_merge_modref_summary_after_inlining (cgraph_edge *e) |
int | interposable_eaf_flags (int modref_flags, int flags) |
Variables | |
static const int | implicit_const_eaf_flags |
static const int | implicit_pure_eaf_flags |
static const int | ignore_stores_eaf_flags |
static const int | implicit_retslot_eaf_flags |
typedef unsigned short eaf_flags_t |
typedef modref_tree<alias_set_type> modref_records |
Search for references that a functions loads or stores. Copyright (C) 2019-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/>.
modref_summary * get_modref_function_summary | ( | cgraph_node * | func | ) |
Get function summary for FUNC if it exists, return NULL otherwise.
References AVAIL_INTERPOSABLE, current_function_decl, cgraph_node::get(), NULL, optimization_summaries, r, and cgraph_node::ultimate_alias_target().
Referenced by call_may_clobber_ref_p_1(), clear_bytes_written_by(), determine_global_memory_access(), dse_optimize_call(), get_modref_function_summary(), gimple_call_arg_flags(), gimple_call_retslot_flags(), gimple_call_static_chain_flags(), ref_maybe_used_by_call_p_1(), stmt_kills_ref_p(), stmt_may_terminate_function_p(), and visit_reference_op_call().
modref_summary * get_modref_function_summary | ( | gcall * | call, |
bool * | interposed ) |
Get function summary for CALL if it exists, return NULL otherwise. If non-null set interposed to indicate whether function may not bind to current def. In this case sometimes loads from function needs to be ignored.
References symtab_node::binds_to_current_def_p(), cgraph_node::get(), get_modref_function_summary(), gimple_call_fndecl(), NULL, and r.
|
inline |
If function does not bind to current def (i.e. it is inline in comdat section), the modref analysis may not match the behavior of function which will be later symbol interposed to. All side effects must match however it is possible that the other function body contains more loads which may trap. MODREF_FLAGS are flags determined by analysis of function body while FLAGS are flags known otherwise (i.e. by fnspec, pure/const attributes etc.)
References EAF_NO_DIRECT_CLOBBER, EAF_NO_DIRECT_ESCAPE, EAF_NO_DIRECT_READ, EAF_NO_INDIRECT_CLOBBER, EAF_NO_INDIRECT_ESCAPE, EAF_NO_INDIRECT_READ, EAF_NOT_RETURNED_DIRECTLY, EAF_NOT_RETURNED_INDIRECTLY, and EAF_UNUSED.
Referenced by gimple_call_arg_flags(), and gimple_call_retslot_flags().
void ipa_merge_modref_summary_after_inlining | ( | cgraph_edge * | edge | ) |
Call EDGE was inlined; merge summary from callee to the caller.
References modref_summary::arg_flags, modref_summary_lto::arg_flags, cgraph_edge::caller, cgraph_node::callers, modref_tree< T >::collapse(), symtab_node::decl, modref_summary::dump(), modref_summary_lto::dump(), dump_file, symtab_node::dump_name(), ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_NOVOPS, ECF_PURE, flags_from_decl_or_type(), FOR_EACH_VEC_ELT, i, cgraph_node::inlined_to, modref_summary::loads, modref_summary_lto::loads, modref_tree< T >::merge(), MODREF_RETSLOT_PARM, MODREF_STATIC_CHAIN_PARM, modref_summary::nondeterministic, modref_summary_lto::nondeterministic, NULL, remove_modref_edge_summaries(), modref_summary::retslot_flags, modref_summary_lto::retslot_flags, modref_summary::side_effects, modref_summary_lto::side_effects, modref_summary::static_chain_flags, modref_summary_lto::static_chain_flags, modref_summary::stores, modref_summary_lto::stores, summaries, summaries_lto, modref_summary::useful_p(), modref_summary_lto::useful_p(), and vNULL.
Referenced by inline_call().
void ipa_modref_cc_finalize | ( | ) |
Summaries must stay alive until end of compilation.
References ggc_delete(), NULL, optimization_summaries, and summaries_lto.
Referenced by toplev::finalize().
|
static |
All flags implied when we know we can ignore stores (i.e. when handling call to noreturn).
|
static |
All flags that are implied by the ECF_CONST functions.
Referenced by find_func_aliases_for_call().
|
static |
All flags that are implied by the ECF_PURE function.
Referenced by find_func_aliases_for_call().
|
static |