osprey-gcc-4.2.0/gcc/tree-into-ssa.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "flags.h"
#include "rtl.h"
#include "tm_p.h"
#include "langhooks.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "output.h"
#include "expr.h"
#include "function.h"
#include "diagnostic.h"
#include "bitmap.h"
#include "tree-flow.h"
#include "tree-gimple.h"
#include "tree-inline.h"
#include "varray.h"
#include "timevar.h"
#include "hashtab.h"
#include "tree-dump.h"
#include "tree-pass.h"
#include "cfgloop.h"
#include "domwalk.h"
#include "ggc.h"
#include "params.h"
#include "vecprim.h"

Include dependency graph for tree-into-ssa.c:

Go to the source code of this file.

Data Types

type  def_blocks_d
type  update_ssa_stats_d
type  mark_def_sites_global_data
type  ssa_name_info
type  dom_dfsnum

Defines

#define NAME_SETS_GROWTH_FACTOR   (MAX (3, num_ssa_names / 3))
#define REWRITE_THIS_STMT(T)   TREE_VISITED (T)
#define REGISTER_DEFS_IN_THIS_STMT(T)   (T)->common.unsigned_flag

Typedefs

typedef struct ssa_name_infossa_name_info_p

Functions/Subroutines

static VEC (typedef VEC(tree, heap)
 DEF_VEC_P (ssa_name_info_p)
 DEF_VEC_ALLOC_P (ssa_name_info_p, heap)
static VEC (ssa_name_info_p, heap)
void dump_tree_ssa (FILE *)
void debug_tree_ssa (void)
void debug_def_blocks (void)
void dump_tree_ssa_stats (FILE *)
void debug_tree_ssa_stats (void)
void dump_update_ssa (FILE *)
void debug_update_ssa (void)
void dump_names_replaced_by (FILE *, tree)
void debug_names_replaced_by (tree)
static struct ssa_name_infoget_ssa_name_ann (tree name)
static void clear_ssa_name_info (void)
static enum need_phi_state get_phi_state (tree var)
static void set_phi_state (tree var, enum need_phi_state state)
tree get_current_def (tree var)
void set_current_def (tree var, tree def)
void compute_global_livein (bitmap livein, bitmap def_blocks)
static void initialize_flags_in_bb (basic_block bb)
static void mark_block_for_update (basic_block bb)
static struct def_blocks_dget_def_blocks_for (tree var)
static void set_def_block (tree var, basic_block bb, bool phi_p)
static void set_livein_block (tree var, basic_block bb)
static bool symbol_marked_for_renaming (tree sym)
static bool is_old_name (tree name)
static bool is_new_name (tree name)
static hashval_t repl_map_hash (const void *p)
static int repl_map_eq (const void *p1, const void *p2)
static void repl_map_free (void *p)
static bitmap names_replaced_by (tree new)
static void add_to_repl_tbl (tree new, tree old)
static void add_new_name_mapping (tree new, tree old)
static void mark_def_sites (struct dom_walk_data *walk_data, basic_block bb, block_stmt_iterator bsi)
static int cmp_dfsnum (const void *a, const void *b)
static unsigned find_dfsnum_interval (struct dom_dfsnum *defs, unsigned n, unsigned s)
static void prune_unused_phi_nodes (bitmap phis, bitmap kills, bitmap uses)
static bitmap find_idf (bitmap def_blocks, bitmap *dfs)
static struct def_blocks_dfind_def_blocks_for (tree var)
static tree get_default_def_for (tree sym)
static void mark_phi_for_rewrite (basic_block bb, tree phi)
static void insert_phi_nodes_for (tree var, bitmap phi_insertion_points, bool update_p)
static void insert_phi_nodes (bitmap *dfs)
void register_new_def (tree def, VEC(tree, heap)**block_defs_p)
static void rewrite_initialize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb)
static tree get_reaching_def (tree var)
static void rewrite_stmt (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb ATTRIBUTE_UNUSED, block_stmt_iterator si)
static void rewrite_add_phi_arguments (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb)
static void rewrite_finalize_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb ATTRIBUTE_UNUSED)
static void htab_statistics (FILE *file, htab_t htab)
static hashval_t def_blocks_hash (const void *p)
static int def_blocks_eq (const void *p1, const void *p2)
static void def_blocks_free (void *p)
static int debug_def_blocks_r (void **slot, void *data ATTRIBUTE_UNUSED)
static void register_new_update_single (tree new_name, tree old_name)
static void register_new_update_set (tree new_name, bitmap old_names)
static void rewrite_update_init_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb)
static void rewrite_update_fini_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb ATTRIBUTE_UNUSED)
static void maybe_replace_use (use_operand_p use_p)
static void maybe_register_def (def_operand_p def_p, tree stmt)
static void rewrite_update_stmt (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb ATTRIBUTE_UNUSED, block_stmt_iterator si)
static void replace_use (use_operand_p use_p, tree use)
static void rewrite_update_phi_arguments (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED, basic_block bb)
static void rewrite_blocks (basic_block entry, enum rewrite_mode what, sbitmap blocks)
static void mark_def_sites_initialize_block (struct dom_walk_data *walk_data, basic_block bb ATTRIBUTE_UNUSED)
static void mark_def_site_blocks (sbitmap interesting_blocks)
static unsigned int rewrite_into_ssa (void)
static void mark_def_interesting (tree var, tree stmt, basic_block bb, bool insert_phi_p)
static void mark_use_interesting (tree var, tree stmt, basic_block bb, bool insert_phi_p)
static void prepare_block_for_update (basic_block bb, bool insert_phi_p)
static void prepare_use_sites_for (tree name, bool insert_phi_p)
static void prepare_def_site_for (tree name, bool insert_phi_p)
static void prepare_names_to_update (bool insert_phi_p)
static void init_update_ssa (void)
void delete_update_ssa (void)
tree create_new_def_for (tree old_name, tree stmt, def_operand_p def)
void register_new_name_mapping (tree new, tree old)
void mark_sym_for_renaming (tree sym)
void mark_set_for_renaming (bitmap set)
bool need_ssa_update_p (void)
bool name_registered_for_update_p (tree n)
bitmap ssa_names_to_replace (void)
void release_ssa_name_after_update_ssa (tree name)
static void insert_updated_phi_nodes_for (tree var, bitmap *dfs, bitmap blocks, unsigned update_flags)
static bool switch_virtuals_to_full_rewrite_p (void)
static void switch_virtuals_to_full_rewrite (void)
void update_ssa (unsigned update_flags)

