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 () |
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 |
Single function summary used for LTO.
void debug_eaf_flags | ( | int | flags | ) |
Debugging helper.
References ggc_alloc().
|
static |
Dump records TT to OUT.
References a, modref_base_node< T >::base, modref_base_node< T >::every_ref, FOR_EACH_VEC_SAFE_ELT, get_alias_set(), ggc_alloc(), 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(), ggc_alloc(), i, and cgraph_node::indirect_calls.
Referenced by dump_modref_edge_summaries().
|
static |
Dump records TT to OUT.
References a, modref_base_node< T >::base, modref_base_node< T >::every_ref, FOR_EACH_VEC_SAFE_ELT, ggc_alloc(), 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_lto::useful_p(), and modref_summary::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(), 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(), ggc_alloc(), 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 cgraph_edge::caller, cgraph_node::callers, symtab_node::decl, 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, ggc_alloc(), i, cgraph_node::inlined_to, MODREF_RETSLOT_PARM, MODREF_STATIC_CHAIN_PARM, NULL, remove_modref_edge_summaries(), summaries, summaries_lto, and vNULL.
Referenced by inline_call().
void ipa_modref_cc_finalize | ( | ) |
Summaries must stay alive until end of compilation.
References ggc_alloc(), ggc_delete(), NULL, optimization_summaries, and summaries_lto.
Referenced by toplev::finalize().
ipa_opt_pass_d * make_pass_ipa_modref | ( | gcc::context * | ctxt | ) |
References ggc_alloc().
gimple_opt_pass * make_pass_modref | ( | gcc::context * | ctxt | ) |
References ggc_alloc().
|
static |
Remove all call edge summaries associated with NODE.
References cgraph_node::callees, ggc_alloc(), cgraph_node::indirect_calls, and remove_modref_edge_summaries().
Referenced by ipa_merge_modref_summary_after_inlining(), and remove_modref_edge_summaries().
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, ECF_PURE, and ggc_alloc().
Referenced by eaf_flags_useful_p(), modref_summary_lto::useful_p(), and modref_summary::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().