osprey-gcc-4.2.0/gcc/ipa-type-escape.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "tree-flow.h"
#include "tree-inline.h"
#include "tree-pass.h"
#include "langhooks.h"
#include "pointer-set.h"
#include "ggc.h"
#include "ipa-utils.h"
#include "ipa-type-escape.h"
#include "c-common.h"
#include "tree-gimple.h"
#include "cgraph.h"
#include "output.h"
#include "flags.h"
#include "timevar.h"
#include "diagnostic.h"

Include dependency graph for ipa-type-escape.c:

Go to the source code of this file.

Data Types

type  type_brand_s

Enumerations

enum  escape_t { EXPOSED_PARAMETER, FULL_ESCAPE }
enum  cast_type { CT_UP, CT_DOWN, CT_SIDEWAYS, CT_USELESS }

Functions/Subroutines

static char * get_name_of_type (tree type)
static int compare_type_brand (splay_tree_key sk1, splay_tree_key sk2)
static tree discover_unique_type (tree type)
static bool type_to_consider (tree type)
static tree get_canon_type (tree type, bool see_thru_ptrs, bool see_thru_arrays)
static int get_canon_type_uid (tree type, bool see_thru_ptrs, bool see_thru_arrays)
int ipa_type_escape_star_count_of_interesting_type (tree type)
int ipa_type_escape_star_count_of_interesting_or_array_type (tree type)
bool ipa_type_escape_type_contained_p (tree type)
bool ipa_type_escape_field_does_not_clobber_p (tree record_type, tree field_type)
static tree mark_type (tree type, enum escape_t escape_status)
static void mark_interesting_type (tree type, enum escape_t escape_status)
static bool parent_type_p (tree parent, tree child)
static int count_stars (tree *type_ptr)
static enum cast_type check_cast_type (tree to_type, tree from_type)
static void check_cast (tree to_type, tree from)
static void check_function_parameter_and_return_types (tree fn, bool escapes)
static void has_proper_scope_for_analysis (tree t)
static void check_operand (tree t)
static void check_tree (tree t)
static void mark_interesting_addressof (tree to_type, tree from_type)
static void look_for_address_of (tree t)
static void look_for_casts (tree lhs __attribute__((unused)), tree t)
static void check_rhs_var (tree t)
static void check_lhs_var (tree t)
static void get_asm_expr_operands (tree stmt)
static bool check_call (tree call_expr)
static bool okay_pointer_operation (enum tree_code code, tree op0, tree op1)
static tree scan_for_refs (tree *tp, int *walk_subtrees, void *data)
static void ipa_init (void)
static void analyze_variable (struct cgraph_varpool_node *vnode)
static void analyze_function (struct cgraph_node *fn)
static tree type_for_uid (int uid)
static bitmap subtype_map_for_uid (int uid, bool create)
static void close_type_seen (tree type)
static void close_type_exposed_parameter (tree type)
static void close_type_full_escape (tree type)
static bitmap close_addressof_down (int uid)
static unsigned int type_escape_execute (void)
static bool gate_type_escape_vars (void)

Variables

static bool initialized = false
static bitmap results_of_malloc
static bitmap been_there_done_that
static bitmap bitmap_tmp
static bitmap global_types_exposed_parameter
static bitmap global_types_full_escape
static bitmap global_types_seen
static splay_tree uid_to_canon_type
static splay_tree all_canon_types
static splay_tree type_to_canon_type
static splay_tree uid_to_addressof_down_map
static splay_tree uid_to_addressof_up_map
static splay_tree uid_to_subtype_map
static struct pointer_set_tvisited_nodes
static bitmap_obstack ipa_obstack
struct tree_opt_pass pass_ipa_type_escape


Enumeration Type Documentation

enum cast_type

Enumerator:
CT_UP 
CT_DOWN 
CT_SIDEWAYS 
CT_USELESS 

Definition at line 624 of file ipa-type-escape.c.

enum escape_t

Enumerator:
EXPOSED_PARAMETER 
FULL_ESCAPE 

Definition at line 90 of file ipa-type-escape.c.


Function Documentation

static void analyze_function ( struct cgraph_node *  fn  )  [static]

static void analyze_variable ( struct cgraph_varpool_node *  vnode  )  [static]

static bool check_call ( tree  call_expr  )  [static]

static void check_cast ( tree  to_type,
tree  from 
) [static]

static enum cast_type check_cast_type ( tree  to_type,
tree  from_type 
) [static]

Definition at line 636 of file ipa-type-escape.c.

References count_stars(), CT_DOWN, CT_SIDEWAYS, CT_UP, CT_USELESS, and parent_type_p().

Referenced by check_cast().

static void check_function_parameter_and_return_types ( tree  fn,
bool  escapes 
) [static]

static void check_lhs_var ( tree  t  )  [static]

Definition at line 959 of file ipa-type-escape.c.

References check_tree().

static void check_operand ( tree  t  )  [static]

static void check_rhs_var ( tree  t  )  [static]

Definition at line 949 of file ipa-type-escape.c.

