GCC Middle and Back End API Reference
cgraphbuild.c File Reference

Data Structures

struct  record_reference_ctx

Functions

static tree record_reference ()
static void record_type_list ()
static void record_eh_tables ()
int compute_call_stmt_bb_frequency ()
static bool mark_address ()
static bool mark_load ()
static bool mark_store ()
void ipa_record_stmt_references ()
static unsigned int build_cgraph_edges ()
gimple_opt_passmake_pass_build_cgraph_edges ()
void record_references_in_initializer ()
unsigned int rebuild_cgraph_edges ()
void cgraph_rebuild_references ()
gimple_opt_passmake_pass_rebuild_cgraph_edges ()
static unsigned int remove_cgraph_callee_edges ()
gimple_opt_passmake_pass_remove_cgraph_callee_edges ()

Function Documentation

static unsigned int build_cgraph_edges ( )
static
   Create cgraph edges for function calls.
   Also look for functions and variables having addresses taken.  
     Create the callgraph edges and record the nodes referenced by the function.
     body.  
     Look for initializers of constant variables and private statics.  

References cgraph_create_edge(), cgraph_create_indirect_edge(), cgraph_get_create_node(), compute_call_stmt_bb_frequency(), basic_block_def::count, current_function_decl, gimple_call_flags(), and gimple_call_fndecl().

void cgraph_rebuild_references ( void  )
   Rebuild cgraph edges for current function node.  This needs to be run after
   passes that don't update the cgraph.  
     Keep speculative references for further cgraph edge expansion.  
int compute_call_stmt_bb_frequency ( )
   Computes the frequency of the call statement so that it can be stored in
   cgraph_edge.  BB is the basic block of the call statement.  
void ipa_record_stmt_references ( )
   Record all references from NODE that are taken in statement STMT.  

References gsi_end_p(), gsi_next(), gsi_start_bb(), and gsi_stmt().

gimple_opt_pass* make_pass_build_cgraph_edges ( )
gimple_opt_pass* make_pass_rebuild_cgraph_edges ( )
gimple_opt_pass* make_pass_remove_cgraph_callee_edges ( )
static bool mark_address ( )
static
   Mark address taken in STMT.  

References ipa_record_reference(), IPA_REF_ADDR, and varpool_node_for_decl().

Referenced by mark_store().

static bool mark_load ( )
static
   Mark load of T.  
         ??? This can happen on platforms with descriptors when these are
         directly manipulated in the code.  Pretend that it's an address.  

References ipa_record_reference(), IPA_REF_LOAD, and varpool_node_for_decl().

Referenced by mark_store().

static bool mark_store ( )
static
   Mark store of T.  

References mark_address(), mark_load(), and walk_stmt_load_store_addr_ops().

unsigned int rebuild_cgraph_edges ( void  )
   Rebuild cgraph edges for current function node.  This needs to be run after
   passes that don't update the cgraph.  

Referenced by gate_tm_memopt().

static void record_eh_tables ( )
static
   Record all references we will introduce by producing EH tables
   for NODE.  
         If there are sub-regions, process them.  
         If there are peers, process them.  
         Otherwise, step back up the tree to the next peer.  
static tree record_reference ( )
static
   Walk tree and record all calls and references to functions/variables.
   Called via walk_tree: TP is pointer to tree to be examined.
   When DATA is non-null, record references to callgraph.
         Record dereferences to the functions.  This makes the
         functions reachable unconditionally.  
         Save some cycles by not walking types and declaration as we
         won't find anything useful there anyway.  
void record_references_in_initializer ( )
   Record references to functions and other variables present in the
   initial value of DECL, a variable.
   When ONLY_VARS is true, we mark needed only variables, not functions.  
static void record_type_list ( )
static
   Record references to typeinfos in the type list LIST.  
static unsigned int remove_cgraph_callee_edges ( )
static

References cgraph_node::clone, and execute().