This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa PATCH] ANSI proto's for tree-dfa.c


Diego Novillo wrote:

On Mon, 2003-06-09 at 15:19, Steven Bosscher wrote:


Only proto's, the rest of it really isn't K&R'ish at all.



OK. Thanks.


Diego.




The last one for today: tree-ssa.c.

I still have to fix my CVS write, so if you...
Hope that's not too annoying :-)

Gr.
Steven

Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.81
diff -c -3 -p -r1.1.4.81 tree-flow.h
*** tree-flow.h	9 Jun 2003 16:26:16 -0000	1.1.4.81
--- tree-flow.h	9 Jun 2003 19:43:43 -0000
***************
*** 462,477 ****
  
  
  /* In tree-ssa.c  */
! extern void rewrite_into_ssa		PARAMS ((tree));
! extern void rewrite_out_of_ssa		PARAMS ((tree));
! extern void dump_reaching_defs		PARAMS ((FILE *));
! extern void debug_reaching_defs		PARAMS ((void));
! extern void dump_tree_ssa		PARAMS ((FILE *));
! extern void debug_tree_ssa		PARAMS ((void));
! extern void debug_def_blocks		PARAMS ((void));
! extern void dump_tree_ssa_stats		PARAMS ((FILE *));
! extern void debug_tree_ssa_stats	PARAMS ((void));
! extern void ssa_remove_edge		(edge);
  
  /* In tree-ssa-pre.c  */
  extern void tree_perform_ssapre		PARAMS ((tree));
--- 462,477 ----
  
  
  /* In tree-ssa.c  */
! extern void rewrite_into_ssa (tree);
! extern void rewrite_out_of_ssa (tree);
! extern void dump_reaching_defs (FILE *);
! extern void debug_reaching_defs (void);
! extern void dump_tree_ssa (FILE *);
! extern void debug_tree_ssa (void);
! extern void debug_def_blocks (void);
! extern void dump_tree_ssa_stats (FILE *);
! extern void debug_tree_ssa_stats (void);
! extern void ssa_remove_edge (edge);
  
  /* In tree-ssa-pre.c  */
  extern void tree_perform_ssapre		PARAMS ((tree));
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.87
diff -c -3 -p -r1.1.4.87 tree-ssa.c
*** tree-ssa.c	6 Jun 2003 20:08:54 -0000	1.1.4.87
--- tree-ssa.c	9 Jun 2003 19:43:47 -0000
*************** struct ssa_stats_d
*** 155,209 ****
  static struct ssa_stats_d ssa_stats;
  
  /* Local functions.  */
! static void init_tree_ssa		PARAMS ((void));
! static void delete_tree_ssa		PARAMS ((tree));
! static void mark_def_sites		PARAMS ((dominance_info, sbitmap));
! static void compute_global_livein	PARAMS ((varray_type));
! static void set_def_block		PARAMS ((tree, basic_block));
! static void set_livein_block		PARAMS ((tree, basic_block));
! static void insert_phi_nodes		PARAMS ((bitmap *, sbitmap));
! static void insert_phis_for_deferred_variables PARAMS ((varray_type));
! static void rewrite_block		PARAMS ((basic_block, tree));
! static int rewrite_stmt			PARAMS ((block_stmt_iterator,
! 						 varray_type *,
! 						 varray_type *));
! static inline void rewrite_operand	PARAMS ((tree *));
! static void register_new_def		PARAMS ((tree, tree, varray_type *));
! static void insert_phi_nodes_for	PARAMS ((tree, bitmap *, varray_type));
! static tree remove_annotations_r	PARAMS ((tree *, int *, void *));
! static tree get_reaching_def		PARAMS ((tree));
! static tree get_value_for		PARAMS ((tree, htab_t));
! static void set_value_for		PARAMS ((tree, tree, htab_t));
! static hashval_t def_blocks_hash	PARAMS ((const void *));
! static int def_blocks_eq		PARAMS ((const void *, const void *));
! static hashval_t var_value_hash		PARAMS ((const void *));
! static int var_value_eq			PARAMS ((const void *, const void *));
! static void def_blocks_free		PARAMS ((void *));
! static int debug_def_blocks_r		PARAMS ((void **, void *));
! static tree lookup_avail_expr		PARAMS ((tree, varray_type *));
! static tree get_eq_expr_value		PARAMS ((tree));
! static hashval_t avail_expr_hash	PARAMS ((const void *));
! static int avail_expr_eq		PARAMS ((const void *, const void *));
! static struct def_blocks_d *get_def_blocks_for PARAMS ((tree));
! static void htab_statistics		PARAMS ((FILE *, htab_t));
! 
! static tree create_temp			PARAMS ((tree));
! static void insert_copy_on_edge		PARAMS ((edge, tree, tree));
! static elim_graph new_elim_graph	PARAMS ((int));
! static void delete_elim_graph		PARAMS ((elim_graph));
! static void clear_elim_graph		PARAMS ((elim_graph));
! static void eliminate_name		PARAMS ((elim_graph, tree));
! static int eliminate_build		PARAMS ((elim_graph, basic_block, int));
! static void elim_forward		PARAMS ((elim_graph, int));
! static int elim_unvisited_predecessor	PARAMS ((elim_graph, int));
! static void elim_backward		PARAMS ((elim_graph, int));
! static void elim_create			PARAMS ((elim_graph, int));
! static void eliminate_phi		PARAMS ((edge, int, elim_graph));
! static void coalesce_ssa_name		PARAMS ((var_map));
! static void assign_vars			PARAMS ((var_map));
! static inline void set_if_valid		PARAMS ((var_map, sbitmap, tree));
! static inline void add_conflicts_if_valid	PARAMS ((root_var_p, conflict_graph, var_map, sbitmap, tree));
! static void replace_variable		PARAMS ((var_map, tree *));
  
  /* Main entry point to the SSA builder.  FNDECL is the gimplified function
     to convert.
--- 155,208 ----
  static struct ssa_stats_d ssa_stats;
  
  /* Local functions.  */
