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] Change *_ops to receive a stmt_ann_t instead of atree


Op za 11-10-2003, om 00:17 schreef Steven Bosscher:
> This patch fixes the FIXME.  Pretty boring overall...  Bootstrapped
> c,c++,gfortran and tested with no regressions.  OK?

That's what you get from this kind of patches...  This time it's really
there.

> 	* tree-flow-inline.h (def_ops): Take a stmt_ann_t as argument
> 	instead of a tree.
> 	(use_ops): Likewise.
> 	(vdef_ops): Likewise.
> 	(vuse_ops): Likewise.
> 	* tree-flow.h: Update prototypes.
> 	* tree-cfg.c (remove_stmt): Load the statement annotation.
> 	Adjust *_ops calls.
> 	* tree-dfa.c (compute_immediate_uses_for_stmt): Likewise.
> 	* tree-pretty-print.c (dump_vops): Likewise.
> 	* tree-ssa-ccp.c (tree_ssa_ccp): Likewise.  Also remove now
> 	superfluous stmt_ann() calls.
> 	(visit_stmt, cpp_fold, add_var_to_ssa_edges_worklist,
> 	initialize, replace_uses_in, likely_value): Likewise.
> 	* tree-ssa-copyprop.c (copyprop_stmt): Likewise.
> 	* tree-ssa-dce.c (stmt_useful_p, process_worklist): Likewise.
> 	* tree-ssa-dom.c (cprop_into_stmt, optimize_stmt,
> 	avail_expr_hash, avail_expr_eq, mark_new_vars_to_rename):
> 	Likewise.
> 	* tree-ssa-live.c (create_ssa_var_map, calculate_live_on_entry,
> 	build_tree_conflict_graph): Likewise.
> 	* tree-ssa-pre.c (maybe_find_rhs_use_for_var,
> 	expr_phi_insertion, same_e_version_real_occ_real_occ,
> 	generate_expr_as_of_bb, bool load_modified_real_occ_real_occ,
> 	bool same_e_version_phi_result, get_default_def,reaching_def,
> 	tree_perform_ssapre): Likewise.
> 	* tree-ssa.c (mark_def_sites, rewrite_out_of_ssa, rewrite_stmt):
> 	Likewise.
> 
> Yes, a patch can be that boring...


Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.173
diff -c -3 -p -r1.1.4.173 tree-cfg.c
*** tree-cfg.c	6 Oct 2003 14:34:25 -0000	1.1.4.173
--- tree-cfg.c	10 Oct 2003 14:24:57 -0000
*************** remove_stmt (tree *stmt_p, bool remove_a
*** 1927,1933 ****
  	 definitions made here, but that is expensive and can easily
  	 be checked by every pass by checking if SSA_NAME_DEF_STMT is
  	 a nop.  */ 
!       defs = def_ops (stmt);
        for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
  	{
  	  tree *def_p = VARRAY_TREE_PTR (defs, i);
--- 1927,1934 ----
  	 definitions made here, but that is expensive and can easily
  	 be checked by every pass by checking if SSA_NAME_DEF_STMT is
  	 a nop.  */ 
!       stmt_ann_t ann = stmt_ann (stmt);
!       defs = def_ops (ann);
        for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
  	{
  	  tree *def_p = VARRAY_TREE_PTR (defs, i);
*************** remove_stmt (tree *stmt_p, bool remove_a
*** 1935,1941 ****
  	    SSA_NAME_DEF_STMT (*def_p) = build_empty_stmt ();
  	}
        
!       vdefs = vdef_ops (stmt);
        for (i = 0; vdefs && i < VARRAY_ACTIVE_SIZE (vdefs); i++)
  	{
  	  tree vdef = VDEF_RESULT (VARRAY_TREE (vdefs, i));
--- 1936,1942 ----
  	    SSA_NAME_DEF_STMT (*def_p) = build_empty_stmt ();
  	}
        
!       vdefs = vdef_ops (ann);
        for (i = 0; vdefs && i < VARRAY_ACTIVE_SIZE (vdefs); i++)
  	{
  	  tree vdef = VDEF_RESULT (VARRAY_TREE (vdefs, i));
Index: tree-dfa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-dfa.c,v
retrieving revision 1.1.4.169
diff -c -3 -p -r1.1.4.169 tree-dfa.c
*** tree-dfa.c	9 Oct 2003 20:41:06 -0000	1.1.4.169
--- tree-dfa.c	10 Oct 2003 14:25:04 -0000
*************** compute_immediate_uses_for_stmt (tree st
*** 1222,1227 ****
--- 1222,1228 ----
  {
    size_t i;
    varray_type ops;
+   stmt_ann_t ann;
  
    /* PHI nodes are handled elsewhere.  */
  #ifdef ENABLE_CHECKING
*************** compute_immediate_uses_for_stmt (tree st
*** 1230,1238 ****
  #endif
  
    /* Look at USE_OPS or VUSE_OPS according to FLAGS.  */
!   if ((flags & TDFA_USE_OPS) && use_ops (stmt))
      {
!       ops = use_ops (stmt);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree *use_p = VARRAY_TREE_PTR (ops, i);
--- 1231,1240 ----
  #endif
  
    /* Look at USE_OPS or VUSE_OPS according to FLAGS.  */
!   ann = stmt_ann (stmt);
!   if ((flags & TDFA_USE_OPS) && use_ops (ann))
      {
!       ops = use_ops (ann);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree *use_p = VARRAY_TREE_PTR (ops, i);
*************** compute_immediate_uses_for_stmt (tree st
*** 1242,1250 ****
  	}
      }
  
!   if ((flags & TDFA_USE_VOPS) && vuse_ops (stmt))
      {
!       ops = vuse_ops (stmt);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree vuse = VARRAY_TREE (ops, i);
--- 1244,1252 ----
  	}
      }
  
!   if ((flags & TDFA_USE_VOPS) && vuse_ops (ann))
      {
!       ops = vuse_ops (ann);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree vuse = VARRAY_TREE (ops, i);
Index: tree-flow-inline.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow-inline.h,v
retrieving revision 1.1.2.52
diff -c -3 -p -r1.1.2.52 tree-flow-inline.h
*** tree-flow-inline.h	24 Sep 2003 21:43:04 -0000	1.1.2.52
--- tree-flow-inline.h	10 Oct 2003 14:25:04 -0000
*************** stmt_modified_p (tree t)
*** 199,229 ****
  }
  
  static inline varray_type
! def_ops (tree stmt)
  {
-   stmt_ann_t ann = stmt_ann (stmt);
    return ann ? (ann->ops ? ann->ops->def_ops : NULL) : NULL;
  }
  
  static inline varray_type
! use_ops (tree stmt)
  {
-   stmt_ann_t ann = stmt_ann (stmt);
    return ann ? (ann->ops ? ann->ops->use_ops : NULL) : NULL;
  }
  
  
  static inline varray_type
! vdef_ops (tree stmt)
  {
-   stmt_ann_t ann = stmt_ann (stmt);
    return ann ? (ann->vops ? ann->vops->vdef_ops : NULL) : NULL;
  }
  
  static inline varray_type
! vuse_ops (tree stmt)
  {
-   stmt_ann_t ann = stmt_ann (stmt);
    return ann ? (ann->vops ? ann->vops->vuse_ops : NULL) : NULL;
  }
  
--- 199,225 ----
  }
  
  static inline varray_type
! def_ops (stmt_ann_t ann)
  {
    return ann ? (ann->ops ? ann->ops->def_ops : NULL) : NULL;
  }
  
  static inline varray_type
! use_ops (stmt_ann_t ann)
  {
    return ann ? (ann->ops ? ann->ops->use_ops : NULL) : NULL;
  }
  
  
  static inline varray_type
! vdef_ops (stmt_ann_t ann)
  {
    return ann ? (ann->vops ? ann->vops->vdef_ops : NULL) : NULL;
  }
  
  static inline varray_type
! vuse_ops (stmt_ann_t ann)
  {
    return ann ? (ann->vops ? ann->vops->vuse_ops : NULL) : NULL;
  }
  
Index: tree-flow.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow.h,v
retrieving revision 1.1.4.124
diff -c -3 -p -r1.1.4.124 tree-flow.h
*** tree-flow.h	6 Oct 2003 19:39:45 -0000	1.1.4.124
--- tree-flow.h	10 Oct 2003 14:25:05 -0000
*************** static inline int get_lineno (tree);
*** 277,286 ****
  static inline const char *get_filename (tree);
  static inline bool is_exec_stmt (tree);
  static inline bool is_label_stmt (tree);
! static inline varray_type vdef_ops (tree);
! static inline varray_type vuse_ops (tree);
! static inline varray_type use_ops (tree);
! static inline varray_type def_ops (tree);
  static inline varray_type addresses_taken (tree);
  static inline int num_immediate_uses (dataflow_t);
  static inline tree immediate_use (dataflow_t, int);
--- 277,286 ----
  static inline const char *get_filename (tree);
  static inline bool is_exec_stmt (tree);
  static inline bool is_label_stmt (tree);
! static inline varray_type vdef_ops (stmt_ann_t);
! static inline varray_type vuse_ops (stmt_ann_t);
! static inline varray_type use_ops (stmt_ann_t);
! static inline varray_type def_ops (stmt_ann_t);
  static inline varray_type addresses_taken (tree);
  static inline int num_immediate_uses (dataflow_t);
  static inline tree immediate_use (dataflow_t, int);
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-pretty-print.c,v
retrieving revision 1.1.2.46
diff -c -3 -p -r1.1.2.46 tree-pretty-print.c
*** tree-pretty-print.c	28 Sep 2003 06:06:37 -0000	1.1.2.46
--- tree-pretty-print.c	10 Oct 2003 14:25:08 -0000
*************** dump_vops (pretty_printer *buffer, tree 
*** 1986,1993 ****
  {
    size_t i;
    basic_block bb;
!   varray_type vdefs = vdef_ops (stmt);
!   varray_type vuses = vuse_ops (stmt);
  
    bb = bb_for_stmt (stmt);
    if (bb && bb != last_bb && bb->tree_annotations)
--- 1986,1994 ----
  {
    size_t i;
    basic_block bb;
!   stmt_ann_t ann = stmt_ann (stmt);
!   varray_type vdefs = vdef_ops (ann);
!   varray_type vuses = vuse_ops (ann);
  
    bb = bb_for_stmt (stmt);
    if (bb && bb != last_bb && bb->tree_annotations)
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v
retrieving revision 1.1.2.99
diff -c -3 -p -r1.1.2.99 tree-ssa-ccp.c
*** tree-ssa-ccp.c	8 Oct 2003 23:35:08 -0000	1.1.2.99
--- tree-ssa-ccp.c	10 Oct 2003 14:25:10 -0000
*************** tree_ssa_ccp (tree fndecl, sbitmap vars_
*** 169,181 ****
  	{
  	  /* Pull the statement to simulate off the worklist.  */
  	  tree stmt = VARRAY_TOP_TREE (ssa_edges);
  	  VARRAY_POP (ssa_edges);
  
  	  /* visit_stmt can "cancel" reevaluation of some statements.
  	     If it does, then in_ccp_worklist will be zero.  */
! 	  if (stmt_ann (stmt)->in_ccp_worklist)
  	    {
! 	      stmt_ann (stmt)->in_ccp_worklist = 0;
  	      simulate_stmt (stmt);
  	    }
  	}
--- 169,182 ----
  	{
  	  /* Pull the statement to simulate off the worklist.  */
  	  tree stmt = VARRAY_TOP_TREE (ssa_edges);
+ 	  stmt_ann_t ann = stmt_ann (stmt);
  	  VARRAY_POP (ssa_edges);
  
  	  /* visit_stmt can "cancel" reevaluation of some statements.
  	     If it does, then in_ccp_worklist will be zero.  */
! 	  if (ann->in_ccp_worklist)
  	    {
! 	      ann->in_ccp_worklist = 0;
  	      simulate_stmt (stmt);
  	    }
  	}
*************** static void
*** 554,559 ****
--- 555,561 ----
  visit_stmt (tree stmt)
  {
    size_t i;
+   stmt_ann_t ann;
    varray_type ops;
  
    /* If the statement has already been deemed to be VARYING, don't simulate
*************** visit_stmt (tree stmt)
*** 568,579 ****
        fprintf (dump_file, "\n");
      }
  
    /* If this statement is already in the worklist then "cancel" it.  The
       reevaluation implied by the worklist entry will produce the same
       value we generate here and thus reevaluting it again from the
       worklist is pointless.  */
!   if (stmt_ann (stmt)->in_ccp_worklist)
!     stmt_ann (stmt)->in_ccp_worklist = 0;
  
    /* Now examine the statement.  If the statement is an assignment that
       produces a single output value, evaluate its RHS to see if the lattice
--- 570,583 ----
        fprintf (dump_file, "\n");
      }
  
+   ann = stmt_ann (stmt);
+ 
    /* If this statement is already in the worklist then "cancel" it.  The
       reevaluation implied by the worklist entry will produce the same
       value we generate here and thus reevaluting it again from the
       worklist is pointless.  */
!   if (ann->in_ccp_worklist)
!     ann->in_ccp_worklist = 0;
  
    /* Now examine the statement.  If the statement is an assignment that
       produces a single output value, evaluate its RHS to see if the lattice
*************** visit_stmt (tree stmt)
*** 584,593 ****
  
    /* Definitions made by statements other than assignments to SSA_NAMEs
       represent unknown modifications to their outputs.  Mark them VARYING.  */
!   else if (def_ops (stmt))
      {
        DONT_SIMULATE_AGAIN (stmt) = 1;
!       ops = def_ops (stmt);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree *def_p = VARRAY_TREE_PTR (ops, i);
--- 588,597 ----
  
    /* Definitions made by statements other than assignments to SSA_NAMEs
       represent unknown modifications to their outputs.  Mark them VARYING.  */
!   else if (def_ops (ann))
      {
        DONT_SIMULATE_AGAIN (stmt) = 1;
!       ops = def_ops (ann);
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
  	{
  	  tree *def_p = VARRAY_TREE_PTR (ops, i);
*************** visit_stmt (tree stmt)
*** 613,619 ****
      }
  
    /* Mark all VDEF operands VARYING.  */
!   ops = vdef_ops (stmt);
    if (ops)
      {
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
--- 617,623 ----
      }
  
    /* Mark all VDEF operands VARYING.  */
!   ops = vdef_ops (ann);
    if (ops)
      {
        for (i = 0; i < VARRAY_ACTIVE_SIZE (ops); i++)
*************** ccp_fold (tree stmt)
*** 862,868 ****
  	       == FUNCTION_DECL)
  	   && DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (rhs, 0), 0)))
      {
!       varray_type uses = use_ops (stmt);
        if (uses)
  	{
  	  tree *orig;
--- 866,872 ----
  	       == FUNCTION_DECL)
  	   && DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (rhs, 0), 0)))
      {
!       varray_type uses = use_ops (stmt_ann (stmt));
        if (uses)
  	{
  	  tree *orig;
*************** initialize (void)
*** 1077,1082 ****
--- 1081,1087 ----
      {
        block_stmt_iterator i;
        tree stmt;
+       stmt_ann_t ann;
        varray_type ops;
        size_t x;
        int vary;
*************** initialize (void)
*** 1087,1093 ****
  	  vary = 0;
  	  stmt = bsi_stmt (i);
  	  get_stmt_operands (stmt);
! 	  ops = def_ops (stmt);
  	  if (ops)
  	    for (x = 0; x < VARRAY_ACTIVE_SIZE (ops); x++)
  	      {
--- 1092,1099 ----
  	  vary = 0;
  	  stmt = bsi_stmt (i);
  	  get_stmt_operands (stmt);
! 	  ann = stmt_ann (stmt);
! 	  ops = def_ops (ann);
  	  if (ops)
  	    for (x = 0; x < VARRAY_ACTIVE_SIZE (ops); x++)
  	      {
*************** initialize (void)
*** 1098,1104 ****
  	  DONT_SIMULATE_AGAIN (stmt) = vary;
  
  	  /* Mark all VDEF operands VARYING.  */
! 	  ops = vdef_ops (stmt);
  	  if (ops)
  	    {
  	      for (x = 0; x < VARRAY_ACTIVE_SIZE (ops); x++)
--- 1104,1110 ----
  	  DONT_SIMULATE_AGAIN (stmt) = vary;
  
  	  /* Mark all VDEF operands VARYING.  */
! 	  ops = vdef_ops (ann);
  	  if (ops)
  	    {
  	      for (x = 0; x < VARRAY_ACTIVE_SIZE (ops); x++)
*************** add_var_to_ssa_edges_worklist (tree var)
*** 1255,1264 ****
      {
        tree use = immediate_use (df, i);
  
!       if (!DONT_SIMULATE_AGAIN (use) && stmt_ann (use)->in_ccp_worklist == 0)
  	{
! 	  stmt_ann (use)->in_ccp_worklist = 1;
! 	  VARRAY_PUSH_TREE (ssa_edges, use);
  	}
      }
  }
--- 1261,1274 ----
      {
        tree use = immediate_use (df, i);
  
!       if (!DONT_SIMULATE_AGAIN (use))
  	{
! 	  stmt_ann_t ann = stmt_ann (use);
! 	  if (ann->in_ccp_worklist == 0)
! 	    {
! 	      ann->in_ccp_worklist = 1;
! 	      VARRAY_PUSH_TREE (ssa_edges, use);
! 	    }
  	}
      }
  }
*************** replace_uses_in (tree stmt)
*** 1377,1383 ****
  
    get_stmt_operands (stmt);
  
!   uses = use_ops (stmt);
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use = VARRAY_TREE_PTR (uses, i);
--- 1387,1393 ----
  
    get_stmt_operands (stmt);
  
!   uses = use_ops (stmt_ann (stmt));
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use = VARRAY_TREE_PTR (uses, i);
*************** likely_value (tree stmt)
*** 1456,1462 ****
  
    get_stmt_operands (stmt);
  
!   uses = use_ops (stmt);
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use = VARRAY_TREE_PTR (uses, i);
--- 1466,1472 ----
  
    get_stmt_operands (stmt);
  
!   uses = use_ops (ann);
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use = VARRAY_TREE_PTR (uses, i);
Index: tree-ssa-copyprop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-copyprop.c,v
retrieving revision 1.1.2.15
diff -c -3 -p -r1.1.2.15 tree-ssa-copyprop.c
*** tree-ssa-copyprop.c	21 Sep 2003 22:14:27 -0000	1.1.2.15
--- tree-ssa-copyprop.c	10 Oct 2003 14:25:12 -0000
*************** copyprop_stmt (tree stmt)
*** 96,101 ****
--- 96,102 ----
  {
    varray_type uses;
    size_t i;
+   stmt_ann_t ann;
    bool modified;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
*************** copyprop_stmt (tree stmt)
*** 109,115 ****
    modified = false;
  
    /* Propagate real uses.  */
!   uses = use_ops (stmt);
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use_p = VARRAY_TREE_PTR (uses, i);
--- 110,117 ----
    modified = false;
  
    /* Propagate real uses.  */
!   ann = stmt_ann (stmt);
!   uses = use_ops (ann);
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
      {
        tree *use_p = VARRAY_TREE_PTR (uses, i);
*************** copyprop_stmt (tree stmt)
*** 126,132 ****
  	      fprintf (dump_file, "\n");
  	    }
  
! 	  propagate_copy (use_p, orig, stmt_ann (stmt)->scope);
  	  modified = true;
  	}
      }
--- 128,134 ----
  	      fprintf (dump_file, "\n");
  	    }
  
! 	  propagate_copy (use_p, orig, ann->scope);
  	  modified = true;
  	}
      }
Index: tree-ssa-dce.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dce.c,v
retrieving revision 1.1.2.57
diff -c -3 -p -r1.1.2.57 tree-ssa-dce.c
*** tree-ssa-dce.c	8 Oct 2003 23:35:08 -0000	1.1.2.57
--- tree-ssa-dce.c	10 Oct 2003 14:25:12 -0000
*************** static bool
*** 227,232 ****
--- 227,233 ----
  stmt_useful_p (tree stmt)
  {
    varray_type ops;
+   stmt_ann_t ann;
    size_t i;
  
    /* Instructions that are implicitly live.  Function calls, asm and return
*************** stmt_useful_p (tree stmt)
*** 276,292 ****
      return true;
  
    /* If the statement has volatile operands, it needs to be preserved.  */
!   if (stmt_ann (stmt)->has_volatile_ops)
      return true;
  
    get_stmt_operands (stmt);
  
!   ops = def_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      if (need_to_preserve_store (*(VARRAY_TREE_PTR (ops, i))))
        return true;
  
!   ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      if (need_to_preserve_store (VDEF_RESULT (VARRAY_TREE (ops, i))))
        return true;
--- 277,294 ----
      return true;
  
    /* If the statement has volatile operands, it needs to be preserved.  */
!   ann = stmt_ann (stmt);
!   if (ann->has_volatile_ops)
      return true;
  
    get_stmt_operands (stmt);
  
!   ops = def_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      if (need_to_preserve_store (*(VARRAY_TREE_PTR (ops, i))))
        return true;
  
!   ops = vdef_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      if (need_to_preserve_store (VDEF_RESULT (VARRAY_TREE (ops, i))))
        return true;
*************** process_worklist (void)
*** 342,359 ****
  	     Mark all the statements which feed this statement's uses as
  	     necessary.  */
  	  varray_type ops;
  	  size_t k;
  
  	  get_stmt_operands (i);
  
! 	  ops = use_ops (i);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree *use_p = VARRAY_TREE_PTR (ops, k);
  	      mark_necessary (SSA_NAME_DEF_STMT (*use_p));
  	    }
  
! 	  ops = vuse_ops (i);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree vuse = VARRAY_TREE (ops, k);
--- 344,363 ----
  	     Mark all the statements which feed this statement's uses as
  	     necessary.  */
  	  varray_type ops;
+ 	  stmt_ann_t ann;
  	  size_t k;
  
  	  get_stmt_operands (i);
+ 	  ann = stmt_ann (i);
  
! 	  ops = use_ops (ann);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree *use_p = VARRAY_TREE_PTR (ops, k);
  	      mark_necessary (SSA_NAME_DEF_STMT (*use_p));
  	    }
  
! 	  ops = vuse_ops (ann);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree vuse = VARRAY_TREE (ops, k);
*************** process_worklist (void)
*** 363,369 ****
  	  /* The operands of VDEF expressions are also needed as they
  	     represent potential definitions that may reach this
  	     statement (VDEF operands allow us to follow def-def links).  */
! 	  ops = vdef_ops (i);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree vdef = VARRAY_TREE (ops, k);
--- 367,373 ----
  	  /* The operands of VDEF expressions are also needed as they
  	     represent potential definitions that may reach this
  	     statement (VDEF operands allow us to follow def-def links).  */
! 	  ops = vdef_ops (ann);
  	  for (k = 0; ops && k < VARRAY_ACTIVE_SIZE (ops); k++)
  	    {
  	      tree vdef = VARRAY_TREE (ops, k);
Index: tree-ssa-dom.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-dom.c,v
retrieving revision 1.1.2.53
diff -c -3 -p -r1.1.2.53 tree-ssa-dom.c
*** tree-ssa-dom.c	1 Oct 2003 18:44:36 -0000	1.1.2.53
--- tree-ssa-dom.c	10 Oct 2003 14:25:16 -0000
*************** cprop_into_stmt (tree stmt)
*** 1356,1365 ****
    bool may_have_exposed_new_symbols;
    stmt_ann_t ann = stmt_ann (stmt);
  
!   defs = def_ops (stmt);
!   uses = use_ops (stmt);
!   vuses = vuse_ops (stmt);
!   vdefs = vdef_ops (stmt);
  
    /* Const/copy propagate into USES, VUSES and the RHS of VDEFs.  */
    operand_tables[0] = uses;
--- 1356,1365 ----
    bool may_have_exposed_new_symbols;
    stmt_ann_t ann = stmt_ann (stmt);
  
!   defs = def_ops (ann);
!   uses = use_ops (ann);
!   vuses = vuse_ops (ann);
!   vdefs = vdef_ops (ann);
  
    /* Const/copy propagate into USES, VUSES and the RHS of VDEFs.  */
    operand_tables[0] = uses;
*************** cprop_into_stmt (tree stmt)
*** 1437,1443 ****
  	      may_have_exposed_new_symbols = true;
  
  	    if (TREE_CODE (val) == SSA_NAME)
! 	      propagate_copy (op_p, val, stmt_ann (stmt)->scope);
  	    else
  	      *op_p = val;
  
--- 1437,1443 ----
  	      may_have_exposed_new_symbols = true;
  
  	    if (TREE_CODE (val) == SSA_NAME)
! 	      propagate_copy (op_p, val, ann->scope);
  	    else
  	      *op_p = val;
  
*************** optimize_stmt (block_stmt_iterator si, v
*** 1485,1492 ****
      return false;
  
    get_stmt_operands (stmt);
-   vdefs = vdef_ops (stmt);
    ann = stmt_ann (stmt);
    opt_stats.num_stmts++;
    may_have_exposed_new_symbols = false;
  
--- 1485,1492 ----
      return false;
  
    get_stmt_operands (stmt);
    ann = stmt_ann (stmt);
+   vdefs = vdef_ops (ann);
    opt_stats.num_stmts++;
    may_have_exposed_new_symbols = false;
  
*************** optimize_stmt (block_stmt_iterator si, v
*** 1606,1612 ****
  #endif
  
  	  if (TREE_CODE (cached_lhs) == SSA_NAME)
! 	    fixup_var_scope (cached_lhs, stmt_ann (stmt)->scope);
  	  else if (TREE_CODE (cached_lhs) == ADDR_EXPR
  		   || (POINTER_TYPE_P (TREE_TYPE (*expr_p))
  		       && is_unchanging_value (cached_lhs)))
--- 1606,1612 ----
  #endif
  
  	  if (TREE_CODE (cached_lhs) == SSA_NAME)
! 	    fixup_var_scope (cached_lhs, ann->scope);
  	  else if (TREE_CODE (cached_lhs) == ADDR_EXPR
  		   || (POINTER_TYPE_P (TREE_TYPE (*expr_p))
  		       && is_unchanging_value (cached_lhs)))
*************** avail_expr_hash (const void *p)
*** 2173,2179 ****
       because compound variables like arrays are not renamed in the
       operands.  Rather, the rename is done on the virtual variable
       representing all the elements of the array.  */
!   ops = vuse_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      val = iterative_hash_expr (VARRAY_TREE (ops, i), val);
  
--- 2173,2179 ----
       because compound variables like arrays are not renamed in the
       operands.  Rather, the rename is done on the virtual variable
       representing all the elements of the array.  */
!   ops = vuse_ops (stmt_ann (stmt));
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      val = iterative_hash_expr (VARRAY_TREE (ops, i), val);
  
*************** avail_expr_eq (const void *p1, const voi
*** 2214,2221 ****
  	      == TYPE_MAIN_VARIANT (TREE_TYPE (rhs2))))
        && operand_equal_p (rhs1, rhs2, 0))
      {
!       varray_type ops1 = vuse_ops (s1);
!       varray_type ops2 = vuse_ops (s2);
  
        if (ops1 == NULL && ops2 == NULL)
  	{
--- 2214,2221 ----
  	      == TYPE_MAIN_VARIANT (TREE_TYPE (rhs2))))
        && operand_equal_p (rhs1, rhs2, 0))
      {
!       varray_type ops1 = vuse_ops (stmt_ann (s1));
!       varray_type ops2 = vuse_ops (stmt_ann (s2));
  
        if (ops1 == NULL && ops2 == NULL)
  	{
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2262,2267 ****
--- 2262,2268 ----
    sbitmap vars_in_vops_to_rename;
    bool found_exposed_symbol = false;
    varray_type vdefs_before, vdefs_after;
+   stmt_ann_t ann;
    
    vars_in_vops_to_rename = sbitmap_alloc (num_referenced_vars);
    sbitmap_zero (vars_in_vops_to_rename);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2275,2281 ****
       We flag them in a separate bitmap because we don't really want to
       rename them if there are not any newly exposed symbols in the
       statement operands.  */
!   vdefs_before = ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
--- 2276,2283 ----
       We flag them in a separate bitmap because we don't really want to
       rename them if there are not any newly exposed symbols in the
       statement operands.  */
!   ann = stmt_ann (stmt);
!   vdefs_before = ops = vdef_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2284,2290 ****
        SET_BIT (vars_in_vops_to_rename, var_ann (var)->uid);
      }
  
!   ops = vuse_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VARRAY_TREE (ops, i);
--- 2286,2292 ----
        SET_BIT (vars_in_vops_to_rename, var_ann (var)->uid);
      }
  
!   ops = vuse_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VARRAY_TREE (ops, i);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2298,2304 ****
    modify_stmt (stmt);
    get_stmt_operands (stmt);
  
!   ops = def_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
--- 2300,2306 ----
    modify_stmt (stmt);
    get_stmt_operands (stmt);
  
!   ops = def_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2309,2315 ****
  	}
      }
  
!   ops = use_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
--- 2311,2317 ----
  	}
      }
  
!   ops = use_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree *var_p = VARRAY_TREE_PTR (ops, i);
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2320,2326 ****
  	}
      }
  
!   vdefs_after = ops = vdef_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
--- 2322,2328 ----
  	}
      }
  
