osprey-gcc/gcc/tree-outof-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 "ggc.h"
#include "langhooks.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "output.h"
#include "errors.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-ssa-live.h"
#include "tree-pass.h"

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

Go to the source code of this file.

Data Types

type  _elim_graph
type  value_expr_d
type  temp_expr_table_d

Defines

#define SSANORM_PERFORM_TER   0x1
#define SSANORM_COMBINE_TEMPS   0x2
#define SSANORM_COALESCE_PARTITIONS   0x4
#define FOR_EACH_ELIM_GRAPH_SUCC(GRAPH, NODE, VAR, CODE)
#define FOR_EACH_ELIM_GRAPH_PRED(GRAPH, NODE, VAR, CODE)
#define VIRTUAL_PARTITION(table)   (table->virtual_partition)

Typedefs

typedef struct _elim_graphelim_graph
typedef struct value_expr_dvalue_expr_p
typedef struct temp_expr_table_dtemp_expr_table_p

Functions/Subroutines

static tree create_temp (tree)
static void insert_copy_on_edge (edge, tree, tree)
static elim_graph new_elim_graph (int)
static void delete_elim_graph (elim_graph)
static void clear_elim_graph (elim_graph)
static int elim_graph_size (elim_graph)
static void elim_graph_add_node (elim_graph, tree)
static void elim_graph_add_edge (elim_graph, int, int)
static int elim_graph_remove_succ_edge (elim_graph, int)
static void eliminate_name (elim_graph, tree)
static void eliminate_build (elim_graph, basic_block)
static void elim_forward (elim_graph, int)
static int elim_unvisited_predecessor (elim_graph, int)
static void elim_backward (elim_graph, int)
static void elim_create (elim_graph, int)
static void eliminate_phi (edge, elim_graph)
static tree_live_info_p coalesce_ssa_name (var_map, int)
static void assign_vars (var_map)
static bool replace_use_variable (var_map, use_operand_p, tree *)
static bool replace_def_variable (var_map, def_operand_p, tree *)
static void eliminate_virtual_phis (void)
static void coalesce_abnormal_edges (var_map, conflict_graph, root_var_p)
static void print_exprs (FILE *, const char *, tree, const char *, tree, const char *)
static void print_exprs_edge (FILE *, edge, const char *, tree, const char *, tree)
static void coalesce_phi_operands (var_map map, coalesce_list_p cl)
static void coalesce_result_decls (var_map map, coalesce_list_p cl)
static void coalesce_asm_operands (var_map map, coalesce_list_p cl)
static void coalesce_vars (var_map map, tree_live_info_p liveinfo)
static temp_expr_table_p new_temp_expr_table (var_map)
static treefree_temp_expr_table (temp_expr_table_p)
static value_expr_p new_value_expr (temp_expr_table_p)
static void free_value_expr (temp_expr_table_p, value_expr_p)
static value_expr_p find_value_in_list (value_expr_p, int, value_expr_p *)
static void add_value_to_list (temp_expr_table_p, value_expr_p *, int)
static void add_info_to_list (temp_expr_table_p, value_expr_p *, value_expr_p)
static value_expr_p remove_value_from_list (value_expr_p *, int)
static void add_dependance (temp_expr_table_p, int, tree)
static bool check_replaceable (temp_expr_table_p, tree)
static void finish_expr (temp_expr_table_p, int, bool)
static void mark_replaceable (temp_expr_table_p, tree)
static void kill_expr (temp_expr_table_p, int, bool)
static void kill_virtual_exprs (temp_expr_table_p, bool)
static void find_replaceable_in_bb (temp_expr_table_p, basic_block)
static treefind_replaceable_exprs (var_map)
static void dump_replaceable_exprs (FILE *, tree *)
static tree discover_nonconstant_array_refs_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
static void discover_nonconstant_array_refs (void)
static void rewrite_trees (var_map map, tree *values)
static varray_type GTY (())
static bool identical_copies_p (tree s1, tree s2)
static bool identical_stmt_lists_p (edge e1, edge e2)
static bool analyze_edges_for_bb (basic_block bb, FILE *debug_file)
static void perform_edge_inserts (FILE *dump_file)
static void remove_ssa_form (FILE *dump, var_map map, int flags)
static void insert_backedge_copies (void)
static void rewrite_out_of_ssa (void)

Variables

static varray_type edge_leader = NULL
struct tree_opt_pass pass_del_ssa


Define Documentation

#define FOR_EACH_ELIM_GRAPH_PRED ( GRAPH,
NODE,
VAR,
CODE   ) 

Value:

do {                  \
  unsigned x_;                \
  int y_;               \
  for (x_ = 0; x_ < VARRAY_ACTIVE_SIZE ((GRAPH)->edge_list); x_ += 2) \
    {                 \
      y_ = VARRAY_INT ((GRAPH)->edge_list, x_ + 1);     \
      if (y_ != (NODE))             \
        continue;             \
      (VAR) = VARRAY_INT ((GRAPH)->edge_list, x_);      \
      CODE;               \
    }                 \
} while (0)