! static void init_tree_ssa (void);
! static void delete_tree_ssa (tree);
! static void mark_def_sites (dominance_info, sbitmap);
! static void compute_global_livein (varray_type);
! static void set_def_block (tree, basic_block);
! static void set_livein_block (tree, basic_block);
! static void insert_phi_nodes (bitmap *, sbitmap);
! static void insert_phis_for_deferred_variables (varray_type);
! static void rewrite_block (basic_block, tree);
! static int rewrite_stmt (block_stmt_iterator, varray_type *, varray_type *);
! static inline void rewrite_operand (tree *);
! static void register_new_def (tree, tree, varray_type *);
! static void insert_phi_nodes_for (tree, bitmap *, varray_type);
! static tree remove_annotations_r (tree *, int *, void *);
! static tree get_reaching_def (tree);
! static tree get_value_for (tree, htab_t);
! static void set_value_for (tree, tree, htab_t);
! static hashval_t def_blocks_hash (const void *);
! static int def_blocks_eq (const void *, const void *);
! static hashval_t var_value_hash (const void *);
! static int var_value_eq (const void *, const void *);
! static void def_blocks_free (void *);
! static int debug_def_blocks_r (void **, void *);
! static tree lookup_avail_expr (tree, varray_type *);
! static tree get_eq_expr_value (tree);
! static hashval_t avail_expr_hash (const void *);
! static int avail_expr_eq (const void *, const void *);
! static struct def_blocks_d *get_def_blocks_for (tree);
! static void htab_statistics (FILE *, htab_t);
! 
! 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 void eliminate_name (elim_graph, tree);
! static int eliminate_build (elim_graph, basic_block, int);
! 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, int, elim_graph);
! static void coalesce_ssa_name (var_map);
! static void assign_vars (var_map);
! static inline void set_if_valid (var_map, sbitmap, tree);
! static inline void add_conflicts_if_valid (root_var_p, conflict_graph,
! 					   var_map, sbitmap, tree);
! static void replace_variable (var_map, tree *);
  
  /* Main entry point to the SSA builder.  FNDECL is the gimplified function
     to convert.
*************** static void replace_variable		PARAMS ((v
*** 287,294 ****
     increased compilation time.  */
  
  void
