GCC Middle and Back End API Reference
ipa-utils.h File Reference

Go to the source code of this file.

Data Structures

struct  ipa_dfs_info

Typedefs

typedef odr_type_dodr_type

Functions

void ipa_print_order (FILE *, const char *, struct cgraph_node **, int)
int ipa_reduced_postorder (struct cgraph_node **, bool, bool, bool(*ignore_edge)(struct cgraph_edge *))
void ipa_free_postorder_info (void)
vec< cgraph_node_ptripa_get_nodes_in_cycle (struct cgraph_node *)
int ipa_reverse_postorder (struct cgraph_node **)
tree get_base_var (tree)
void build_type_inheritance_graph (void)
void update_type_inheritance_graph (void)
vec< cgraph_node * > possible_polymorphic_call_targets (tree, HOST_WIDE_INT, bool *final=NULL, void **cache_token=NULL)
odr_type get_odr_type (tree, bool insert=false)
void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT)
bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT, struct cgraph_node *n)
tree method_class_type (tree)
vec< cgraph_node * > possible_polymorphic_call_targets (struct cgraph_edge *e, bool *final=NULL, void **cache_token=NULL)
void dump_possible_polymorphic_call_targets ()
bool possible_polymorphic_call_target_p (struct cgraph_edge *e, struct cgraph_node *n)

Typedef Documentation

typedef odr_type_d* odr_type

Function Documentation

void dump_possible_polymorphic_call_targets ( FILE *  f,
tree  otr_type,
HOST_WIDE_INT  otr_token 
)
void dump_possible_polymorphic_call_targets ( )
inline
tree get_base_var ( tree  )
odr_type get_odr_type ( tree  ,
bool  insert = false 
)
void ipa_free_postorder_info ( void  )
Deallocate all ipa_dfs_info structures pointed to by the aux pointer of call
   graph nodes.   

References symtab_node_base::aux, free(), and cgraph_node::symbol.

Referenced by free_toporder_info(), inline_small_functions(), propagate(), propagate_nothrow(), and propagate_pure_const().

vec<cgraph_node_ptr> ipa_get_nodes_in_cycle ( struct cgraph_node )
void ipa_print_order ( FILE *  out,
const char *  note,
struct cgraph_node **  order,
int  count 
)
In ipa-utils.c   
@verbatim Utilities for ipa analysis.

Copyright (C) 2005-2013 Free Software Foundation, Inc. Contributed by Kenneth Zadeck zadec.nosp@m.k@na.nosp@m.tural.nosp@m.brid.nosp@m.ge.co.nosp@m.m

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/.

Debugging function for postorder and inorder code. NOTE is a string
   that is printed before the nodes are printed.  ORDER is an array of
   cgraph_nodes that has COUNT useful nodes in it.   

References dump_cgraph_node(), and dump_file.

Referenced by propagate(), propagate_nothrow(), and propagate_pure_const().

int ipa_reduced_postorder ( struct cgraph_node **  order,
bool  reduce,
bool  allow_overwritable,
bool(*)(struct cgraph_edge *)  ignore_edge 
)
Topsort the call graph by caller relation.  Put the result in ORDER.

   The REDUCE flag is true if you want the cycles reduced to single nodes.
   You can use ipa_get_nodes_in_cycle to obtain a vector containing all real
   call graph nodes in a reduced node.

   Set ALLOW_OVERWRITABLE if nodes with such availability should be included.
   IGNORE_EDGE, if non-NULL is a hook that may make some edges insignificant
   for the topological sort.    

References searchc_env::allow_overwritable, symtab_node_base::aux, AVAIL_OVERWRITABLE, cgraph_function_body_availability(), cgraph_n_nodes, searchc_env::count, free(), ignore_edge(), ipa_dfs_info::new_node, ipa_dfs_info::next_cycle, searchc_env::nodes_marked_new, ipa_dfs_info::on_stack, order, searchc_env::order_pos, searchc_env::reduce, searchc_env::result, searchc(), searchc_env::stack, searchc_env::stack_size, cgraph_node::symbol, and cgraph_node::uid.

Referenced by build_toporder_info(), inline_small_functions(), propagate(), propagate_nothrow(), and propagate_pure_const().

int ipa_reverse_postorder ( struct cgraph_node **  )
tree method_class_type ( tree  )
bool possible_polymorphic_call_target_p ( tree  otr_type,
HOST_WIDE_INT  otr_token,
struct cgraph_node n 
)
Return true if N can be possibly target of a polymorphic call of
   OTR_TYPE/OTR_TOKEN.   

References hash_table< Descriptor, Allocator >::is_created(), odr_hash, and possible_polymorphic_call_targets().

Referenced by possible_polymorphic_call_target_p().

bool possible_polymorphic_call_target_p ( struct cgraph_edge e,
struct cgraph_node n 
)
inline
Return true if N can be possibly target of a polymorphic call of
   E.   

References cgraph_edge::indirect_info, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, and possible_polymorphic_call_target_p().

vec<cgraph_node *> possible_polymorphic_call_targets ( tree  otr_type,
HOST_WIDE_INT  otr_token,
bool *  finalp,
void **  cache_token 
)
Return vector containing possible targets of polymorphic call of type
   OTR_TYPE caling method OTR_TOKEN with OFFSET.  If FINALp is non-NULL,
   store true if the list is complette. 
   CACHE_TOKEN (if non-NULL) will get stored to an unique ID of entry
   in the target cache.  If user needs to visit every target list
   just once, it can memoize them.

   Returned vector is placed into cache.  It is NOT caller's responsibility
   to free it.  The vector can be freed on cgraph_remove_node call if
   the particular node is a virtual function present in the cache.   

References odr_type_d::anonymous_namespace, cgraph_add_node_removal_hook(), hash_table< Descriptor, Allocator >::create(), odr_type_d::derived_types, devirt_node_removal_hook(), hash_table< Descriptor, Allocator >::find_slot(), get_odr_type(), gimple_get_virt_method_for_binfo(), inserted, maybe_record_node(), node_removal_hook_holder, polymorphic_call_target_d::otr_token, pointer_set_create(), pointer_set_destroy(), pointer_set_insert(), polymorphic_call_target_hash, possible_polymorphic_call_targets_1(), polymorphic_call_target_d::targets, timevar_pop(), timevar_push(), odr_type_d::type, type(), polymorphic_call_target_d::type, and vNULL.

Referenced by analyze_functions(), dump_possible_polymorphic_call_targets(), possible_polymorphic_call_target_p(), and possible_polymorphic_call_targets().

vec<cgraph_node *> possible_polymorphic_call_targets ( struct cgraph_edge e,
bool *  final = NULL,
void **  cache_token = NULL 
)
inline
Return vector containing possible targets of polymorphic call E.
   If FINALP is non-NULL, store true if the list is complette. 
   CACHE_TOKEN (if non-NULL) will get stored to an unique ID of entry
   in the target cache.  If user needs to visit every target list
   just once, it can memoize them.

   Returned vector is placed into cache.  It is NOT caller's responsibility
   to free it.  The vector can be freed on cgraph_remove_node call if
   the particular node is a virtual function present in the cache.   

References cgraph_edge::indirect_info, cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::polymorphic, and possible_polymorphic_call_targets().

void update_type_inheritance_graph ( void  )