GCC Middle and Back End API Reference
ipa-modref.cc File 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"
Include dependency graph for ipa-modref.cc:

Data Structures

class  modref_summaries
 
class  modref_summaries_lto
 
struct  modref_summary_lto
 

Typedefs

typedef modref_tree< treemodref_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_summaryget_modref_function_summary (cgraph_node *func)
 
modref_summaryget_modref_function_summary (gcall *call, bool *interposed)
 
void debug_eaf_flags (int flags)
 
gimple_opt_passmake_pass_modref (gcc::context *ctxt)
 
ipa_opt_pass_dmake_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
 

Typedef Documentation

◆ modref_records_lto

Single function summary used for LTO.   

Function Documentation

◆ debug_eaf_flags()

void debug_eaf_flags ( int flags)
Debugging helper.   

References ggc_alloc().

◆ dump_lto_records()

◆ dump_modref_edge_summaries()

static void dump_modref_edge_summaries ( FILE * out,
cgraph_node * node,
int depth )
static

◆ dump_records()

◆ eaf_flags_useful_p()

static bool eaf_flags_useful_p ( vec< eaf_flags_t > & flags,
int ecf_flags )
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().

◆ get_modref_function_summary() [1/2]

◆ get_modref_function_summary() [2/2]

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.

◆ ipa_merge_modref_summary_after_inlining()

◆ ipa_modref_cc_finalize()

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().

◆ make_pass_ipa_modref()

ipa_opt_pass_d * make_pass_ipa_modref ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_modref()

gimple_opt_pass * make_pass_modref ( gcc::context * ctxt)

References ggc_alloc().

◆ remove_modref_edge_summaries()

static void remove_modref_edge_summaries ( cgraph_node * node)
static

◆ remove_useless_eaf_flags()

static int remove_useless_eaf_flags ( int eaf_flags,
int ecf_flags,
bool returns_void )
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, ECF_PURE, and ggc_alloc().

Referenced by eaf_flags_useful_p(), modref_summary_lto::useful_p(), and modref_summary::useful_p().

Variable Documentation

◆ optimization_summaries

fast_function_summary<modref_summary *, va_gc>* optimization_summaries
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().

◆ summaries

Global variable holding all modref summaries
(from analysis to IPA propagation time).   

Referenced by modref_summaries::insert(), and ipa_merge_modref_summary_after_inlining().

◆ summaries_lto

fast_function_summary<modref_summary_lto *, va_gc>* summaries_lto
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().