Variables

bool in_ssa_p
static htab_t def_blocks
static htab_t repl_tbl
static bool need_to_initialize_update_ssa_p = true
static bool need_to_update_vops_p = false
static struct update_ssa_stats_d update_ssa_stats
struct tree_opt_pass pass_build_ssa


Define Documentation

#define NAME_SETS_GROWTH_FACTOR   (MAX (3, num_ssa_names / 3))

#define REGISTER_DEFS_IN_THIS_STMT ( T   )     (T)->common.unsigned_flag

#define REWRITE_THIS_STMT ( T   )     TREE_VISITED (T)

Definition at line 242 of file tree-into-ssa.c.


Typedef Documentation

Definition at line 212 of file tree-into-ssa.c.


Function Documentation

static void add_new_name_mapping ( tree  new,
tree  old 
) [static]

static void add_to_repl_tbl ( tree  new,
tree  old 
) [inline, static]

static void clear_ssa_name_info ( void   )  [static]

Definition at line 301 of file tree-into-ssa.c.

Referenced by delete_update_ssa().

static int cmp_dfsnum ( const void a,
const void b 
) [static]

Definition at line 798 of file tree-into-ssa.c.

References da, dom_dfsnum::dfs_num, and int.

Referenced by prune_unused_phi_nodes().

void compute_global_livein ( bitmap  livein,
bitmap  def_blocks 
)

tree create_new_def_for ( tree  old_name,
tree  stmt,
def_operand_p  def 
)

void debug_def_blocks ( void   ) 

Definition at line 1082 of file tree-into-ssa.c.

References debug_def_blocks_r(), def_blocks, htab_traverse(), and NULL.

static int debug_def_blocks_r ( void **  slot,
void *data  ATTRIBUTE_UNUSED 
) [static]

void debug_names_replaced_by ( tree  name  ) 

Definition at line 2431 of file tree-into-ssa.c.

References dump_names_replaced_by().

void debug_tree_ssa ( void   ) 

Definition at line 992 of file tree-into-ssa.c.

References dump_tree_ssa().

void debug_tree_ssa_stats ( void   ) 

Definition at line 1027 of file tree-into-ssa.c.

References dump_tree_ssa_stats().

void debug_update_ssa ( void   ) 