!   vdefs_after = ops = vdef_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VDEF_RESULT (VARRAY_TREE (ops, i));
*************** mark_new_vars_to_rename (tree stmt, sbit
*** 2331,2337 ****
  	}
      }
  
!   ops = vuse_ops (stmt);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VARRAY_TREE (ops, i);
--- 2333,2339 ----
  	}
      }
  
!   ops = vuse_ops (ann);
    for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
      {
        tree var = VARRAY_TREE (ops, i);
Index: tree-ssa-live.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-live.c,v
retrieving revision 1.1.2.19
diff -c -3 -p -r1.1.2.19 tree-ssa-live.c
*** tree-ssa-live.c	25 Sep 2003 11:12:50 -0000	1.1.2.19
--- tree-ssa-live.c	10 Oct 2003 14:25:18 -0000
*************** create_ssa_var_map (void)
*** 319,324 ****
--- 319,325 ----
    basic_block bb;
    tree *dest, *use;
    tree stmt;
+   stmt_ann_t ann;
    varray_type ops;
    unsigned x;
    var_map map;
*************** create_ssa_var_map (void)
*** 343,351 ****
          {
  	  stmt = bsi_stmt (bsi);
  	  get_stmt_operands (stmt);
  
  	  /* Register USE and DEF operands in each statement.  */
! 	  ops = use_ops (stmt);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      use = VARRAY_TREE_PTR (ops, x);
--- 344,353 ----
          {
  	  stmt = bsi_stmt (bsi);
  	  get_stmt_operands (stmt);
+ 	  ann = stmt_ann (stmt);
  
  	  /* Register USE and DEF operands in each statement.  */
! 	  ops = use_ops (ann);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      use = VARRAY_TREE_PTR (ops, x);
*************** create_ssa_var_map (void)
*** 355,361 ****
  #endif
  	    }
  
! 	  ops = def_ops (stmt);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      dest = VARRAY_TREE_PTR (ops, x);
--- 357,363 ----
  #endif
  	    }
  
! 	  ops = def_ops (ann);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      dest = VARRAY_TREE_PTR (ops, x);
*************** create_ssa_var_map (void)
*** 368,374 ****
  	  /* While we do not care about virtual operands for
  	     out of SSA, we do need to look at them to make sure
  	     we mark all the variables which are used.  */
! 	  ops = vuse_ops (stmt);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      tree var = VARRAY_TREE (ops, x);
--- 370,376 ----
  	  /* While we do not care about virtual operands for
  	     out of SSA, we do need to look at them to make sure
  	     we mark all the variables which are used.  */
! 	  ops = vuse_ops (ann);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      tree var = VARRAY_TREE (ops, x);
*************** create_ssa_var_map (void)
*** 378,384 ****
  #endif
  	    }
  
