GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "alloc-pool.h"
#include "tree-pass.h"
#include "gimple-iterator.h"
#include "tree-dfa.h"
#include "cgraph.h"
#include "ipa-utils.h"
#include "symbol-summary.h"
#include "gimple-pretty-print.h"
#include "gimple-walk.h"
#include "print-tree.h"
#include "tree-streamer.h"
#include "alias.h"
#include "calls.h"
#include "ipa-modref-tree.h"
#include "ipa-modref.h"
#include "value-range.h"
#include "sreal.h"
#include "ipa-cp.h"
#include "ipa-prop.h"
#include "ipa-fnsummary.h"
#include "attr-fnspec.h"
#include "symtab-clones.h"
#include "gimple-ssa.h"
#include "tree-phinodes.h"
#include "tree-ssa-operands.h"
#include "ssa-iterators.h"
#include "stringpool.h"
#include "tree-ssanames.h"
#include "attribs.h"
#include "tree-cfg.h"
#include "tree-eh.h"
#include "gt-ipa-modref.h"
Data Structures | |
class | modref_summaries |
class | modref_summaries_lto |
struct | modref_summary_lto |
Typedefs | |
typedef modref_tree< tree > | modref_records_lto |
Functions | |
static int | remove_useless_eaf_flags (int eaf_flags, int ecf_flags, bool returns_void) |
static bool | eaf_flags_useful_p (vec< eaf_flags_t > &flags, int ecf_flags) |
static void | dump_records (modref_records *tt, FILE *out) |
static void | dump_lto_records (modref_records_lto *tt, FILE *out) |
static void | dump_modref_edge_summaries (FILE *out, cgraph_node *node, int depth) |
static void | remove_modref_edge_summaries (cgraph_node *node) |
modref_summary * | get_modref_function_summary (cgraph_node *func) |
modref_summary * | get_modref_function_summary (gcall *call, bool *interposed) |
void | debug_eaf_flags (int flags) |
gimple_opt_pass * | make_pass_modref (gcc::context *ctxt) |
ipa_opt_pass_d * | make_pass_ipa_modref (gcc::context *ctxt) |
void | ipa_merge_modref_summary_after_inlining (cgraph_edge *edge) |
void | ipa_modref_cc_finalize () |
bool | ipa_modref_callee_reads_no_memory_p (gcall *call) |
Variables | |
static fast_function_summary< modref_summary *, va_gc > * | summaries |
static fast_function_summary< modref_summary *, va_gc > * | optimization_summaries |
static fast_function_summary< modref_summary_lto *, va_gc > * | summaries_lto |
typedef modref_tree<tree> modref_records_lto |
Single function summary used for LTO.
void debug_eaf_flags | ( | int | flags | ) |
Debugging helper.
|
static |
Dump records TT to OUT.
References a, modref_base_node< T >::base, modref_tree< T >::bases, modref_tree< T >::every_base, modref_base_node< T >::every_ref, FOR_EACH_VEC_SAFE_ELT, get_alias_set(), i, print_generic_expr(), r, and modref_base_node< T >::refs.
Referenced by modref_summary_lto::dump().
|
static |
Dump all escape points of NODE to OUT.
References cgraph_node::callees, dump_modref_edge_summaries(), symtab_node::dump_name(), i, cgraph_node::indirect_calls, and cgraph_edge::next_callee.
Referenced by dump_modref_edge_summaries().
|
static |
Dump records TT to OUT.
References a, modref_base_node< T >::base, modref_tree< T >::bases, modref_tree< T >::every_base, modref_base_node< T >::every_ref, FOR_EACH_VEC_SAFE_ELT, i, r, and modref_base_node< T >::refs.
Referenced by modref_summary::dump().
|
static |
Return true if FLAGS holds some useful information.
References i, and remove_useless_eaf_flags().
Referenced by modref_summary::useful_p(), and modref_summary_lto::useful_p().
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(), ipa_modref_callee_reads_no_memory_p(), 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.
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, TREE_TYPE, modref_summary::useful_p(), modref_summary_lto::useful_p(), and vNULL.
Referenced by inline_call().
Return true if call is known to perform no memory reads.
References attr_fnspec::arg_maybe_read_p(), attr_fnspec::arg_specified_p(), ECF_CONST, get_modref_function_summary(), gimple_call_arg(), gimple_call_flags(), gimple_call_fnspec(), gimple_call_num_args(), modref_summary::global_memory_read, attr_fnspec::global_memory_read_p(), i, attr_fnspec::known_p(), modref_summary::loads, POINTER_TYPE_P, and TREE_TYPE.
Referenced by propagate_necessity().
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().
ipa_opt_pass_d * make_pass_ipa_modref | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_modref | ( | gcc::context * | ctxt | ) |
|
static |
Remove all call edge summaries associated with NODE.
References cgraph_node::callees, cgraph_node::indirect_calls, cgraph_edge::next_callee, and remove_modref_edge_summaries().
Referenced by ipa_merge_modref_summary_after_inlining(), and remove_modref_edge_summaries().
|
static |
Remove all flags from EAF_FLAGS that are implied by ECF_FLAGS and not useful to track. If returns_void is true moreover clear EAF_NOT_RETURNED.
References EAF_NOT_RETURNED_DIRECTLY, EAF_NOT_RETURNED_INDIRECTLY, ECF_CONST, ECF_NORETURN, ECF_NOVOPS, and ECF_PURE.
Referenced by eaf_flags_useful_p(), modref_summary::useful_p(), and modref_summary_lto::useful_p().
|
static |
Global variable holding all modref optimization summaries (from IPA propagation time or used by local optimization pass).
Referenced by modref_summaries::duplicate(), get_modref_function_summary(), modref_summaries::insert(), and ipa_modref_cc_finalize().
|
static |
Global variable holding all modref summaries (from analysis to IPA propagation time).
Referenced by modref_summaries::insert(), and ipa_merge_modref_summary_after_inlining().
|
static |
LTO summaries hold info from analysis to LTO streaming or from LTO stream-in through propagation to LTO stream-out.
Referenced by modref_summaries_lto::duplicate(), modref_summaries_lto::insert(), ipa_merge_modref_summary_after_inlining(), and ipa_modref_cc_finalize().