Definition at line 2499 of file tree-into-ssa.c.

References dump_update_ssa().

static int def_blocks_eq ( const void p1,
const void p2 
) [static]

Definition at line 1533 of file tree-into-ssa.c.

static void def_blocks_free ( void p  )  [static]

static hashval_t def_blocks_hash ( const void p  )  [static]

Definition at line 1526 of file tree-into-ssa.c.

References htab_hash_pointer, and def_blocks_d::var.

DEF_VEC_ALLOC_P ( ssa_name_info_p  ,
heap   
)

DEF_VEC_P ( ssa_name_info_p   ) 

void delete_update_ssa ( void   ) 

void dump_names_replaced_by ( FILE file,
tree  name 
)

void dump_tree_ssa ( FILE file  ) 

void dump_tree_ssa_stats ( FILE file  ) 

Definition at line 1013 of file tree-into-ssa.c.

References def_blocks, fprintf(), and htab_statistics().

void dump_update_ssa ( FILE file  ) 

static struct def_blocks_d* find_def_blocks_for ( tree  var  )  [static, read]

Definition at line 1064 of file tree-into-ssa.c.

References def_blocks, htab_find(), and def_blocks_d::var.

static unsigned find_dfsnum_interval ( struct dom_dfsnum defs,
unsigned  n,
unsigned  s 
) [static]

Definition at line 810 of file tree-into-ssa.c.

References dom_dfsnum::bb_index, dom_dfsnum::dfs_num, and f.

Referenced by prune_unused_phi_nodes().

static bitmap find_idf ( bitmap  def_blocks,
bitmap dfs 
) [static]

tree get_current_def ( tree  var  ) 

static struct def_blocks_d* get_def_blocks_for ( tree  var  )  [static, read]

static tree get_default_def_for ( tree  sym  )  [inline, static]

static enum need_phi_state get_phi_state ( tree  var  )  [inline, static]

Definition at line 309 of file tree-into-ssa.c.

References get_ssa_name_ann(), SSA_NAME, TREE_CODE, and var_ann().

static tree get_reaching_def ( tree  var  )  [static]

static struct ssa_name_info* get_ssa_name_ann ( tree  name  )  [static, read]

static void htab_statistics ( FILE file,
htab_t  htab 
) [static]

Definition at line 1491 of file tree-into-ssa.c.

References fprintf(), htab_collisions(), htab_elements, and htab_size.

static void init_update_ssa ( void   )  [static]

static void initialize_flags_in_bb ( basic_block  bb  )  [static]

static void insert_phi_nodes ( bitmap dfs  )  [static]

static void insert_phi_nodes_for ( tree  var,
bitmap  phi_insertion_points,
bool  update_p 
) [static]

static void insert_updated_phi_nodes_for ( tree  var,
bitmap dfs,
bitmap  blocks,
unsigned  update_flags 
) [static]

static bool is_new_name ( tree  name  )  [inline, static]

static bool is_old_name ( tree  name  )  [inline, static]

static void mark_block_for_update ( basic_block  bb  )  [static]

static void mark_def_interesting ( tree  var,
tree  stmt,
basic_block  bb,
bool  insert_phi_p 
) [static]

static void mark_def_site_blocks ( sbitmap  interesting_blocks  )  [static]

static void mark_def_sites ( struct dom_walk_data walk_data,
basic_block  bb,
block_stmt_iterator  bsi 
) [static]

static void mark_def_sites_initialize_block ( struct dom_walk_data walk_data,
basic_block bb  ATTRIBUTE_UNUSED 
) [static]

static void mark_phi_for_rewrite ( basic_block  bb,
tree  phi 
) [static]

void mark_set_for_renaming ( bitmap  set  ) 

void mark_sym_for_renaming ( tree  sym  ) 

static void mark_use_interesting ( tree  var,
tree  stmt,
basic_block  bb,
bool  insert_phi_p 
) [inline, static]

static void maybe_register_def ( def_operand_p  def_p,
tree  stmt 
) [inline, static]

static void maybe_replace_use ( use_operand_p  use_p  )  [inline, static]

bool name_registered_for_update_p ( tree  n  ) 

static bitmap names_replaced_by ( tree  new  )  [inline, static]

bool need_ssa_update_p ( void   ) 

static void prepare_block_for_update ( basic_block  bb,
bool  insert_phi_p 
) [static]