! 	  ops = vdef_ops (stmt);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      tree var = VDEF_OP (VARRAY_TREE (ops, x));
--- 380,386 ----
  #endif
  	    }
  
! 	  ops = vdef_ops (ann);
  	  for (x = 0; ops && x < VARRAY_ACTIVE_SIZE (ops); x++)
  	    {
  	      tree var = VDEF_OP (VARRAY_TREE (ops, x));
*************** calculate_live_on_entry (var_map map)
*** 535,540 ****
--- 537,543 ----
    varray_type stack;
    block_stmt_iterator bsi;
    varray_type ops;
+   stmt_ann_t ann;
  
    saw_def = sbitmap_alloc (num_var_partitions (map));
  
*************** calculate_live_on_entry (var_map map)
*** 579,586 ****
          {
  	  stmt = bsi_stmt (bsi);
  	  get_stmt_operands (stmt);
  
! 	  ops = use_ops (stmt);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
--- 582,590 ----
          {
  	  stmt = bsi_stmt (bsi);
  	  get_stmt_operands (stmt);
+ 	  ann = stmt_ann (stmt);
  
! 	  ops = use_ops (ann);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
*************** calculate_live_on_entry (var_map map)
*** 588,594 ****
  	      add_livein_if_notdef (live, saw_def, *vec, bb);
  	    }
  
! 	  ops = vuse_ops (stmt);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
--- 592,598 ----
  	      add_livein_if_notdef (live, saw_def, *vec, bb);
  	    }
  
! 	  ops = vuse_ops (ann);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
*************** calculate_live_on_entry (var_map map)
*** 596,602 ****
  	      add_livein_if_notdef (live, saw_def, var, bb);
  	    }
  