Definition at line 327 of file tree-outof-ssa.c.

Referenced by elim_backward(), elim_create(), and elim_unvisited_predecessor().

#define FOR_EACH_ELIM_GRAPH_SUCC ( GRAPH,
NODE,
VAR,
CODE   ) 

Value:

do {                  \
  unsigned x_;                \
  int y_;               \
  for (x_ = 0; x_ < VARRAY_ACTIVE_SIZE ((GRAPH)->edge_list); x_ += 2) \
    {                 \
      y_ = VARRAY_INT ((GRAPH)->edge_list, x_);       \
      if (y_ != (NODE))             \
        continue;             \
      (VAR) = VARRAY_INT ((GRAPH)->edge_list, x_ + 1);      \
      CODE;               \
    }                 \
} while (0)

Definition at line 308 of file tree-outof-ssa.c.

Referenced by elim_forward().

#define SSANORM_COALESCE_PARTITIONS   0x4

Definition at line 54 of file tree-outof-ssa.c.

Referenced by coalesce_ssa_name(), and rewrite_out_of_ssa().

#define SSANORM_COMBINE_TEMPS   0x2

Definition at line 53 of file tree-outof-ssa.c.

Referenced by coalesce_ssa_name(), remove_ssa_form(), and rewrite_out_of_ssa().

#define SSANORM_PERFORM_TER   0x1

Definition at line 52 of file tree-outof-ssa.c.

Referenced by remove_ssa_form(), and rewrite_out_of_ssa().

#define VIRTUAL_PARTITION ( table   )     (table->virtual_partition)

Definition at line 1290 of file tree-outof-ssa.c.

Referenced by check_replaceable(), and kill_virtual_exprs().


Typedef Documentation


Function Documentation

static void add_dependance ( temp_expr_table_p  tab,
int  version,
tree  var 
) [static]

static void add_info_to_list ( temp_expr_table_p  tab,
value_expr_p list,
value_expr_p  info 
) [inline, static]

static void add_value_to_list ( temp_expr_table_p  tab,
value_expr_p list,
int  value 
) [inline, static]

static bool analyze_edges_for_bb ( basic_block  bb,
FILE debug_file 
) [static]

static void assign_vars ( var_map  map  )  [static]

static bool check_replaceable ( temp_expr_table_p  tab,
tree  stmt 
) [static]

static void clear_elim_graph ( elim_graph  g  )  [inline, static]

Definition at line 235 of file tree-outof-ssa.c.

References _elim_graph::edge_list, _elim_graph::nodes, and VARRAY_POP_ALL.

Referenced by eliminate_build().

static void coalesce_abnormal_edges ( var_map  map,
conflict_graph  graph,
root_var_p  rv 
) [static]

static void coalesce_asm_operands ( var_map  map,
coalesce_list_p  cl 
) [static]

static void coalesce_phi_operands ( var_map  map,
coalesce_list_p  cl 
) [static]

static void coalesce_result_decls ( var_map  map,
coalesce_list_p  cl 
) [static]

static tree_live_info_p coalesce_ssa_name ( var_map  map,
int  flags 
) [static]

static void coalesce_vars ( var_map  map,
tree_live_info_p  liveinfo 
) [static]

static tree create_temp ( tree  t  )  [static]

static void delete_elim_graph ( elim_graph  g  )  [inline, static]

Definition at line 245 of file tree-outof-ssa.c.

References free(), sbitmap_free, and _elim_graph::visited.

Referenced by rewrite_trees().

static void discover_nonconstant_array_refs ( void   )  [static]

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

static void dump_replaceable_exprs ( FILE f,
tree expr 
) [static]

static void elim_backward ( elim_graph  g,
int  T 
) [static]

static void elim_create ( elim_graph  g,
int  T 
) [static]

static void elim_forward ( elim_graph  g,
int  T 
) [static]

static void elim_graph_add_edge ( elim_graph  g,
int  pred,
int  succ 
) [inline, static]

Definition at line 277 of file tree-outof-ssa.c.

References _elim_graph::edge_list, and VARRAY_PUSH_INT.

Referenced by eliminate_build().

static void elim_graph_add_node ( elim_graph  g,
tree  node 
) [inline, static]

Definition at line 264 of file tree-outof-ssa.c.

References elim_graph_size(), _elim_graph::nodes, VARRAY_PUSH_TREE, VARRAY_TREE, and x.

Referenced by eliminate_name().

static int elim_graph_remove_succ_edge ( elim_graph  g,
int  node 
) [inline, static]

Definition at line 288 of file tree-outof-ssa.c.

References _elim_graph::edge_list, VARRAY_ACTIVE_SIZE, VARRAY_INT, x, and is::y.

static int elim_graph_size ( elim_graph  g  )  [inline, static]