References check_tree(), and look_for_address_of().

static void check_tree ( tree  t  )  [static]

static bitmap close_addressof_down ( int  uid  )  [static]

static void close_type_exposed_parameter ( tree  type  )  [static]

static void close_type_full_escape ( tree  type  )  [static]

static void close_type_seen ( tree  type  )  [static]

static int compare_type_brand ( splay_tree_key  sk1,
splay_tree_key  sk2 
) [static]

Definition at line 178 of file ipa-type-escape.c.

References type_brand_s::name, type_brand_s::seq, and strcmp().

Referenced by ipa_init().

static int count_stars ( tree type_ptr  )  [static]

Definition at line 609 of file ipa-type-escape.c.

References i, POINTER_TYPE_P, TREE_TYPE, and TYPE_MAIN_VARIANT.

Referenced by check_cast_type().

static tree discover_unique_type ( tree  type  )  [static]

static bool gate_type_escape_vars ( void   )  [static]

Definition at line 1824 of file ipa-type-escape.c.

References errorcount, and sorrycount.

static void get_asm_expr_operands ( tree  stmt  )  [static]

static tree get_canon_type ( tree  type,
bool  see_thru_ptrs,
bool  see_thru_arrays 
) [static]

static int get_canon_type_uid ( tree  type,
bool  see_thru_ptrs,
bool  see_thru_arrays 
) [static]

static char* get_name_of_type ( tree  type  )  [static]

Definition at line 142 of file ipa-type-escape.c.

References DECL_NAME, IDENTIFIER_POINTER, TREE_CODE, and TYPE_NAME.

Referenced by discover_unique_type().

static void has_proper_scope_for_analysis ( tree  t  )  [inline, static]

static void ipa_init ( void   )  [static]

bool ipa_type_escape_field_does_not_clobber_p ( tree  record_type,
tree  field_type 
)

int ipa_type_escape_star_count_of_interesting_or_array_type ( tree  type  ) 

int ipa_type_escape_star_count_of_interesting_type ( tree  type  ) 

bool ipa_type_escape_type_contained_p ( tree  type  ) 

static void look_for_address_of ( tree  t  )  [static]

static void look_for_casts ( tree lhs   __attribute__(unused),
tree  t 
) [static]

static void mark_interesting_addressof ( tree  to_type,
tree  from_type 
) [static]

static void mark_interesting_type ( tree  type,
enum escape_t  escape_status 
) [static]

static tree mark_type ( tree  type,
enum escape_t  escape_status 
) [static]

static bool okay_pointer_operation ( enum tree_code  code,
tree  op0,
tree  op1 
) [static]

Definition at line 1144 of file ipa-type-escape.c.

References operand_equal_p(), POINTER_TYPE_P, size_in_bytes(), TREE_TYPE, and TYPE_MAIN_VARIANT.

Referenced by scan_for_refs().

static bool parent_type_p ( tree  parent,
tree  child 
) [static]

static tree scan_for_refs ( tree tp,
int *  walk_subtrees,
void data 
) [static]

static bitmap subtype_map_for_uid ( int  uid,
bool  create 
) [static]

static unsigned int type_escape_execute ( void   )  [static]

static tree type_for_uid ( int  uid  )  [static]

static bool type_to_consider ( tree  type  )  [static]

Definition at line 260 of file ipa-type-escape.c.

References COMPLEX_TYPE, POINTER_TYPE_P, TREE_CODE, TREE_TYPE, and TYPE_MAIN_VARIANT.

Referenced by get_canon_type().


Variable Documentation

Definition at line 113 of file ipa-type-escape.c.

bitmap bitmap_tmp [static]

Definition at line 72 of file ipa-type-escape.c.

Referenced by type_escape_execute().

Definition at line 101 of file ipa-type-escape.c.

Referenced by ipa_init(), mark_type(), and type_escape_execute().

Definition at line 105 of file ipa-type-escape.c.

Referenced by discover_unique_type(), ipa_init(), and type_escape_execute().

bool initialized = false [static]

Definition at line 61 of file ipa-type-escape.c.

Initial value:

{
  "type-escape-var",      
  gate_type_escape_vars,    
  type_escape_execute,      
  NULL,         
  NULL,         
  0,          
  TV_IPA_TYPE_ESCAPE,           
  0,                                  
  0,          
  0,          
  0,          
  0,                                    
  0         
}

Definition at line 1831 of file ipa-type-escape.c.

Referenced by init_optimization_passes().

Definition at line 68 of file ipa-type-escape.c.

Referenced by check_cast(), ipa_init(), scan_for_refs(), and type_escape_execute().

Definition at line 116 of file ipa-type-escape.c.

Definition at line 121 of file ipa-type-escape.c.

Definition at line 126 of file ipa-type-escape.c.

Definition at line 109 of file ipa-type-escape.c.

Definition at line 130 of file ipa-type-escape.c.

Definition at line 136 of file ipa-type-escape.c.


Generated on Wed Apr 8 14:19:06 2009 for Open64 by  doxygen 1.5.6