! 	  ops = vdef_ops (stmt);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
--- 600,606 ----
  	      add_livein_if_notdef (live, saw_def, var, bb);
  	    }
  
! 	  ops = vdef_ops (ann);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
*************** calculate_live_on_entry (var_map map)
*** 604,610 ****
  	      add_livein_if_notdef (live, saw_def, var, bb);
  	    }
  
! 	  ops = def_ops (stmt);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
--- 608,614 ----
  	      add_livein_if_notdef (live, saw_def, var, bb);
  	    }
  
! 	  ops = def_ops (ann);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
*************** calculate_live_on_entry (var_map map)
*** 612,618 ****
  	      set_if_valid (map, saw_def, *vec);
  	    }
  
! 	  ops = vdef_ops (stmt);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
--- 616,622 ----
  	      set_if_valid (map, saw_def, *vec);
  	    }
  
! 	  ops = vdef_ops (ann);
  	  num = (ops ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	  for (i = 0; i < num; i++)
  	    {
*************** build_tree_conflict_graph (tree_live_inf
*** 1288,1293 ****
--- 1292,1298 ----
    int num, x, y, i;
    basic_block bb;
    varray_type stmt_stack, ops;
+   stmt_ann_t ann;
    tree stmt, *var_p;
  
    map = live_var_map (liveinfo);
*************** build_tree_conflict_graph (tree_live_inf
*** 1308,1313 ****
--- 1313,1319 ----
  	  tree important_copy_rhs_partition = NULL_TREE;
  
  	  get_stmt_operands (stmt);
+ 	  ann = stmt_ann (stmt);
  
  	  /* Copies between 2 partitions do not introduce an interference 
  	     by itself.  If they did, you would never be able to coalesce 
*************** build_tree_conflict_graph (tree_live_inf
*** 1355,1361 ****
  
  	  if (!important_copy_rhs_partition)
  	    {
! 	      ops = def_ops (stmt);
  	      num = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	      for (x = 0; x < num; x++)
  		{
--- 1361,1367 ----
  
  	  if (!important_copy_rhs_partition)
  	    {
! 	      ops = def_ops (ann);
  	      num = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	      for (x = 0; x < num; x++)
  		{
*************** build_tree_conflict_graph (tree_live_inf
*** 1363,1369 ****
  		  add_conflicts_if_valid (tpa, graph, map, live, *var_p);
  		}
  
! 	      ops = use_ops (stmt);
  	      num = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	      for (x = 0; x < num; x++)
  		{
--- 1369,1375 ----
  		  add_conflicts_if_valid (tpa, graph, map, live, *var_p);
  		}
  
! 	      ops = use_ops (ann);
  	      num = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  	      for (x = 0; x < num; x++)
  		{
Index: tree-ssa-pre.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-pre.c,v
retrieving revision 1.1.4.88
diff -c -3 -p -r1.1.4.88 tree-ssa-pre.c
*** tree-ssa-pre.c	26 Sep 2003 16:27:25 -0000	1.1.4.88
--- tree-ssa-pre.c	10 Oct 2003 14:25:24 -0000
*************** maybe_find_rhs_use_for_var (tree def, tr
*** 440,446 ****
        return NULL_TREE;
      }
    get_stmt_operands (def);
!   uses = use_ops (def);
  
    if (!uses)
      return NULL_TREE;
--- 440,446 ----
        return NULL_TREE;
      }
    get_stmt_operands (def);
!   uses = use_ops (stmt_ann (def));
  
    if (!uses)
      return NULL_TREE;
*************** expr_phi_insertion (bitmap * dfs, struct
*** 726,732 ****
  	continue;
        occur = TREE_OPERAND (occur, 1);
        get_stmt_operands (occurp);
!       uses = use_ops (occurp);
        for (j = 0; j < VARRAY_ACTIVE_SIZE (uses); j ++)
  	{
  	  tree *usep = VARRAY_TREE_PTR (uses, j);
--- 726,732 ----
  	continue;
        occur = TREE_OPERAND (occur, 1);
        get_stmt_operands (occurp);
!       uses = use_ops (stmt_ann (occurp));
        for (j = 0; j < VARRAY_ACTIVE_SIZE (uses); j ++)
  	{
  	  tree *usep = VARRAY_TREE_PTR (uses, j);
*************** same_e_version_real_occ_real_occ (struct
*** 936,945 ****
  
    if (expr1val == expr2val)
      {
!       ops = vuse_ops (t1);
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr1val = iterative_hash_expr (VARRAY_TREE (ops, i), expr1val);
!       ops = vuse_ops (t2);
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr2val = iterative_hash_expr (VARRAY_TREE (ops, i), expr2val);
        if (expr1val != expr2val)
--- 936,945 ----
  
    if (expr1val == expr2val)
      {
!       ops = vuse_ops (stmt_ann (t1));
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr1val = iterative_hash_expr (VARRAY_TREE (ops, i), expr1val);
!       ops = vuse_ops (stmt_ann (t2));
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr2val = iterative_hash_expr (VARRAY_TREE (ops, i), expr2val);
        if (expr1val != expr2val)
*************** static void
*** 1016,1022 ****
  generate_expr_as_of_bb (struct expr_info *ei ATTRIBUTE_UNUSED, tree expr,
  			int j, basic_block bb)
  {
!   varray_type uses = use_ops (expr);
    size_t k = 0;
    if (!uses)
      return;
--- 1016,1022 ----
  generate_expr_as_of_bb (struct expr_info *ei ATTRIBUTE_UNUSED, tree expr,
  			int j, basic_block bb)
  {
!   varray_type uses = use_ops (stmt_ann (expr));
    size_t k = 0;
    if (!uses)
      return;
*************** bool load_modified_real_occ_real_occ (tr
*** 1098,1107 ****
  
    if (expr1val == expr2val)
      {
!       ops = vuse_ops (def);
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr1val = iterative_hash_expr (VARRAY_TREE (ops, i), expr1val);
!       ops = vuse_ops (use);
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr2val = iterative_hash_expr (VARRAY_TREE (ops, i), expr2val);
        if (expr1val != expr2val)
--- 1098,1107 ----
  
    if (expr1val == expr2val)
      {
!       ops = vuse_ops (stmt_ann (def));
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr1val = iterative_hash_expr (VARRAY_TREE (ops, i), expr1val);
!       ops = vuse_ops (stmt_ann (use));
        for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
          expr2val = iterative_hash_expr (VARRAY_TREE (ops, i), expr2val);
        if (expr1val != expr2val)
*************** bool same_e_version_phi_result (struct e
*** 1134,1140 ****
  {
    bool not_mod = true;
    size_t i;
!   varray_type cruses = use_ops (cr);
    if (!cruses)
      return false;
    for (i = 0; i < VARRAY_ACTIVE_SIZE (cruses); i++)
--- 1134,1140 ----
  {
    bool not_mod = true;
    size_t i;
!   varray_type cruses = use_ops (stmt_ann (cr));
    if (!cruses)
      return false;
    for (i = 0; i < VARRAY_ACTIVE_SIZE (cruses); i++)
*************** get_default_def (tree var, htab_t seen)
*** 1599,1606 ****
  	  }
      }
  
! 
!   defs = def_ops (defstmt);
    for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
      {
        tree *def_p = VARRAY_TREE_PTR (defs, i);
--- 1599,1605 ----
  	  }
      }
  
!   defs = def_ops (stmt_ann (defstmt));
    for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
      {
        tree *def_p = VARRAY_TREE_PTR (defs, i);
*************** reaching_def (tree var, tree currstmt, b
*** 1650,1656 ****
  	break;
  
        get_stmt_operands (bsi_stmt (bsi));
!       defs = def_ops (bsi_stmt (bsi));
        for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
  	{
  	  def = VARRAY_TREE_PTR (defs, i);
--- 1649,1655 ----
  	break;
  
        get_stmt_operands (bsi_stmt (bsi));
!       defs = def_ops (stmt_ann (bsi_stmt (bsi)));
        for (i = 0; defs && i < VARRAY_ACTIVE_SIZE (defs); i++)
  	{
  	  def = VARRAY_TREE_PTR (defs, i);
*************** tree_perform_ssapre (tree fndecl, enum t
*** 2933,2942 ****
  	struct expr_info *slot = NULL;
  
  	get_stmt_operands (expr);
- 	if (use_ops (expr) == NULL)
- 	  continue;
- 
  	ann = stmt_ann (expr);
  
  	if (TREE_CODE (expr) == MODIFY_EXPR)
  	  expr = TREE_OPERAND (expr, 1);
--- 2932,2940 ----
  	struct expr_info *slot = NULL;
  
  	get_stmt_operands (expr);
  	ann = stmt_ann (expr);
+ 	if (use_ops (ann) == NULL)
+ 	  continue;
  
  	if (TREE_CODE (expr) == MODIFY_EXPR)
  	  expr = TREE_OPERAND (expr, 1);
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.131
diff -c -3 -p -r1.1.4.131 tree-ssa.c
*** tree-ssa.c	3 Oct 2003 11:52:49 -0000	1.1.4.131
--- tree-ssa.c	10 Oct 2003 14:25:27 -0000
*************** mark_def_sites (sbitmap globals)
*** 512,524 ****
  	  varray_type ops;
  	  size_t i, uid;
  	  tree stmt;
  
  	  stmt = bsi_stmt (si);
  	  get_stmt_operands (stmt);
  
  	  /* If a variable is used before being set, then the variable
  	     is live across a block boundary, so add it to NONLOCAL_VARS.  */
! 	  ops = use_ops (stmt);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *use_p = VARRAY_TREE_PTR (ops, i);
--- 512,526 ----
  	  varray_type ops;
  	  size_t i, uid;
  	  tree stmt;
+ 	  stmt_ann_t ann;
  
  	  stmt = bsi_stmt (si);
  	  get_stmt_operands (stmt);
+ 	  ann = stmt_ann (stmt);
  
  	  /* If a variable is used before being set, then the variable
  	     is live across a block boundary, so add it to NONLOCAL_VARS.  */
! 	  ops = use_ops (ann);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *use_p = VARRAY_TREE_PTR (ops, i);
*************** mark_def_sites (sbitmap globals)
*** 532,538 ****
  	    }
  	  
  	  /* Similarly for virtual uses.  */
! 	  ops = vuse_ops (stmt);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *use_p = &VARRAY_TREE (ops, i);
--- 534,540 ----
  	    }
  	  
  	  /* Similarly for virtual uses.  */
! 	  ops = vuse_ops (ann);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *use_p = &VARRAY_TREE (ops, i);
*************** mark_def_sites (sbitmap globals)
*** 550,556 ****
  	     definition of the variable.  However, the operand of a virtual
  	     definitions is a use of the variable, so it may affect
  	     GLOBALS.  */
! 	  ops = vdef_ops (stmt);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree vdef = VARRAY_TREE (ops, i);
--- 552,558 ----
  	     definition of the variable.  However, the operand of a virtual
  	     definitions is a use of the variable, so it may affect
  	     GLOBALS.  */
! 	  ops = vdef_ops (ann);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree vdef = VARRAY_TREE (ops, i);
*************** mark_def_sites (sbitmap globals)
*** 569,575 ****
  	    }
  
  	  /* Now process the definition made by this statement.  */
! 	  ops = def_ops (stmt);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *def_p = VARRAY_TREE_PTR (ops, i);
--- 571,577 ----
  	    }
  
  	  /* Now process the definition made by this statement.  */