static void prepare_def_site_for ( tree  name,
bool  insert_phi_p 
) [static]

static void prepare_names_to_update ( bool  insert_phi_p  )  [static]

static void prepare_use_sites_for ( tree  name,
bool  insert_phi_p 
) [static]

static void prune_unused_phi_nodes ( bitmap  phis,
bitmap  kills,
bitmap  uses 
) [static]

void register_new_def ( tree  def,
VEC(tree, heap)**  block_defs_p 
)

void register_new_name_mapping ( tree  new,
tree  old 
)

static void register_new_update_set ( tree  new_name,
bitmap  old_names 
) [inline, static]

static void register_new_update_single ( tree  new_name,
tree  old_name 
) [inline, static]

void release_ssa_name_after_update_ssa ( tree  name  ) 

static int repl_map_eq ( const void p1,
const void p2 
) [static]

Definition at line 582 of file tree-into-ssa.c.

Referenced by init_update_ssa().

static void repl_map_free ( void p  )  [static]

Definition at line 589 of file tree-into-ssa.c.

References BITMAP_FREE, and free().

Referenced by init_update_ssa().

static hashval_t repl_map_hash ( const void p  )  [static]

Definition at line 576 of file tree-into-ssa.c.

References htab_hash_pointer.

Referenced by init_update_ssa().

static void replace_use ( use_operand_p  use_p,
tree  use 
) [inline, static]

Definition at line 1837 of file tree-into-ssa.c.

References get_reaching_def(), and SET_USE.

Referenced by rewrite_update_phi_arguments().

static void rewrite_add_phi_arguments ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block  bb 
) [static]

static void rewrite_blocks ( basic_block  entry,
enum rewrite_mode  what,
sbitmap  blocks 
) [static]

static void rewrite_finalize_block ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block bb  ATTRIBUTE_UNUSED 
) [static]

static void rewrite_initialize_block ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block  bb 
) [static]

static unsigned int rewrite_into_ssa ( void   )  [static]

static void rewrite_stmt ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block bb  ATTRIBUTE_UNUSED,
block_stmt_iterator  si 
) [static]

static void rewrite_update_fini_block ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block bb  ATTRIBUTE_UNUSED 
) [static]

Definition at line 1693 of file tree-into-ssa.c.

References NULL, set_current_def(), def_blocks_d::var, VEC_length, and VEC_pop.

Referenced by rewrite_blocks().

static void rewrite_update_init_block ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block  bb 
) [static]

static void rewrite_update_phi_arguments ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block  bb 
) [static]

static void rewrite_update_stmt ( struct dom_walk_data *walk_data  ATTRIBUTE_UNUSED,
basic_block bb  ATTRIBUTE_UNUSED,
block_stmt_iterator  si 
) [static]

void set_current_def ( tree  var,
tree  def 
)

static void set_def_block ( tree  var,
basic_block  bb,
bool  phi_p 
) [static]

static void set_livein_block ( tree  var,
basic_block  bb 
) [static]

static void set_phi_state ( tree  var,
enum need_phi_state  state 
) [inline, static]

Definition at line 321 of file tree-into-ssa.c.

References get_ssa_name_ann(), SSA_NAME, TREE_CODE, and var_ann().

bitmap ssa_names_to_replace ( void   ) 

Definition at line 2680 of file tree-into-ssa.c.

References BITMAP_ALLOC, bitmap_set_bit(), EXECUTE_IF_SET_IN_SBITMAP, i, NULL, and ret.

Referenced by slpeel_tree_peel_loop_to_edge().

static void switch_virtuals_to_full_rewrite ( void   )  [static]

static bool switch_virtuals_to_full_rewrite_p ( void   )  [static]

static bool symbol_marked_for_renaming ( tree  sym  )  [inline, static]

void update_ssa ( unsigned  update_flags  ) 

static VEC ( ssa_name_info_p  ,
heap   
) [static]

Definition at line 216 of file tree-into-ssa.c.

static VEC ( typedef VEC(  tree,
heap   
) [static]

Definition at line 105 of file tree-into-ssa.c.


Variable Documentation

htab_t def_blocks [static]

Definition at line 88 of file tree-into-ssa.c.

bool need_to_update_vops_p = false [static]

Initial value:

Definition at line 2130 of file tree-into-ssa.c.

htab_t repl_tbl [static]


Generated on Wed Apr 8 14:22:20 2009 for Open64 by  doxygen 1.5.6