! rewrite_into_ssa (fndecl)
!      tree fndecl;
  {
    bitmap *dfs;
    sbitmap globals;
--- 286,292 ----
     increased compilation time.  */
  
  void
! rewrite_into_ssa (tree fndecl)
  {
    bitmap *dfs;
    sbitmap globals;
*************** rewrite_into_ssa (fndecl)
*** 374,381 ****
     life computation by having a varray with a single element.  */
  
  static void
! compute_global_livein (def_maps)
!      varray_type def_maps;
  {
    basic_block bb, *worklist, *tos;
    bitmap in_worklist = BITMAP_XMALLOC ();
--- 372,378 ----
     life computation by having a varray with a single element.  */
  
  static void
! compute_global_livein (varray_type def_maps)
  {
    basic_block bb, *worklist, *tos;
    bitmap in_worklist = BITMAP_XMALLOC ();
*************** compute_global_livein (def_maps)
*** 461,469 ****
     we create.  */
  
  static void
! mark_def_sites (idom, globals)
!      dominance_info idom;
!      sbitmap globals;
  {
    basic_block bb;
    block_stmt_iterator si;
--- 458,464 ----
     we create.  */
  
  static void
! mark_def_sites (dominance_info idom, sbitmap globals)
  {
    basic_block bb;
    block_stmt_iterator si;
*************** mark_def_sites (idom, globals)
*** 559,567 ****
  /* Mark block BB as the definition site for variable VAR.  */
  
  static void
! set_def_block (var, bb)
!      tree var;
!      basic_block bb;
  {
    struct def_blocks_d db, *db_p;
    void **slot;
--- 554,560 ----
  /* Mark block BB as the definition site for variable VAR.  */
  
  static void
! set_def_block (tree var, basic_block bb)
  {
    struct def_blocks_d db, *db_p;
    void **slot;
*************** set_def_block (var, bb)
*** 587,595 ****
  /* Mark block BB as having VAR live at the entry to BB.  */
  
  static void
! set_livein_block (var, bb)
!      tree var;
!      basic_block bb;
  {
    struct def_blocks_d db, *db_p;
    void **slot;
--- 580,586 ----
  /* Mark block BB as having VAR live at the entry to BB.  */
  
  static void
! set_livein_block (tree var, basic_block bb)
  {
    struct def_blocks_d db, *db_p;
    void **slot;
*************** set_livein_block (var, bb)
*** 622,630 ****
     need PHI nodes.  */
  
  static void
! insert_phi_nodes (dfs, globals)
!      bitmap *dfs;
!      sbitmap globals;
  {
    size_t i;
    varray_type def_maps;
--- 613,619 ----
     need PHI nodes.  */
  
  static void
! insert_phi_nodes (bitmap *dfs, sbitmap globals)
  {
    size_t i;
    varray_type def_maps;
*************** insert_phi_nodes (dfs, globals)
*** 704,712 ****
     constant propagator can find more propagation opportunities.  */
  
  static void
! rewrite_block (bb, eq_expr_value)
!      basic_block bb;
!      tree eq_expr_value;
  {
    edge e;
    varray_type block_defs, block_avail_exprs;
--- 693,699 ----
     constant propagator can find more propagation opportunities.  */
  
  static void
! rewrite_block (basic_block bb, tree eq_expr_value)
  {
    edge e;
    varray_type block_defs, block_avail_exprs;
*************** rewrite_block (bb, eq_expr_value)
*** 844,851 ****
     type of the variable which already represents a partition.  */
  
  static tree
! create_temp (t)
!      tree t;
  {
    tree tmp;
    const char *name = NULL;
--- 831,837 ----
     type of the variable which already represents a partition.  */
  
  static tree
! create_temp (tree t)
  {
    tree tmp;
    const char *name = NULL;
*************** create_temp (t)
*** 875,883 ****
     on the specified edge.  */
  
  static void
! insert_copy_on_edge (e, dest, src)
!      edge e;
!      tree dest, src;
  {
    tree copy;
  
--- 861,867 ----
     on the specified edge.  */
  
  static void
! insert_copy_on_edge (edge e, tree dest, tree src)
  {
    tree copy;
  
*************** insert_copy_on_edge (e, dest, src)
*** 898,905 ****
  /* Create an elimination graph and associated data structures.  */
  
  static elim_graph
! new_elim_graph (size)
!      int size;
  {
    int x;
    elim_graph g = (elim_graph) xmalloc (sizeof (struct _elim_graph));
--- 882,888 ----
  /* Create an elimination graph and associated data structures.  */
  
  static elim_graph
! new_elim_graph (int size)
  {
    int x;
    elim_graph g = (elim_graph) xmalloc (sizeof (struct _elim_graph));
*************** new_elim_graph (size)
*** 921,928 ****
  }
  
  static void
! clear_elim_graph (g)
!      elim_graph g;
  {
    int x;
    int size = g->size;
--- 904,910 ----
  }
  
  static void
! clear_elim_graph (elim_graph g)
  {
    int x;
    int size = g->size;
*************** clear_elim_graph (g)
*** 938,945 ****
  
  /* Delete an elimination graph.  */
  static void
! delete_elim_graph (g)
!      elim_graph g;
  {
    int x;
    free (g->stack);
--- 920,926 ----
  
  /* Delete an elimination graph.  */
  static void
! delete_elim_graph (elim_graph g)
  {
    int x;
    free (g->stack);
*************** delete_elim_graph (g)
*** 964,972 ****
  /* Add T to the elimination graph.  */
  
  static void
! eliminate_name (g, T)
!      elim_graph g;
!      tree T;
  {
    int version = var_to_partition (g->map, T);
  
--- 945,951 ----
  /* Add T to the elimination graph.  */
  
  static void
! eliminate_name (elim_graph g, tree T)
  {
    int version = var_to_partition (g->map, T);
  
*************** eliminate_name (g, T)
*** 987,996 ****
  /* Build the auxillary graph.  */
  
  static int
! eliminate_build (g, B, i)
!      elim_graph g;
!      basic_block B;
!      int i;
  {
    tree phi;
    tree T0, Ti;
--- 966,972 ----
  /* Build the auxillary graph.  */
  
  static int
! eliminate_build (elim_graph g, basic_block B, int i)
  {
    tree phi;
    tree T0, Ti;
*************** eliminate_build (g, B, i)
*** 1020,1028 ****
  /* Push successors onto the stack depth first.  */
  
  static void 
! elim_forward (g, T)
!      elim_graph g;
!      int T;
  {
    int S;
    SET_BIT (g->visited, T);
--- 996,1002 ----
  /* Push successors onto the stack depth first.  */
  
  static void 
! elim_forward (elim_graph g, int T)
  {
    int S;
    SET_BIT (g->visited, T);
*************** elim_forward (g, T)
*** 1039,1047 ****
  /* Are there unvisited predecessors?  */
  
  static int
! elim_unvisited_predecessor (g, T)
!      elim_graph g;
!      int T;
  {
    int P;
    EXECUTE_IF_SET_IN_BITMAP (g->pred[T], 0, P,
--- 1013,1019 ----
  /* Are there unvisited predecessors?  */
  
  static int
! elim_unvisited_predecessor (elim_graph g, int T)
  {
    int P;
    EXECUTE_IF_SET_IN_BITMAP (g->pred[T], 0, P,
*************** elim_unvisited_predecessor (g, T)
*** 1055,1063 ****
  /* Process predecessors first, and insert a copy.  */
  
  static void
! elim_backward (g, T)
!      elim_graph g;
!      int T;
  {
    int P;
    SET_BIT (g->visited, T);
--- 1027,1033 ----
  /* Process predecessors first, and insert a copy.  */
  
  static void
! elim_backward (elim_graph g, int T)
  {
    int P;
    SET_BIT (g->visited, T);
*************** elim_backward (g, T)
*** 1078,1086 ****
     required copies.  */
  
  static void 
! elim_create (g, T)
!      elim_graph g;
!      int T;
  {
    tree U;
    int P, S;
--- 1048,1054 ----
     required copies.  */
  
  static void 
! elim_create (elim_graph g, int T)
  {
    tree U;
    int P, S;
*************** elim_create (g, T)
*** 1116,1125 ****
  /* Eliminate all the phi nodes on this edge.  */
  
  static void
! eliminate_phi (e, i, g)
!      edge e;
!      int i;
!      elim_graph g;
  {
    tree phi;
    int num_phi = 0;
--- 1084,1090 ----
  /* Eliminate all the phi nodes on this edge.  */
  
  static void
! eliminate_phi (edge e, int i, elim_graph g)
  {
    tree phi;
    int num_phi = 0;
*************** eliminate_phi (e, i, g)
*** 1169,1178 ****
  /* Set the bit for a partition index if the variable is in a partition.  */
  
  static inline void 
! set_if_valid (map, vec, var)
!      var_map map;
!      sbitmap vec;
!      tree var;
  { 
    int p = var_to_partition (map, var);
    if (p != NO_PARTITION)
--- 1134,1140 ----
  /* Set the bit for a partition index if the variable is in a partition.  */
  
  static inline void 
! set_if_valid (var_map map, sbitmap vec, tree var)
  { 
    int p = var_to_partition (map, var);
    if (p != NO_PARTITION)
*************** set_if_valid (map, vec, var)
*** 1183,1194 ****
     conflict between it and any other live partition.  Reset the live bit.  */
  
  static inline void 
! add_conflicts_if_valid (rv, graph, map, vec, var)
!      root_var_p rv;
!      conflict_graph graph;
!      var_map map;
!      sbitmap vec;
!      tree var;
  { 
    int p, y;
    p = var_to_partition (map, var);
--- 1145,1152 ----
     conflict between it and any other live partition.  Reset the live bit.  */
  
  static inline void 
! add_conflicts_if_valid (root_var_p rv, conflict_graph graph,
! 			var_map map, sbitmap vec, tree var)
  { 
    int p, y;
    p = var_to_partition (map, var);
*************** add_conflicts_if_valid (rv, graph, map, 
*** 1211,1218 ****
     edges, etc.)  */
  
  static void
! coalesce_ssa_name (map)
!      var_map map;
  {
    int num, x, y, z;
    conflict_graph graph;
--- 1169,1175 ----
     edges, etc.)  */
  
  static void
! coalesce_ssa_name (var_map map)
  {
    int num, x, y, z;
    conflict_graph graph;
*************** coalesce_ssa_name (map)
*** 1455,1462 ****
  /* Take the ssa-name var_map, and assign real variables to each partition.  */
  
  static void
! assign_vars (map)
!      var_map map;
  {
    int x, i, num;
    tree t, var;
--- 1412,1418 ----
  /* Take the ssa-name var_map, and assign real variables to each partition.  */
  
  static void
! assign_vars (var_map map)
  {
    int x, i, num;
    tree t, var;
*************** assign_vars (map)
*** 1538,1546 ****
  /* Replace *p with whatever variable it has been rewritten to.  */
  
  static void
! replace_variable (map, p)
!      var_map map;
!      tree *p;
  {
    tree new_var;
    tree var = *p;
--- 1494,1500 ----
  /* Replace *p with whatever variable it has been rewritten to.  */
  
  static void
! replace_variable (var_map map, tree *p)
  {
    tree new_var;
    tree var = *p;
*************** replace_variable (map, p)
*** 1569,1576 ****
  /* Take function FNDECL out of SSA form.  */
  
  void
! rewrite_out_of_ssa (fndecl)
!      tree fndecl;
  {
    basic_block bb;
    block_stmt_iterator si;
--- 1523,1529 ----
  /* Take function FNDECL out of SSA form.  */
  
  void
! rewrite_out_of_ssa (tree fndecl)
  {
    basic_block bb;
    block_stmt_iterator si;
*************** ssa_remove_edge (edge e)
*** 1717,1724 ****
  /* Dump SSA information to FILE.  */
  
  void
! dump_tree_ssa (file)
!      FILE *file;
  {
    basic_block bb;
    const char *funcname
--- 1670,1676 ----
  /* Dump SSA information to FILE.  */
  
  void
! dump_tree_ssa (FILE *file)
  {
    basic_block bb;
    const char *funcname
*************** dump_tree_ssa (file)
*** 1739,1745 ****
  /* Dump SSA information to stderr.  */
  
  void
! debug_tree_ssa ()
  {
    dump_tree_ssa (stderr);
  }
--- 1691,1697 ----
  /* Dump SSA information to stderr.  */
  
  void
! debug_tree_ssa (void)
  {
    dump_tree_ssa (stderr);
  }
*************** debug_tree_ssa ()
*** 1748,1755 ****
  /* Dump SSA statistics on FILE.  */
  
  void
! dump_tree_ssa_stats (file)
!      FILE *file;
  {
    long n_exprs;
  
--- 1700,1706 ----
  /* Dump SSA statistics on FILE.  */
  
  void
! dump_tree_ssa_stats (FILE *file)
  {
    long n_exprs;
  
*************** dump_tree_ssa_stats (file)
*** 1793,1799 ****
  /* Dump SSA statistics on stderr.  */
  
  void
! debug_tree_ssa_stats ()
  {
    dump_tree_ssa_stats (stderr);
  }
--- 1744,1750 ----
  /* Dump SSA statistics on stderr.  */
  
  void
! debug_tree_ssa_stats (void)
  {
    dump_tree_ssa_stats (stderr);
  }
*************** debug_tree_ssa_stats ()
*** 1802,1810 ****
  /* Dump statistics for the hash table HTAB.  */
  
  static void
! htab_statistics (file, htab)
!      FILE *file;
!      htab_t htab;
  {
    fprintf (file, "size %ld, %ld elements, %f collision/search ratio\n",
  	   (long) htab_size (htab),
--- 1753,1759 ----
  /* Dump statistics for the hash table HTAB.  */
  
  static void
! htab_statistics (FILE *file, htab_t htab)
  {
    fprintf (file, "size %ld, %ld elements, %f collision/search ratio\n",
  	   (long) htab_size (htab),
*************** htab_statistics (file, htab)
*** 1831,1838 ****
     object.  */
  
  static void
! insert_phis_for_deferred_variables (def_maps)
!      varray_type def_maps;
  {
    unsigned int i;
    unsigned int num_elements;
--- 1780,1786 ----
     object.  */
  
  static void
! insert_phis_for_deferred_variables (varray_type def_maps)
  {
    unsigned int i;
    unsigned int num_elements;
*************** insert_phis_for_deferred_variables (def_
*** 1866,1875 ****
  /* Insert PHI nodes for variable VAR.  */
  
  static void
! insert_phi_nodes_for (var, dfs, def_maps)
!      tree var;
!      bitmap *dfs;
!      varray_type def_maps;
  {
    struct def_blocks_d *def_map;
    bitmap phi_insertion_points;
--- 1814,1820 ----
  /* Insert PHI nodes for variable VAR.  */
  
  static void
! insert_phi_nodes_for (tree var, bitmap *dfs, varray_type def_maps)
  {
    struct def_blocks_d *def_map;
    bitmap phi_insertion_points;
*************** insert_phi_nodes_for (var, dfs, def_maps
*** 2006,2015 ****
        simplistic propagation while renaming.  */
  
  static int
! rewrite_stmt (si, block_defs_p, block_avail_exprs_p)
!      block_stmt_iterator si;
!      varray_type *block_defs_p;
!      varray_type *block_avail_exprs_p;
  {
    size_t i;
    stmt_ann_t ann;
--- 1951,1958 ----
        simplistic propagation while renaming.  */
  
  static int
! rewrite_stmt (block_stmt_iterator si, varray_type *block_defs_p,
! 	      varray_type *block_avail_exprs_p)
  {
    size_t i;
    stmt_ann_t ann;
*************** rewrite_stmt (si, block_defs_p, block_av
*** 2177,2184 ****
     definition.  */
  
  static inline void
! rewrite_operand (op_p)
!      tree *op_p;
  {
  #if defined ENABLE_CHECKING
    if (TREE_CODE (*op_p) == SSA_NAME)
--- 2120,2126 ----
     definition.  */
  
  static inline void
! rewrite_operand (tree *op_p)
  {
  #if defined ENABLE_CHECKING
    if (TREE_CODE (*op_p) == SSA_NAME)
*************** rewrite_operand (op_p)
*** 2193,2202 ****
     current reaching definition into the stack pointed by BLOCK_DEFS_P.  */
  
  static void
! register_new_def (var, def, block_defs_p)
!      tree var;
!      tree def;
!      varray_type *block_defs_p;
  {
    tree currdef = get_value_for (var, currdefs);
  
--- 2135,2141 ----
     current reaching definition into the stack pointed by BLOCK_DEFS_P.  */
  
  static void
! register_new_def (tree var, tree def, varray_type *block_defs_p)
  {
    tree currdef = get_value_for (var, currdefs);
  
*************** register_new_def (var, def, block_defs_p
*** 2224,2230 ****
  /* Initialize DFA/SSA structures.  */
  
  static void
! init_tree_ssa ()
  {
    next_ssa_version = 1;
    num_referenced_vars = 0;
--- 2163,2169 ----
  /* Initialize DFA/SSA structures.  */
  
  static void
! init_tree_ssa (void)
  {
    next_ssa_version = 1;
    num_referenced_vars = 0;
*************** init_tree_ssa ()
*** 2253,2260 ****
  /* Deallocate memory associated with SSA data structures for FNDECL.  */
  
  static void
! delete_tree_ssa (fndecl)
!      tree fndecl;
  {
    size_t i;
  
--- 2192,2198 ----
  /* Deallocate memory associated with SSA data structures for FNDECL.  */
  
  static void
! delete_tree_ssa (tree fndecl)
  {
    size_t i;
  
*************** delete_tree_ssa (fndecl)
*** 2277,2286 ****
     *TP.  */
  
  static tree
! remove_annotations_r (tp, walk_subtrees, data)
!     tree *tp;
!     int *walk_subtrees ATTRIBUTE_UNUSED;
!     void *data ATTRIBUTE_UNUSED;
  {
    tree t = *tp;
    enum tree_code code = TREE_CODE (t);
--- 2215,2222 ----
     *TP.  */
  
  static tree
! remove_annotations_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
! 		      void *data ATTRIBUTE_UNUSED)
  {
    tree t = *tp;
    enum tree_code code = TREE_CODE (t);
*************** remove_annotations_r (tp, walk_subtrees,
*** 2316,2323 ****
     has been clobbered by a function call since its last assignment.  */
  
  static tree
! get_reaching_def (var)
!      tree var;
  {
    tree default_def, currdef_var;
    
--- 2252,2258 ----
     has been clobbered by a function call since its last assignment.  */
  
  static tree
! get_reaching_def (tree var)
  {
    tree default_def, currdef_var;
    
*************** get_reaching_def (var)
*** 2342,2349 ****
  /* Free memory allocated for a <def, def_blocks> tuple.  */
  
  static void
! def_blocks_free (p)
!      void *p;
  {
    struct def_blocks_d *db_p = (struct def_blocks_d *) p;
    BITMAP_XFREE (db_p->def_blocks);
--- 2277,2283 ----
  /* Free memory allocated for a <def, def_blocks> tuple.  */
  
  static void
! def_blocks_free (void *p)
  {
    struct def_blocks_d *db_p = (struct def_blocks_d *) p;
    BITMAP_XFREE (db_p->def_blocks);
*************** def_blocks_free (p)
*** 2355,2370 ****
  /* Hashing and equality functions for DEF_BLOCKS.  */
  
  static hashval_t
! def_blocks_hash (p)
!      const void *p;
  {
!   return htab_hash_pointer ((const void *)((const struct def_blocks_d *)p)->var);
  }
  
  static int
! def_blocks_eq (p1, p2)
!      const void *p1;
!      const void *p2;
  {
    return ((const struct def_blocks_d *)p1)->var
  	 == ((const struct def_blocks_d *)p2)->var;
--- 2289,2302 ----
  /* Hashing and equality functions for DEF_BLOCKS.  */
  
  static hashval_t
! def_blocks_hash (const void *p)
  {
!   return htab_hash_pointer
! 	((const void *)((const struct def_blocks_d *)p)->var);
  }
  
  static int
! def_blocks_eq (const void *p1, const void *p2)
  {
    return ((const struct def_blocks_d *)p1)->var
  	 == ((const struct def_blocks_d *)p2)->var;
*************** def_blocks_eq (p1, p2)
*** 2374,2389 ****
  /* Hashing and equality functions for VAR_VALUE_D.  */
  
  static hashval_t
! var_value_hash (p)
!      const void *p;
  {
!   return htab_hash_pointer ((const void *)((const struct var_value_d *)p)->var);
  }
  
  static int
! var_value_eq (p1, p2)
!      const void *p1;
!      const void *p2;
  {
    return ((const struct var_value_d *)p1)->var
  	 == ((const struct var_value_d *)p2)->var;
--- 2306,2319 ----
  /* Hashing and equality functions for VAR_VALUE_D.  */
  
  static hashval_t
! var_value_hash (const void *p)
  {
!   return htab_hash_pointer
! 	((const void *)((const struct var_value_d *)p)->var);
  }
  
  static int
! var_value_eq (const void *p1, const void *p2)
  {
    return ((const struct var_value_d *)p1)->var
  	 == ((const struct var_value_d *)p2)->var;
*************** var_value_eq (p1, p2)
*** 2393,2399 ****
  /* Dump the DEF_BLOCKS hash table on stderr.  */
  
  void
! debug_def_blocks ()
  {
    htab_traverse (def_blocks, debug_def_blocks_r, NULL);
  }
--- 2323,2329 ----
  /* Dump the DEF_BLOCKS hash table on stderr.  */
  
  void
! debug_def_blocks (void)
  {
    htab_traverse (def_blocks, debug_def_blocks_r, NULL);
  }
*************** debug_def_blocks ()
*** 2401,2409 ****
  /* Callback for htab_traverse to dump the DEF_BLOCKS hash table.  */
  
  static int
! debug_def_blocks_r (slot, data)
!      void **slot;
!      void *data ATTRIBUTE_UNUSED;
  {
    unsigned long i;
    struct def_blocks_d *db_p = (struct def_blocks_d *) *slot;
--- 2331,2337 ----
  /* Callback for htab_traverse to dump the DEF_BLOCKS hash table.  */
  
  static int
! debug_def_blocks_r (void **slot, void *data ATTRIBUTE_UNUSED)
  {
    unsigned long i;
    struct def_blocks_d *db_p = (struct def_blocks_d *) *slot;
*************** debug_def_blocks_r (slot, data)
*** 2426,2434 ****
  /* Return the value associated with variable VAR in TABLE.  */
  
  static tree
! get_value_for (var, table)
!      tree var;
!      htab_t table;
  {
    struct var_value_d *vm_p, vm;
  
--- 2354,2360 ----
  /* Return the value associated with variable VAR in TABLE.  */
  
  static tree
! get_value_for (tree var, htab_t table)
  {
    struct var_value_d *vm_p, vm;
  
*************** get_value_for (var, table)
*** 2446,2455 ****
  /* Associate VALUE to variable VAR in TABLE.  */
  
  static void
! set_value_for (var, value, table)
!      tree var;
!      tree value;
!      htab_t table;
  {
    struct var_value_d *vm_p, vm;
    void **slot;
--- 2372,2378 ----
  /* Associate VALUE to variable VAR in TABLE.  */
  
  static void
! set_value_for (tree var, tree value, htab_t table)
  {
    struct var_value_d *vm_p, vm;
    void **slot;
*************** set_value_for (var, value, table)
*** 2487,2495 ****
  	 aliased references.  */
  
  static tree
! lookup_avail_expr (stmt, block_avail_exprs_p)
!      tree stmt;
!      varray_type *block_avail_exprs_p;
  {
    void **slot;
    tree rhs;
--- 2410,2416 ----
  	 aliased references.  */
  
  static tree
! lookup_avail_expr (tree stmt, varray_type *block_avail_exprs_p)
  {
    void **slot;
    tree rhs;
*************** lookup_avail_expr (stmt, block_avail_exp
*** 2522,2529 ****
     form 'X'.  The assignment 'X = 1' is returned.  */
  
  static tree
! get_eq_expr_value (if_stmt)
!      tree if_stmt;
  {
    tree cond, value;
  
--- 2443,2449 ----
     form 'X'.  The assignment 'X = 1' is returned.  */
  
  static tree
! get_eq_expr_value (tree if_stmt)
  {
    tree cond, value;
  
*************** get_eq_expr_value (if_stmt)
*** 2555,2562 ****
     the code of the expression and the SSA numbers of its operands.  */
  
  static hashval_t
! avail_expr_hash (p)
!      const void *p;
  {
    hashval_t val = 0;
    tree rhs;
--- 2475,2481 ----
     the code of the expression and the SSA numbers of its operands.  */
  
  static hashval_t
! avail_expr_hash (const void *p)
  {
    hashval_t val = 0;
    tree rhs;
*************** avail_expr_hash (p)
*** 2590,2598 ****
  
  
  static int
! avail_expr_eq (p1, p2)
!      const void *p1;
!      const void *p2;
  {
    tree s1, s2, rhs1, rhs2;
  
--- 2509,2515 ----
  
  
  static int
! avail_expr_eq (const void *p1, const void *p2)
  {
    tree s1, s2, rhs1, rhs2;
  
*************** avail_expr_eq (p1, p2)
*** 2632,2639 ****
     where VAR is live on entry (livein).  */
  
  static struct def_blocks_d *
! get_def_blocks_for (var)
!      tree var;
  {
    struct def_blocks_d dm;
  
--- 2549,2555 ----
     where VAR is live on entry (livein).  */
  
  static struct def_blocks_d *
! get_def_blocks_for (tree var)
  {
    struct def_blocks_d dm;
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]