! 	  ops = def_ops (ann);
  	  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
  	    {
  	      tree *def_p = VARRAY_TREE_PTR (ops, i);
*************** rewrite_out_of_ssa (tree fndecl, enum tr
*** 1663,1676 ****
  	  tree stmt = bsi_stmt (si);
  	  tree *use_p = NULL;
  	  int remove = 0, is_copy = 0;
  
  	  get_stmt_operands (stmt);
  
  	  if (TREE_CODE (stmt) == MODIFY_EXPR 
  	      && (TREE_CODE (TREE_OPERAND (stmt, 1)) == SSA_NAME))
  	    is_copy = 1;
  
! 	  ops = use_ops (stmt);
  	  num_uses = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  
  	  for (i = 0; i < num_uses; i++)
--- 1665,1680 ----
  	  tree stmt = bsi_stmt (si);
  	  tree *use_p = NULL;
  	  int remove = 0, is_copy = 0;
+ 	  stmt_ann_t ann;
  
  	  get_stmt_operands (stmt);
+ 	  ann = stmt_ann (stmt);
  
  	  if (TREE_CODE (stmt) == MODIFY_EXPR 
  	      && (TREE_CODE (TREE_OPERAND (stmt, 1)) == SSA_NAME))
  	    is_copy = 1;
  
! 	  ops = use_ops (ann);
  	  num_uses = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  
  	  for (i = 0; i < num_uses; i++)
*************** rewrite_out_of_ssa (tree fndecl, enum tr
*** 1679,1685 ****
  	      replace_variable (map, use_p);
  	    }
  
! 	  ops = def_ops (stmt);
  	  num_defs = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  
  	  for (i = 0; i < num_defs; i++)
--- 1683,1689 ----
  	      replace_variable (map, use_p);
  	    }
  
! 	  ops = def_ops (ann);
  	  num_defs = ((ops) ? VARRAY_ACTIVE_SIZE (ops) : 0);
  
  	  for (i = 0; i < num_defs; i++)
*************** rewrite_stmt (block_stmt_iterator si, va
*** 2005,2017 ****
      abort ();
  #endif
  
!   /* FIXME: Must change the interface to statement annotations.  Helpers
! 	    should receive the annotation, not the statement.  Otherwise,
! 	    we call stmt_ann() more than necessary.  */
!   defs = def_ops (stmt);
!   uses = use_ops (stmt);
!   vuses = vuse_ops (stmt);
!   vdefs = vdef_ops (stmt);
  
    /* Step 1.  Rewrite USES and VUSES in the statement.  */
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)
--- 2009,2018 ----
      abort ();
  #endif
  
!   defs = def_ops (ann);
!   uses = use_ops (ann);
!   vuses = vuse_ops (ann);
!   vdefs = vdef_ops (ann);
  
    /* Step 1.  Rewrite USES and VUSES in the statement.  */
    for (i = 0; uses && i < VARRAY_ACTIVE_SIZE (uses); i++)

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