Definition at line 255 of file tree-outof-ssa.c.

References _elim_graph::nodes, and VARRAY_ACTIVE_SIZE.

Referenced by elim_graph_add_node(), and eliminate_phi().

static int elim_unvisited_predecessor ( elim_graph  g,
int  T 
) [static]

Definition at line 420 of file tree-outof-ssa.c.

References FOR_EACH_ELIM_GRAPH_PRED, P, TEST_BIT, and _elim_graph::visited.

Referenced by elim_create().

static void eliminate_build ( elim_graph  g,
basic_block  B 
) [static]

static void eliminate_name ( elim_graph  g,
tree  T 
) [inline, static]

Definition at line 345 of file tree-outof-ssa.c.

References elim_graph_add_node().

Referenced by eliminate_build().

static void eliminate_phi ( edge  e,
elim_graph  g 
) [static]

static void eliminate_virtual_phis ( void   )  [static]

static tree * find_replaceable_exprs ( var_map  map  )  [static]

static void find_replaceable_in_bb ( temp_expr_table_p  tab,
basic_block  bb 
) [static]

static value_expr_p find_value_in_list ( value_expr_p  list,
int  value,
value_expr_p last_ptr 
) [inline, static]

Definition at line 1408 of file tree-outof-ssa.c.

References last, value_expr_d::next, and NULL.

Referenced by add_info_to_list(), add_value_to_list(), and remove_value_from_list().

static void finish_expr ( temp_expr_table_p  tab,
int  version,
bool  replace 
) [static]

static tree * free_temp_expr_table ( temp_expr_table_p  t  )  [static]

static void free_value_expr ( temp_expr_table_p  table,
value_expr_p  p 
) [inline, static]

static varray_type GTY ( ()   )  [static]

Definition at line 2035 of file tree-outof-ssa.c.

References PTR.

static bool identical_copies_p ( tree  s1,
tree  s2 
) [inline, static]

Definition at line 2051 of file tree-outof-ssa.c.

References DECL_P, gcc_assert, TREE_CODE, and TREE_OPERAND.

Referenced by identical_stmt_lists_p().

static bool identical_stmt_lists_p ( edge  e1,
edge  e2 
) [inline, static]

static void insert_backedge_copies ( void   )  [static]

static void insert_copy_on_edge ( edge  e,
tree  dest,
tree  src 
) [static]

static void kill_expr ( temp_expr_table_p  tab,
int  partition,
bool  clear_bit 
) [inline, static]

static void kill_virtual_exprs ( temp_expr_table_p  tab,
bool  clear_bit 
) [inline, static]

Definition at line 1696 of file tree-outof-ssa.c.

References kill_expr(), and VIRTUAL_PARTITION.

Referenced by find_replaceable_in_bb().

static void mark_replaceable ( temp_expr_table_p  tab,
tree  var 
) [static]

static elim_graph new_elim_graph ( int  size  )  [static]

static temp_expr_table_p new_temp_expr_table ( var_map  map  )  [static]

static value_expr_p new_value_expr ( temp_expr_table_p  table  )  [inline, static]

Definition at line 1378 of file tree-outof-ssa.c.

References temp_expr_table_d::free_list, value_expr_d::next, p, and xmalloc().

Referenced by add_value_to_list().

static void perform_edge_inserts ( FILE dump_file  )  [static]

static void print_exprs ( FILE f,
const char *  str1,
tree  expr1,
const char *  str2,
tree  expr2,
const char *  str3 
) [static]

Definition at line 547 of file tree-outof-ssa.c.

References fprintf(), print_generic_expr(), and TDF_SLIM.

Referenced by assign_vars(), coalesce_ssa_name(), and print_exprs_edge().

static void print_exprs_edge ( FILE f,
edge  e,
const char *  str1,
tree  expr1,
const char *  str2,
tree  expr2 
) [static]

Definition at line 562 of file tree-outof-ssa.c.

References edge::dest, fprintf(), print_exprs(), and edge::src.

Referenced by coalesce_abnormal_edges().

static void remove_ssa_form ( FILE dump,
var_map  map,
int  flags 
) [static]

static value_expr_p remove_value_from_list ( value_expr_p list,
int  value 
) [static]

Definition at line 1462 of file tree-outof-ssa.c.

References find_value_in_list(), info, last, value_expr_d::next, and NULL.

Referenced by finish_expr().

static bool replace_def_variable ( var_map  map,
def_operand_p  def_p,
tree expr 
) [inline, static]

static bool replace_use_variable ( var_map  map,
use_operand_p  p,
tree expr 
) [inline, static]

static void rewrite_out_of_ssa ( void   )  [static]

static void rewrite_trees ( var_map  map,
tree values 
) [static]


Variable Documentation

varray_type edge_leader = NULL [static]

Initial value:

Definition at line 2605 of file tree-outof-ssa.c.

Referenced by init_optimization_passes(), and init_tree_optimization_passes().


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