[PATCH][alias-improvements] Make the VUSE/VDEF real operands. Remove all virtual operands infrastructure.

Richard Guenther rguenther@suse.de
Mon Jan 19 14:55:00 GMT 2009


This makes the remaining VUSE/VDEF use the ssa operand infrastructure.
The ops itself are now members in the 
gimple_statement_with_memory_ops_base structure.  The ssa operands for
them are chained in the normal ssa use and def lists (but always as
first operand, if they are available).  This makes the SSA operand
iterators very much simpler (and also less powerful - we no longer
support iterating over VUSEs but not USEs, likewise for defs - but
this doesn't make sense anymore anyway).

The bulk of this patch is code-removal and 1:1 translation of old
ZERO_SSA_OPERANDS / NUM_SSA_OPERANDS invocations on virtual ops
to the use of gimple_vdef () / gimple_vuse ().

The meat of the changes are top of the changelog and top of the patch.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the
branch.

Richard.

2009-01-19  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (struct vuse_element_d): Remove.
	(struct vuse_vec_d): Likewise.
	(VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC,
	VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR,
	SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR,
	VUSE_ELEMENT_VAR): Likewise.
	(struct voptype_d): Likewise.
	(NUM_VOP_FREE_BUCKETS): Likewise.
	(struct ssa_operands): Remove vop_free_buckets member.
	(struct stmt_operands_d): Remove.
	(VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT,
	VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP,
	VDEF_NUM, VDEF_VECT): Likewise.
	(copy_virtual_operands): Remove.
	(operand_build_cmp): Likewise.
	(create_ssa_artificial_load_stmt): Likewise.
	(enum ssa_op_iter_type): Remove ssa_op_iter_vdef.
	(struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm
	vuse_index and mayuse_index members.  Pack and move done and iter_type
	members to the front.
	(SSA_OP_VMAYUSE): Remove.
	(SSA_OP_VIRTUAL_USES): Adjust.
	(FOR_EACH_SSA_VDEF_OPERAND): Remove.
	* tree-flow-inline.h (op_iter_next_use): Remove vuses and mayuses
	cases.
	(op_iter_next_def): Remove vdefs case.
	(op_iter_next_tree): Remove vuses, mayuses and vdefs cases.
	(clear_and_done_ssa_iter): Do not set removed fields.
	(op_iter_init): Likewise.  Skip vuse and/or vdef if requested.
	Assert we are not iterating over vuses or vdefs if not also
	iterating over uses or defs.
	(op_iter_init_use): Likewise.
	(op_iter_init_def): Likewise.
	(op_iter_next_vdef): Remove.
	(op_iter_next_mustdef): Likewise.
	(op_iter_init_vdef): Likewise.
	(compare_ssa_operands_equal): Likewise.
	(link_use_stmts_after): Handle vuse operand.
	* tree-flow.h (struct var_ann_d): Remove in_vuse_list and
	in_vdef_list members.
	* gimple.h (struct gimple_statement_with_memory_ops_base): Remove
	vdef_ops and vuse_ops members, add vuse and vdef members.
	(gimple_vuse_ops): Remove.
	(gimple_set_vuse_ops): Likewise.
	(gimple_vdef_ops): Likewise.
	(gimple_set_vdef_ops): Likewise.
	(gimple_vuse_op): New.
	(gimple_vdef_op): Likewise.
	(gimple_vuse): Simplify
	(gimple_vdef): Likewise.
	(gimple_vuse_ptr): New.
	(gimple_vdef_ptr): Likewise.
	(gimple_set_vuse): Likewise.
	(gimple_set_vdef): Likewise.
	* tree-ssa-operands.c (build_vdefs): Rename to ...
	(build_vdef): ... this.  Make it a tree.
	(build_vuses): Rename to ...
	(build_vuse): ... this.  Make it a tree.
	(operand_build_cmp): Remove.
	(operand_build_sort_virtual): Likewise.
	(vop_free_bucket_size): Likewise.
	(vop_free_bucket_index): Likewise.
	(init_vop_buckets): Likewise.
	(add_vop_to_freelist): Likewise.
	(init_ssa_operands): Zero build_vuse, build_vdef.
	Do not call init_vop_buckets.
	(fini_ssa_operands): Zero build_vuse, build_vdef.
	(ssa_operand_alloc): Use struct use_optype_d for size computations.
	(alloc_vop): Remove.
	(add_vop): Likewise.
	(add_vuse_op): Likewise.
	(add_vdef_op): Likewise.
	(finalize_ssa_defs): Fold in finalize_ssa_vdefs.
	(finalize_ssa_uses): Fold in finalize_ssa_vuses.
	(finalize_ssa_vdefs): Remove.
	(finalize_ssa_vuse_ops): Likewise.
	(finalize_ssa_vuses): Likewise.
	(cleanup_build_arrays): Do not clear in_vdef_list or in_vuse_list
	flags.  Zero build_vuse, build_vdef.
	(finalize_ssa_stmt_operands): Do not call finalize_ssa_vdefs
	or finalize_ssa_vuses.
	(start_ssa_stmt_operands): Assert build_vuse, build_vdef are NULL.
	(append_vdef): Assert we do not have different VOPs, add a VUSE.
	(append_vuse): Assert we do not have different VOPs.
	(build_ssa_operands): Do not sort virtual operands.
	(free_stmt_operands): Do not free virtual uses/defs.  Zero
	the VUSE and VDEF operands.
	(copy_virtual_operands): Remove.
	(create_ssa_artificial_load_stmt): Likewise.
	(push_stmt_changes): Adjust.
	(pop_stmt_changes): Likewise.

	* tree-vrp.c (stmt_interesting_for_vrp): Adjust.
	(vrp_visit_stmt): Likewise.
	* tree-into-ssa.c (rewrite_update_stmt): Adjust.
	* tree-ssa-loop-im.c (movement_possibility): Adjust.
	(determine_max_movement): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-complex.c (update_all_vops): Remove.
	(expand_complex_move): Adjust.
	* tree-loop-distribution.c (generate_memset_zero): Adjust.
	(rdg_flag_uses): Likewise.
	* tree-ssa-dse.c (dse_optimize_stmt): Adjust.
	* tree-ssa-ccp.c (surely_varying_stmt_p): Adjust.
	(gimplify_and_update_call_from_tree): Likewise.
	* tree-ssa-dom.c (eliminate_redundant_computations): Adjust.
	(record_equivalences_from_stmt): Likewise.
	(avail_expr_hash): Likewise.
	(avail_expr_eq): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Adjust.
	(stmt_makes_single_load): Likewise.
	(stmt_makes_single_store): Likewise.
	* tree-ssa-sink.c (is_hidden_global_store): Adjust.
	(statement_sink_location): Likewise.
	* tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust.
	* tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust.
	* gimple-pretty-print.c (dump_gimple_mem_ops): Adjust.
	* tree-data-ref.c (get_references_in_stmt): Adjust.
	(stores_from_loop): Likewise.
	* tree-vect-analyze.c (vect_stmt_relevant_p): Adjust.
	* tree-ssa-coalesce.c (create_outofssa_var_map): Adjust.
	* tree-dfa.c (collect_dfa_stats): Adjust.
	* graphite.c (rename_variables_in_stmt): Adjust.
	(graphite_copy_stmts_from_block): Likewise.
	(translate_clast): Likewise.
	* tree-sra.c (mark_all_v_defs_stmt): Remove.
	(mark_all_v_defs_seq): Adjust.
	(sra_replace): Likewise.
	(scalarize_use): Likewise.
	(scalarize_copy): Likewise.
	(scalarize_init): Likewise.
	(scalarize_ldst): Likewise.
	* tree-predcom.c (mark_virtual_ops_for_renaming): Adjust.
	(mark_virtual_ops_for_renaming_list): Remove.
	(initialize_root_vars): Adjust.
	(initialize_root_vars_lm): Likewise.
	(prepare_initializers_chain): Likewise.
	* tree-ssa-copy.c (propagate_tree_value_into_stmt): Adjust.
	(stmt_may_generate_copy): Likewise.
	* tree-ssa-ter.c (is_replaceable_p): Adjust.
	(process_replaceable): Likewise.
	(find_replaceable_in_bb): Likewise.
	* tree-ssa.c (verify_ssa): Verify new VUSE / VDEF properties.
	(delete_tree_ssa): Clear the VUSE, VDEF operands.
	(warn_uninitialized_var): Adjust.
	* tree-ssa-loop-prefetch.c (gather_memory_references): Adjust.
	* lambda-code.c (can_put_in_inner_loop): Adjust.
	(can_put_after_inner_loop): Likewise.
	(perfect_nestify): Likewise.
	* tree-ssa-phiprop.c (phivn_valid_p): Adjust.
	(propagate_with_phi): Likewise.
	* tree-vect-transform.c (vectorizable_call): Adjust.
	(vect_gen_widened_results_half): Likewise.
	(vectorizable_conversion): Likewise.
	(vect_create_mask_and_perm): Likewise.
	(vectorizable_load): Likewise.
	* gimple.c (gimple_copy): Also copy virtual operands.
	* tree-cfg.c (gimple_duplicate_bb): Adjust.
	* tree-ssa-reassoc.c (get_rank): Adjust.

Index: gcc/tree-ssa-operands.h
===================================================================
*** gcc/tree-ssa-operands.h.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-operands.h	2009-01-19 14:30:25.000000000 +0100
*************** struct use_optype_d
*** 49,111 ****
  };
  typedef struct use_optype_d *use_optype_p;
  
- typedef struct vuse_element_d
- {
-   tree use_var;
-   struct ssa_use_operand_d use_ptr;
- } vuse_element_t;
- 
- typedef struct vuse_vec_d
- {
-   unsigned int num_vuse;
-   vuse_element_t uses[1];
- } vuse_vec_t;
- typedef struct vuse_vec_d *vuse_vec_p;
- 
- #define VUSE_VECT_NUM_ELEM(V)		(V).num_vuse
- #define VUSE_VECT_ELEMENT_NC(V,X)	(V).uses[(X)]
- #define VUSE_ELEMENT_PTR_NC(V,X)	(&(VUSE_VECT_ELEMENT_NC ((V),(X)).use_ptr))
- #define VUSE_ELEMENT_VAR_NC(V,X)	(VUSE_VECT_ELEMENT_NC ((V),(X)).use_var)
- 
- #ifdef ENABLE_CHECKING
- #define VUSE_VECT_ELEMENT(V,X)						\
-     (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),	\
-      VUSE_VECT_ELEMENT_NC (V,X))
- 
- #define VUSE_ELEMENT_PTR(V,X)						\
-     (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),	\
-      VUSE_ELEMENT_PTR_NC (V, X))
- 
- #define SET_VUSE_VECT_ELEMENT(V,X,N)					\
-     (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),	\
-      VUSE_VECT_ELEMENT_NC (V,X) = (N))
- 
- #define SET_VUSE_ELEMENT_VAR(V,X,N)					\
-     (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),	\
-      VUSE_VECT_ELEMENT_NC ((V),(X)).use_var = (N))
- 
- #define SET_VUSE_ELEMENT_PTR(V,X,N)					\
-     (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),	\
-      VUSE_ELEMENT_PTR_NC (V, X) = (N))
- #else
- #define VUSE_VECT_ELEMENT(V,X) VUSE_VECT_ELEMENT_NC(V,X)
- #define VUSE_ELEMENT_PTR(V,X) VUSE_ELEMENT_PTR_NC(V,X)
- #define SET_VUSE_VECT_ELEMENT(V,X,N) VUSE_VECT_ELEMENT_NC(V,X) = (N)
- #define SET_VUSE_ELEMENT_PTR(V,X,N) VUSE_ELEMENT_PTR_NC(V,X) = (N)
- #define SET_VUSE_ELEMENT_VAR(V,X,N) VUSE_VECT_ELEMENT_NC ((V),(X)).use_var = (N)
- #endif
- 
- #define VUSE_ELEMENT_VAR(V,X)	(VUSE_VECT_ELEMENT ((V),(X)).use_var)
- 
- /* This represents the virtual ops of a stmt.  */
- struct voptype_d
- {
-   struct voptype_d *next;
-   tree def_var;
-   vuse_vec_t usev;
- };
- typedef struct voptype_d *voptype_p;
- 
  /* This structure represents a variable sized buffer which is allocated by the
     operand memory manager.  Operands are suballocated out of this block.  The
     MEM array varies in size.  */
--- 49,54 ----
*************** struct ssa_operand_memory_d GTY((chain_n
*** 116,124 ****
    char mem[1];
  };
  
- /* Number of different size free buckets for virtual operands.  */
- #define NUM_VOP_FREE_BUCKETS		29
- 
  /* Per-function operand caches.  */
  struct ssa_operands GTY(()) {
     struct ssa_operand_memory_d *operand_memory;
--- 59,64 ----
*************** struct ssa_operands GTY(()) {
*** 130,155 ****
  
     struct def_optype_d * GTY ((skip (""))) free_defs;
     struct use_optype_d * GTY ((skip (""))) free_uses;
-    struct voptype_d * GTY ((skip (""))) vop_free_buckets[NUM_VOP_FREE_BUCKETS];
  };
- 
- /* This represents the operand cache for a stmt.  */
- struct stmt_operands_d
- {
-   /* Statement operands.  */
-   struct def_optype_d * def_ops;
-   struct use_optype_d * use_ops;
-                                                                               
-   /* Virtual operands (VDEF, VUSE).  */
-   struct voptype_d * vdef_ops;
-   struct voptype_d * vuse_ops;
- 
-   /* Sets of memory symbols loaded and stored.  */
-   bitmap stores;
-   bitmap loads;
- };
-                                                                               
- typedef struct stmt_operands_d *stmt_operands_p;
                                                                                
  #define USE_FROM_PTR(PTR)	get_use_from_ptr (PTR)
  #define DEF_FROM_PTR(PTR)	get_def_from_ptr (PTR)
--- 70,76 ----
*************** typedef struct stmt_operands_d *stmt_ope
*** 164,183 ****
  #define DEF_OP_PTR(OP)		((OP)->def_ptr)
  #define DEF_OP(OP)		(DEF_FROM_PTR (DEF_OP_PTR (OP)))
  
- #define VUSE_OP_PTR(OP,X)	VUSE_ELEMENT_PTR ((OP)->usev, (X)) 
- #define VUSE_OP(OP,X)		VUSE_ELEMENT_VAR ((OP)->usev, (X))
- #define SET_VUSE_OP(OP,X,N)	SET_VUSE_ELEMENT_VAR ((OP)->usev, (X), (N))
- #define VUSE_NUM(OP)		VUSE_VECT_NUM_ELEM ((OP)->usev)
- #define VUSE_VECT(OP)		&((OP)->usev)
- 
- #define VDEF_RESULT_PTR(OP)	(&((OP)->def_var))
- #define VDEF_RESULT(OP)		((OP)->def_var)
- #define VDEF_OP_PTR(OP,X)	VUSE_OP_PTR (OP, X)
- #define VDEF_OP(OP,X)		VUSE_OP (OP, X)
- #define SET_VDEF_OP(OP,X,N)	SET_VUSE_OP (OP, X, N)
- #define VDEF_NUM(OP)		VUSE_VECT_NUM_ELEM ((OP)->usev)
- #define VDEF_VECT(OP)		&((OP)->usev)
- 
  #define PHI_RESULT_PTR(PHI)	gimple_phi_result_ptr (PHI)
  #define PHI_RESULT(PHI)		DEF_FROM_PTR (PHI_RESULT_PTR (PHI))
  #define SET_PHI_RESULT(PHI, V)	SET_DEF (PHI_RESULT_PTR (PHI), (V))
--- 85,90 ----
*************** extern void update_stmt_operands (gimple
*** 199,208 ****
  extern void free_stmt_operands (gimple);
  extern bool verify_imm_links (FILE *f, tree var);
  
- extern void copy_virtual_operands (gimple, gimple);
- extern int operand_build_cmp (const void *, const void *);
- extern void create_ssa_artificial_load_stmt (gimple, gimple, bool);
- 
  extern void dump_immediate_uses (FILE *file);
  extern void dump_immediate_uses_for (FILE *file, tree var);
  extern void debug_immediate_uses (void);
--- 106,111 ----
*************** enum ssa_op_iter_type {
*** 222,229 ****
    ssa_op_iter_none = 0,
    ssa_op_iter_tree,
    ssa_op_iter_use,
!   ssa_op_iter_def,
!   ssa_op_iter_vdef
  };
  
  /* This structure is used in the operand iterator loops.  It contains the 
--- 125,131 ----
    ssa_op_iter_none = 0,
    ssa_op_iter_tree,
    ssa_op_iter_use,
!   ssa_op_iter_def
  };
  
  /* This structure is used in the operand iterator loops.  It contains the 
*************** enum ssa_op_iter_type {
*** 233,250 ****
  
  typedef struct ssa_operand_iterator_d
  {
    def_optype_p defs;
    use_optype_p uses;
-   voptype_p vuses;
-   voptype_p vdefs;
-   voptype_p mayuses;
-   enum ssa_op_iter_type iter_type;
    int phi_i;
    int num_phi;
    gimple phi_stmt;
-   bool done;
-   unsigned int vuse_index;
-   unsigned int mayuse_index;
  } ssa_op_iter;
  
  /* These flags are used to determine which operands are returned during 
--- 135,147 ----
  
  typedef struct ssa_operand_iterator_d
  {
+   bool done;
+   enum ssa_op_iter_type iter_type;
    def_optype_p defs;
    use_optype_p uses;
    int phi_i;
    int num_phi;
    gimple phi_stmt;
  } ssa_op_iter;
  
  /* These flags are used to determine which operands are returned during 
*************** typedef struct ssa_operand_iterator_d
*** 252,262 ****
  #define SSA_OP_USE		0x01	/* Real USE operands.  */
  #define SSA_OP_DEF		0x02	/* Real DEF operands.  */
  #define SSA_OP_VUSE		0x04	/* VUSE operands.  */
! #define SSA_OP_VMAYUSE		0x08	/* USE portion of VDEFS.  */
! #define SSA_OP_VDEF		0x10	/* DEF portion of VDEFS.  */
  
  /* These are commonly grouped operand flags.  */
! #define SSA_OP_VIRTUAL_USES	(SSA_OP_VUSE | SSA_OP_VMAYUSE)
  #define SSA_OP_VIRTUAL_DEFS	(SSA_OP_VDEF)
  #define SSA_OP_ALL_VIRTUALS     (SSA_OP_VIRTUAL_USES | SSA_OP_VIRTUAL_DEFS)
  #define SSA_OP_ALL_USES		(SSA_OP_VIRTUAL_USES | SSA_OP_USE)
--- 149,158 ----
  #define SSA_OP_USE		0x01	/* Real USE operands.  */
  #define SSA_OP_DEF		0x02	/* Real DEF operands.  */
  #define SSA_OP_VUSE		0x04	/* VUSE operands.  */
! #define SSA_OP_VDEF		0x08	/* VDEF operands.  */
  
  /* These are commonly grouped operand flags.  */
! #define SSA_OP_VIRTUAL_USES	(SSA_OP_VUSE)
  #define SSA_OP_VIRTUAL_DEFS	(SSA_OP_VDEF)
  #define SSA_OP_ALL_VIRTUALS     (SSA_OP_VIRTUAL_USES | SSA_OP_VIRTUAL_DEFS)
  #define SSA_OP_ALL_USES		(SSA_OP_VIRTUAL_USES | SSA_OP_USE)
*************** typedef struct ssa_operand_iterator_d
*** 287,300 ****
         !op_iter_done (&(ITER));					\
         DEFVAR = op_iter_next_def (&(ITER)))
  
- /* This macro executes a loop over the VDEF operands of STMT.  The def
-    and use vector for each VDEF is returned in DEFVAR and USEVECT. 
-    ITER is an ssa_op_iter structure used to control the loop.  */
- #define FOR_EACH_SSA_VDEF_OPERAND(DEFVAR, USEVECT, STMT, ITER)	\
-   for (op_iter_init_vdef (&(ITER), STMT, &(USEVECT), &(DEFVAR));	\
-        !op_iter_done (&(ITER));					\
-        op_iter_next_vdef (&(USEVECT), &(DEFVAR), &(ITER)))
- 
  /* This macro will execute a loop over all the arguments of a PHI which
     match FLAGS.   A use_operand_p is always returned via USEVAR.  FLAGS
     can be either SSA_OP_USE or SSA_OP_VIRTUAL_USES or SSA_OP_ALL_USES.  */
--- 183,188 ----
Index: gcc/tree-flow-inline.h
===================================================================
*** gcc/tree-flow-inline.h.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-flow-inline.h	2009-01-19 14:30:25.000000000 +0100
*************** op_iter_next_use (ssa_op_iter *ptr)
*** 658,683 ****
        ptr->uses = ptr->uses->next;
        return use_p;
      }
-   if (ptr->vuses)
-     {
-       use_p = VUSE_OP_PTR (ptr->vuses, ptr->vuse_index);
-       if (++(ptr->vuse_index) >= VUSE_NUM (ptr->vuses))
-         {
- 	  ptr->vuse_index = 0;
- 	  ptr->vuses = ptr->vuses->next;
- 	}
-       return use_p;
-     }
-   if (ptr->mayuses)
-     {
-       use_p = VDEF_OP_PTR (ptr->mayuses, ptr->mayuse_index);
-       if (++(ptr->mayuse_index) >= VDEF_NUM (ptr->mayuses))
-         {
- 	  ptr->mayuse_index = 0;
- 	  ptr->mayuses = ptr->mayuses->next;
- 	}
-       return use_p;
-     }
    if (ptr->phi_i < ptr->num_phi)
      {
        return PHI_ARG_DEF_PTR (ptr->phi_stmt, (ptr->phi_i)++);
--- 658,663 ----
*************** op_iter_next_def (ssa_op_iter *ptr)
*** 700,711 ****
        ptr->defs = ptr->defs->next;
        return def_p;
      }
-   if (ptr->vdefs)
-     {
-       def_p = VDEF_RESULT_PTR (ptr->vdefs);
-       ptr->vdefs = ptr->vdefs->next;
-       return def_p;
-     }
    ptr->done = true;
    return NULL_DEF_OPERAND_P;
  }
--- 680,685 ----
*************** op_iter_next_tree (ssa_op_iter *ptr)
*** 724,761 ****
        ptr->uses = ptr->uses->next;
        return val;
      }
-   if (ptr->vuses)
-     {
-       val = VUSE_OP (ptr->vuses, ptr->vuse_index);
-       if (++(ptr->vuse_index) >= VUSE_NUM (ptr->vuses))
-         {
- 	  ptr->vuse_index = 0;
- 	  ptr->vuses = ptr->vuses->next;
- 	}
-       return val;
-     }
-   if (ptr->mayuses)
-     {
-       val = VDEF_OP (ptr->mayuses, ptr->mayuse_index);
-       if (++(ptr->mayuse_index) >= VDEF_NUM (ptr->mayuses))
-         {
- 	  ptr->mayuse_index = 0;
- 	  ptr->mayuses = ptr->mayuses->next;
- 	}
-       return val;
-     }
    if (ptr->defs)
      {
        val = DEF_OP (ptr->defs);
        ptr->defs = ptr->defs->next;
        return val;
      }
-   if (ptr->vdefs)
-     {
-       val = VDEF_RESULT (ptr->vdefs);
-       ptr->vdefs = ptr->vdefs->next;
-       return val;
-     }
  
    ptr->done = true;
    return NULL_TREE;
--- 698,709 ----
*************** clear_and_done_ssa_iter (ssa_op_iter *pt
*** 772,805 ****
  {
    ptr->defs = NULL;
    ptr->uses = NULL;
-   ptr->vuses = NULL;
-   ptr->vdefs = NULL;
-   ptr->mayuses = NULL;
    ptr->iter_type = ssa_op_iter_none;
    ptr->phi_i = 0;
    ptr->num_phi = 0;
    ptr->phi_stmt = NULL;
    ptr->done = true;
-   ptr->vuse_index = 0;
-   ptr->mayuse_index = 0;
  }
  
  /* Initialize the iterator PTR to the virtual defs in STMT.  */
  static inline void
  op_iter_init (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   ptr->defs = (flags & SSA_OP_DEF) ? gimple_def_ops (stmt) : NULL;
!   ptr->uses = (flags & SSA_OP_USE) ? gimple_use_ops (stmt) : NULL;
!   ptr->vuses = (flags & SSA_OP_VUSE) ? gimple_vuse_ops (stmt) : NULL;
!   ptr->vdefs = (flags & SSA_OP_VDEF) ? gimple_vdef_ops (stmt) : NULL;
!   ptr->mayuses = (flags & SSA_OP_VMAYUSE) ? gimple_vdef_ops (stmt) : NULL;
    ptr->done = false;
  
    ptr->phi_i = 0;
    ptr->num_phi = 0;
    ptr->phi_stmt = NULL;
-   ptr->vuse_index = 0;
-   ptr->mayuse_index = 0;
  }
  
  /* Initialize iterator PTR to the use operands in STMT based on FLAGS. Return
--- 720,755 ----
  {
    ptr->defs = NULL;
    ptr->uses = NULL;
    ptr->iter_type = ssa_op_iter_none;
    ptr->phi_i = 0;
    ptr->num_phi = 0;
    ptr->phi_stmt = NULL;
    ptr->done = true;
  }
  
  /* Initialize the iterator PTR to the virtual defs in STMT.  */
  static inline void
  op_iter_init (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   /* We do not support iterating over virtual defs or uses without
!      iterating over defs or uses at the same time.  */
!   gcc_assert ((!(flags & SSA_OP_VDEF) || (flags & SSA_OP_DEF))
! 	      && (!(flags & SSA_OP_VUSE) || (flags & SSA_OP_USE)));
!   ptr->defs = (flags & (SSA_OP_DEF|SSA_OP_VDEF)) ? gimple_def_ops (stmt) : NULL;
!   if (!(flags & SSA_OP_VDEF)
!       && ptr->defs
!       && gimple_vdef (stmt) != NULL_TREE)
!     ptr->defs = ptr->defs->next;
!   ptr->uses = (flags & (SSA_OP_USE|SSA_OP_VUSE)) ? gimple_use_ops (stmt) : NULL;
!   if (!(flags & SSA_OP_VUSE)
!       && ptr->uses
!       && gimple_vuse (stmt) != NULL_TREE)
!     ptr->uses = ptr->uses->next;
    ptr->done = false;
  
    ptr->phi_i = 0;
    ptr->num_phi = 0;
    ptr->phi_stmt = NULL;
  }
  
  /* Initialize iterator PTR to the use operands in STMT based on FLAGS. Return
*************** op_iter_init (ssa_op_iter *ptr, gimple s
*** 807,813 ****
  static inline use_operand_p
  op_iter_init_use (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   gcc_assert ((flags & SSA_OP_ALL_DEFS) == 0);
    op_iter_init (ptr, stmt, flags);
    ptr->iter_type = ssa_op_iter_use;
    return op_iter_next_use (ptr);
--- 757,764 ----
  static inline use_operand_p
  op_iter_init_use (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   gcc_assert ((flags & SSA_OP_ALL_DEFS) == 0
! 	      && (flags & SSA_OP_USE));
    op_iter_init (ptr, stmt, flags);
    ptr->iter_type = ssa_op_iter_use;
    return op_iter_next_use (ptr);
*************** op_iter_init_use (ssa_op_iter *ptr, gimp
*** 818,824 ****
  static inline def_operand_p
  op_iter_init_def (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   gcc_assert ((flags & SSA_OP_ALL_USES) == 0);
    op_iter_init (ptr, stmt, flags);
    ptr->iter_type = ssa_op_iter_def;
    return op_iter_next_def (ptr);
--- 769,776 ----
  static inline def_operand_p
  op_iter_init_def (ssa_op_iter *ptr, gimple stmt, int flags)
  {
!   gcc_assert ((flags & SSA_OP_ALL_USES) == 0
! 	      && (flags & SSA_OP_DEF));
    op_iter_init (ptr, stmt, flags);
    ptr->iter_type = ssa_op_iter_def;
    return op_iter_next_def (ptr);
*************** op_iter_init_tree (ssa_op_iter *ptr, gim
*** 834,891 ****
    return op_iter_next_tree (ptr);
  }
  
- /* Get the next iterator mustdef value for PTR, returning the mustdef values in
-    KILL and DEF.  */
- static inline void
- op_iter_next_vdef (vuse_vec_p *use, def_operand_p *def, 
- 			 ssa_op_iter *ptr)
- {
- #ifdef ENABLE_CHECKING
-   gcc_assert (ptr->iter_type == ssa_op_iter_vdef);
- #endif
-   if (ptr->mayuses)
-     {
-       *def = VDEF_RESULT_PTR (ptr->mayuses);
-       *use = VDEF_VECT (ptr->mayuses);
-       ptr->mayuses = ptr->mayuses->next;
-       return;
-     }
- 
-   *def = NULL_DEF_OPERAND_P;
-   *use = NULL;
-   ptr->done = true;
-   return;
- }
- 
- 
- static inline void
- op_iter_next_mustdef (use_operand_p *use, def_operand_p *def, 
- 			 ssa_op_iter *ptr)
- {
-   vuse_vec_p vp;
-   op_iter_next_vdef (&vp, def, ptr);
-   if (vp != NULL)
-     {
-       gcc_assert (VUSE_VECT_NUM_ELEM (*vp) == 1);
-       *use = VUSE_ELEMENT_PTR (*vp, 0);
-     }
-   else
-     *use = NULL_USE_OPERAND_P;
- }
- 
- /* Initialize iterator PTR to the operands in STMT.  Return the first operands
-    in USE and DEF.  */
- static inline void
- op_iter_init_vdef (ssa_op_iter *ptr, gimple stmt, vuse_vec_p *use, 
- 		     def_operand_p *def)
- {
-   gcc_assert (gimple_code (stmt) != GIMPLE_PHI);
- 
-   op_iter_init (ptr, stmt, SSA_OP_VMAYUSE);
-   ptr->iter_type = ssa_op_iter_vdef;
-   op_iter_next_vdef (use, def, ptr);
- }
- 
  
  /* If there is a single operand in STMT matching FLAGS, return it.  Otherwise
     return NULL.  */
--- 786,791 ----
*************** delink_stmt_imm_use (gimple stmt)
*** 981,1032 ****
  }
  
  
- /* This routine will compare all the operands matching FLAGS in STMT1 to those
-    in STMT2.  TRUE is returned if they are the same.  STMTs can be NULL.  */
- static inline bool
- compare_ssa_operands_equal (gimple stmt1, gimple stmt2, int flags)
- {
-   ssa_op_iter iter1, iter2;
-   tree op1 = NULL_TREE;
-   tree op2 = NULL_TREE;
-   bool look1, look2;
- 
-   if (stmt1 == stmt2)
-     return true;
- 
-   look1 = stmt1 != NULL;
-   look2 = stmt2 != NULL;
- 
-   if (look1)
-     {
-       op1 = op_iter_init_tree (&iter1, stmt1, flags);
-       if (!look2)
-         return op_iter_done (&iter1);
-     }
-   else
-     clear_and_done_ssa_iter (&iter1);
- 
-   if (look2)
-     {
-       op2 = op_iter_init_tree (&iter2, stmt2, flags);
-       if (!look1)
-         return op_iter_done (&iter2);
-     }
-   else
-     clear_and_done_ssa_iter (&iter2);
- 
-   while (!op_iter_done (&iter1) && !op_iter_done (&iter2))
-     {
-       if (op1 != op2)
- 	return false;
-       op1 = op_iter_next_tree (&iter1);
-       op2 = op_iter_next_tree (&iter2);
-     }
- 
-   return (op_iter_done (&iter1) && op_iter_done (&iter2));
- }
- 
- 
  /* If there is a single DEF in the PHI node which matches FLAG, return it.
     Otherwise return NULL_DEF_OPERAND_P.  */
  static inline tree
--- 881,886 ----
*************** link_use_stmts_after (use_operand_p head
*** 1168,1176 ****
      }
    else
      {
!       FOR_EACH_SSA_USE_OPERAND (use_p, head_stmt, op_iter, flag)
! 	if (USE_FROM_PTR (use_p) == use)
! 	  last_p = move_use_after_head (use_p, head, last_p);
      }
    /* Link iter node in after last_p.  */
    if (imm->iter_node.prev != NULL)
--- 1022,1038 ----
      }
    else
      {
!       if (flag == SSA_OP_USE)
! 	{
! 	  FOR_EACH_SSA_USE_OPERAND (use_p, head_stmt, op_iter, flag)
! 	    if (USE_FROM_PTR (use_p) == use)
! 	      last_p = move_use_after_head (use_p, head, last_p);
! 	}
!       else if ((use_p = gimple_vuse_op (head_stmt)) != NULL_USE_OPERAND_P)
! 	{
! 	  if (USE_FROM_PTR (use_p) == use)
! 	    last_p = move_use_after_head (use_p, head, last_p);
! 	}
      }
    /* Link iter node in after last_p.  */
    if (imm->iter_node.prev != NULL)
Index: gcc/tree-flow.h
===================================================================
*** gcc/tree-flow.h.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-flow.h	2009-01-19 14:30:25.000000000 +0100
*************** struct var_ann_d GTY(())
*** 226,239 ****
       states.  */
    ENUM_BITFIELD (need_phi_state) need_phi_state : 2;
  
-   /* Used during operand processing to determine if this variable is already 
-      in the VUSE list.  */
-   unsigned in_vuse_list : 1;
- 
-   /* Used during operand processing to determine if this variable is already 
-      in the VDEF list.  */
-   unsigned in_vdef_list : 1;
- 
    /* True for HEAP artificial variables.  These variables represent
       the memory area allocated by a call to malloc.  */
    unsigned is_heapvar : 1;
--- 226,231 ----
Index: gcc/gimple.h
===================================================================
*** gcc/gimple.h.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/gimple.h	2009-01-19 14:31:27.000000000 +0100
*************** struct gimple_statement_with_memory_ops_
*** 363,374 ****
    /* [ WORD 1-7 ]  */
    struct gimple_statement_with_ops_base opbase;
  
!   /* [ WORD 8-9 ]  
!      Vectors for virtual operands.  */
!   struct voptype_d GTY((skip (""))) *vdef_ops;
!   struct voptype_d GTY((skip (""))) *vuse_ops;
  
!   /* [ WORD 9-10 ]
       Symbols stored/loaded by this statement.  */
    bitmap GTY((skip (""))) stores;
    bitmap GTY((skip (""))) loads;
--- 363,374 ----
    /* [ WORD 1-7 ]  */
    struct gimple_statement_with_ops_base opbase;
  
!   /* [ WORD 8-9 ]
!      Virtual operands for this statement.  */
!   tree vdef;
!   tree vuse;
  
!   /* [ WORD 10-11 ]
       Symbols stored/loaded by this statement.  */
    bitmap GTY((skip (""))) stores;
    bitmap GTY((skip (""))) loads;
*************** gimple_set_use_ops (gimple g, struct use
*** 1318,1390 ****
  }
  
  
! /* Return the set of VUSE operands for statement G.  */
  
! static inline struct voptype_d *
! gimple_vuse_ops (const_gimple g)
  {
    if (!gimple_has_mem_ops (g))
!     return NULL;
!   return g->gsmem.membase.vuse_ops;
  }
  
  
! /* Set OPS to be the set of VUSE operands for statement G.  */
! 
! static inline void
! gimple_set_vuse_ops (gimple g, struct voptype_d *ops)
  {
!   gcc_assert (gimple_has_mem_ops (g));
!   g->gsmem.membase.vuse_ops = ops;
  }
  
  
! /* Return the set of VDEF operands for statement G.  */
  
! static inline struct voptype_d *
! gimple_vdef_ops (const_gimple g)
  {
    if (!gimple_has_mem_ops (g))
!     return NULL;
!   return g->gsmem.membase.vdef_ops;
  }
  
  
! /* Set OPS to be the set of VDEF operands for statement G.  */
! 
! static inline void
! gimple_set_vdef_ops (gimple g, struct voptype_d *ops)
  {
!   gcc_assert (gimple_has_mem_ops (g));
!   g->gsmem.membase.vdef_ops = ops;
  }
  
- 
  /* Return the single VUSE operand of the statement G.  */
  
! static inline tree
! gimple_vuse (const_gimple g)
  {
!   struct voptype_d *ops = gimple_vuse_ops (g);
!   if (!ops)
!     /* The VMAYUSE is in the vdef ops list.  */
!     ops = gimple_vdef_ops (g);
!   if (!ops)
!     return NULL_TREE;
!   return VUSE_OP (ops, 0);
  }
  
  /* Return the single VDEF operand of the statement G.  */
  
! static inline tree
! gimple_vdef (const_gimple g)
  {
!   struct voptype_d *ops = gimple_vdef_ops (g);
!   if (!ops)
!     return NULL_TREE;
!   return VDEF_RESULT (ops);
  }
  
  
  /* Return the set of symbols loaded by statement G.  Each element of the
     set is the DECL_UID of the corresponding symbol.  */
--- 1318,1411 ----
  }
  
  
! /* Return the set of VUSE operand for statement G.  */
  
! static inline use_operand_p
! gimple_vuse_op (const_gimple g)
  {
+   struct use_optype_d *ops;
    if (!gimple_has_mem_ops (g))
!     return NULL_USE_OPERAND_P;
!   ops = g->gsops.opbase.use_ops;
!   if (ops
!       && USE_OP_PTR (ops)->use == &g->gsmem.membase.vuse)
!     return USE_OP_PTR (ops);
!   return NULL_USE_OPERAND_P;
  }
  
+ /* Return the set of VDEF operand for statement G.  */
  
! static inline def_operand_p
! gimple_vdef_op (const_gimple g)
  {
!   struct def_optype_d *ops;
!   if (!gimple_has_mem_ops (g))
!     return NULL_DEF_OPERAND_P;
!   ops = g->gsops.opbase.def_ops;
!   if (ops
!       && DEF_OP_PTR (ops) == &g->gsmem.membase.vdef)
!     return DEF_OP_PTR (ops);
!   return NULL_DEF_OPERAND_P;
  }
  
  
! /* Return the single VUSE operand of the statement G.  */
  
! static inline tree
! gimple_vuse (const_gimple g)
  {
    if (!gimple_has_mem_ops (g))
!     return NULL_TREE;
!   return g->gsmem.membase.vuse;
  }
  
+ /* Return the single VDEF operand of the statement G.  */
  
! static inline tree
! gimple_vdef (const_gimple g)
  {
!   if (!gimple_has_mem_ops (g))
!     return NULL_TREE;
!   return g->gsmem.membase.vdef;
  }
  
  /* Return the single VUSE operand of the statement G.  */
  
! static inline tree *
! gimple_vuse_ptr (gimple g)
  {
!   if (!gimple_has_mem_ops (g))
!     return NULL;
!   return &g->gsmem.membase.vuse;
  }
  
  /* Return the single VDEF operand of the statement G.  */
  
! static inline tree *
! gimple_vdef_ptr (gimple g)
  {
!   if (!gimple_has_mem_ops (g))
!     return NULL;
!   return &g->gsmem.membase.vdef;
! }
! 
! /* Set the single VUSE operand of the statement G.  */
! 
! static inline void
! gimple_set_vuse (gimple g, tree vuse)
! {
!   gcc_assert (gimple_has_mem_ops (g));
!   g->gsmem.membase.vuse = vuse;
  }
  
+ /* Set the single VDEF operand of the statement G.  */
+ 
+ static inline void
+ gimple_set_vdef (gimple g, tree vdef)
+ {
+   gcc_assert (gimple_has_mem_ops (g));
+   g->gsmem.membase.vdef = vdef;
+ }
  
  /* Return the set of symbols loaded by statement G.  Each element of the
     set is the DECL_UID of the corresponding symbol.  */
Index: gcc/tree-ssa-operands.c
===================================================================
*** gcc/tree-ssa-operands.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-operands.c	2009-01-19 14:30:25.000000000 +0100
*************** static VEC(tree,heap) *build_defs;
*** 137,147 ****
  /* Array for building all the use operands.  */
  static VEC(tree,heap) *build_uses;
  
! /* Set for building all the VDEF operands.  */
! static VEC(tree,heap) *build_vdefs;
  
! /* Set for building all the VUSE operands.  */
! static VEC(tree,heap) *build_vuses;
  
  /* Bitmap obstack for our datastructures that needs to survive across	
     compilations of multiple functions.  */
--- 137,147 ----
  /* Array for building all the use operands.  */
  static VEC(tree,heap) *build_uses;
  
! /* The built VDEF operand.  */
! static tree build_vdef;
  
! /* The built VUSE operand.  */
! static tree build_vuse;
  
  /* Bitmap obstack for our datastructures that needs to survive across	
     compilations of multiple functions.  */
*************** get_name_decl (const_tree t)
*** 213,266 ****
  }
  
  
- /* Comparison function for qsort used in operand_build_sort_virtual.  */
- 
- int
- operand_build_cmp (const void *p, const void *q)
- {
-   const_tree const e1 = *((const_tree const *)p);
-   const_tree const e2 = *((const_tree const *)q);
-   const unsigned int u1 = get_name_decl (e1);
-   const unsigned int u2 = get_name_decl (e2);
- 
-   /* We want to sort in ascending order.  They can never be equal.  */
- #ifdef ENABLE_CHECKING
-   gcc_assert (u1 != u2);
- #endif
-   return (u1 > u2 ? 1 : -1);
- }
- 
- 
- /* Sort the virtual operands in LIST from lowest DECL_UID to highest.  */
- 
- static inline void
- operand_build_sort_virtual (VEC(tree,heap) *list)
- {
-   int num = VEC_length (tree, list);
- 
-   if (num < 2)
-     return;
- 
-   if (num == 2)
-     {
-       if (get_name_decl (VEC_index (tree, list, 0)) 
- 	  > get_name_decl (VEC_index (tree, list, 1)))
- 	{  
- 	  /* Swap elements if in the wrong order.  */
- 	  tree tmp = VEC_index (tree, list, 0);
- 	  VEC_replace (tree, list, 0, VEC_index (tree, list, 1));
- 	  VEC_replace (tree, list, 1, tmp);
- 	}
-       return;
-     }
- 
-   /* There are 3 or more elements, call qsort.  */
-   qsort (VEC_address (tree, list), 
- 	 VEC_length (tree, list), 
- 	 sizeof (tree),
- 	 operand_build_cmp);
- }
- 
  /*  Return true if the SSA operands cache is active.  */
  
  bool
--- 213,218 ----
*************** ssa_operands_active (void)
*** 276,359 ****
    return cfun->gimple_df && gimple_ssa_operands (cfun)->ops_active;
  }
  
- 
- /* VOPs are of variable sized, so the free list maps "free buckets" to the 
-    following table:  
-     bucket   # operands
-     ------   ----------
- 	0	1
- 	1	2
- 	  ...
- 	15	16
- 	16	17-24
- 	17	25-32
- 	18	31-40
- 	  ...
- 	29	121-128
-    Any VOPs larger than this are simply added to the largest bucket when they
-    are freed.  */
- 
- 
- /* Return the number of operands used in bucket BUCKET.  */
- 
- static inline int
- vop_free_bucket_size (int bucket)
- {
- #ifdef ENABLE_CHECKING
-   gcc_assert (bucket >= 0 && bucket < NUM_VOP_FREE_BUCKETS);
- #endif
-   if (bucket < 16)
-     return bucket + 1;
-   return (bucket - 13) * 8;
- }
- 
- 
- /* For a vop of NUM operands, return the bucket NUM belongs to.  If NUM is 
-    beyond the end of the bucket table, return -1.  */
- 
- static inline int 
- vop_free_bucket_index (int num)
- {
-   gcc_assert (num > 0 && NUM_VOP_FREE_BUCKETS > 16);
- 
-   /* Sizes 1 through 16 use buckets 0-15.  */
-   if (num <= 16)
-     return num - 1;
-   /* Buckets 16 - NUM_VOP_FREE_BUCKETS represent 8 unit chunks.  */
-   num = 14 + (num - 1) / 8;
-   if (num >= NUM_VOP_FREE_BUCKETS)
-     return -1;
-   else
-     return num;
- }
- 
- 
- /* Initialize the VOP free buckets.  */
- 
- static inline void
- init_vop_buckets (void)
- {
-   int x;
- 
-   for (x = 0; x < NUM_VOP_FREE_BUCKETS; x++)
-     gimple_ssa_operands (cfun)->vop_free_buckets[x] = NULL;
- }
- 
- 
- /* Add PTR to the appropriate VOP bucket.  */
- 
- static inline void
- add_vop_to_freelist (voptype_p ptr)
- {
-   int bucket = vop_free_bucket_index (VUSE_VECT_NUM_ELEM (ptr->usev));
- 
-   /* Too large, use the largest bucket so its not a complete throw away.  */
-   if (bucket == -1)
-     bucket = NUM_VOP_FREE_BUCKETS - 1;
- 
-   ptr->next = gimple_ssa_operands (cfun)->vop_free_buckets[bucket];
-   gimple_ssa_operands (cfun)->vop_free_buckets[bucket] = ptr;
- }
   
  /* Create the VOP variable, an artificial global variable to act as a
     representative of all of the virtual operands FUD chain.  */
--- 228,233 ----
*************** init_ssa_operands (void)
*** 399,406 ****
      {
        build_defs = VEC_alloc (tree, heap, 5);
        build_uses = VEC_alloc (tree, heap, 10);
!       build_vuses = VEC_alloc (tree, heap, 25);
!       build_vdefs = VEC_alloc (tree, heap, 25);
        bitmap_obstack_initialize (&operands_bitmap_obstack);
        build_loads = BITMAP_ALLOC (&operands_bitmap_obstack);
        build_stores = BITMAP_ALLOC (&operands_bitmap_obstack);
--- 273,280 ----
      {
        build_defs = VEC_alloc (tree, heap, 5);
        build_uses = VEC_alloc (tree, heap, 10);
!       build_vuse = NULL_TREE;
!       build_vdef = NULL_TREE;
        bitmap_obstack_initialize (&operands_bitmap_obstack);
        build_loads = BITMAP_ALLOC (&operands_bitmap_obstack);
        build_stores = BITMAP_ALLOC (&operands_bitmap_obstack);
*************** init_ssa_operands (void)
*** 412,418 ****
       = gimple_ssa_operands (cfun)->ssa_operand_mem_size;
    gimple_ssa_operands (cfun)->ops_active = true;
    memset (&clobber_stats, 0, sizeof (clobber_stats));
-   init_vop_buckets ();
    gimple_ssa_operands (cfun)->ssa_operand_mem_size = OP_SIZE_INIT;
    create_vop_var ();
  }
--- 286,291 ----
*************** fini_ssa_operands (void)
*** 429,436 ****
      {
        VEC_free (tree, heap, build_defs);
        VEC_free (tree, heap, build_uses);
!       VEC_free (tree, heap, build_vdefs);
!       VEC_free (tree, heap, build_vuses);
        BITMAP_FREE (build_loads);
        BITMAP_FREE (build_stores);
  
--- 302,309 ----
      {
        VEC_free (tree, heap, build_defs);
        VEC_free (tree, heap, build_uses);
!       build_vdef = NULL_TREE;
!       build_vuse = NULL_TREE;
        BITMAP_FREE (build_loads);
        BITMAP_FREE (build_stores);
  
*************** ssa_operand_alloc (unsigned size)
*** 489,508 ****
  
        if (gimple_ssa_operands (cfun)->ssa_operand_mem_size == OP_SIZE_INIT)
  	gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	   = OP_SIZE_1 * sizeof (struct voptype_d);
        else
  	if (gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	    == OP_SIZE_1 * sizeof (struct voptype_d))
  	  gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	     = OP_SIZE_2 * sizeof (struct voptype_d);
  	else
  	  gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	     = OP_SIZE_3 * sizeof (struct voptype_d);
  
        /* Go right to the maximum size if the request is too large.  */
        if (size > gimple_ssa_operands (cfun)->ssa_operand_mem_size)
          gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	  = OP_SIZE_3 * sizeof (struct voptype_d);
  
        /* We can reliably trigger the case that we need arbitrary many
  	 operands (see PR34093), so allocate a buffer just for this request.  */
--- 362,381 ----
  
        if (gimple_ssa_operands (cfun)->ssa_operand_mem_size == OP_SIZE_INIT)
  	gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	   = OP_SIZE_1 * sizeof (struct use_optype_d);
        else
  	if (gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	    == OP_SIZE_1 * sizeof (struct use_optype_d))
  	  gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	     = OP_SIZE_2 * sizeof (struct use_optype_d);
  	else
  	  gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	     = OP_SIZE_3 * sizeof (struct use_optype_d);
  
        /* Go right to the maximum size if the request is too large.  */
        if (size > gimple_ssa_operands (cfun)->ssa_operand_mem_size)
          gimple_ssa_operands (cfun)->ssa_operand_mem_size
! 	  = OP_SIZE_3 * sizeof (struct use_optype_d);
  
        /* We can reliably trigger the case that we need arbitrary many
  	 operands (see PR34093), so allocate a buffer just for this request.  */
*************** alloc_use (void)
*** 561,598 ****
  }
  
  
- /* Allocate a vop with NUM elements.  */
- 
- static inline struct voptype_d *
- alloc_vop (int num)
- {
-   struct voptype_d *ret = NULL;
-   int alloc_size = 0;
- 
-   int bucket = vop_free_bucket_index (num);
-   if (bucket != -1)
-     {
-       /* If there is a free operand, use it.  */
-       if (gimple_ssa_operands (cfun)->vop_free_buckets[bucket] != NULL)
- 	{
- 	  ret = gimple_ssa_operands (cfun)->vop_free_buckets[bucket];
- 	  gimple_ssa_operands (cfun)->vop_free_buckets[bucket] = 
- 		  gimple_ssa_operands (cfun)->vop_free_buckets[bucket]->next;
- 	}
-       else
-         alloc_size = vop_free_bucket_size(bucket);
-     }
-   else
-     alloc_size = num;
- 
-   if (alloc_size > 0)
-     ret = (struct voptype_d *)ssa_operand_alloc (
- 	sizeof (struct voptype_d) + (alloc_size - 1) * sizeof (vuse_element_t));
- 
-   VUSE_VECT_NUM_ELEM (ret->usev) = num;
-   return ret;
- }
- 
  
  /* This routine makes sure that PTR is in an immediate use list, and makes
     sure the stmt pointer is set to the current stmt.  */
--- 434,439 ----
*************** add_use_op (gimple stmt, tree *op, use_o
*** 641,696 ****
  }
  
  
- /* Return a virtual op pointer with NUM elements which are all
-    initialized to OP and are linked into the immediate uses for STMT.
-    The new vop is appended after PREV.  */
- 
- static inline voptype_p
- add_vop (gimple stmt, tree op, int num, voptype_p prev)
- {
-   voptype_p new_vop;
-   int x;
- 
-   new_vop = alloc_vop (num);
-   for (x = 0; x < num; x++)
-     {
-       VUSE_OP_PTR (new_vop, x)->prev = NULL;
-       SET_VUSE_OP (new_vop, x, op);
-       VUSE_OP_PTR (new_vop, x)->use = &new_vop->usev.uses[x].use_var;
-       link_imm_use_stmt (VUSE_OP_PTR (new_vop, x),
- 			 new_vop->usev.uses[x].use_var, stmt);
-     }
- 
-   if (prev)
-     prev->next = new_vop;
-   new_vop->next = NULL;
-   return new_vop;
- }
- 
- 
- /* Adds OP to the list of vuses of statement STMT after LAST, and moves
-    LAST to the new element.  */
- 
- static inline voptype_p
- add_vuse_op (gimple stmt, tree op, int num, voptype_p last)
- {
-   voptype_p new_vop = add_vop (stmt, op, num, last);
-   VDEF_RESULT (new_vop) = NULL_TREE;
-   return new_vop;
- }
- 
- 
- /* Adds OP to the list of vdefs of statement STMT after LAST, and moves
-    LAST to the new element.  */
- 
- static inline voptype_p
- add_vdef_op (gimple stmt, tree op, int num, voptype_p last)
- {
-   voptype_p new_vop = add_vop (stmt, op, num, last);
-   VDEF_RESULT (new_vop) = op;
-   return new_vop;
- }
-   
  
  /* Takes elements from build_defs and turns them into def operands of STMT.
     TODO -- Make build_defs VEC of tree *.  */
--- 482,487 ----
*************** finalize_ssa_defs (gimple stmt)
*** 706,711 ****
--- 497,519 ----
    /* There should only be a single real definition per assignment.  */
    gcc_assert ((stmt && gimple_code (stmt) != GIMPLE_ASSIGN) || num <= 1);
  
+   /* Set the symbols referenced by STMT.  */
+   if (gimple_has_mem_ops (stmt))
+     gimple_set_stored_syms (stmt, build_stores, &operands_bitmap_obstack);
+ 
+   /* Pre-pend the vdef we may have built.  */
+   if (build_vdef != NULL_TREE)
+     {
+       tree oldvdef = gimple_vdef (stmt);
+       if (oldvdef
+ 	  && TREE_CODE (oldvdef) == SSA_NAME)
+ 	oldvdef = SSA_NAME_VAR (oldvdef);
+       if (oldvdef != build_vdef)
+ 	gimple_set_vdef (stmt, build_vdef);
+       VEC_safe_insert (tree, heap, build_defs, 0, (tree)gimple_vdef_ptr (stmt));
+       ++num;
+     }
+ 
    new_list.next = NULL;
    last = &new_list;
  
*************** finalize_ssa_defs (gimple stmt)
*** 713,718 ****
--- 521,540 ----
  
    new_i = 0;
  
+   /* Clear and unlink a no longer necessary VDEF.  */
+   if (build_vdef == NULL_TREE
+       && gimple_vdef (stmt) != NULL_TREE)
+     {
+       if (gimple_vdef_op (stmt) != NULL_DEF_OPERAND_P)
+ 	unlink_stmt_vdef (stmt);
+       gimple_set_vdef (stmt, NULL_TREE);
+     }
+ 
+   /* If we have a non-SSA_NAME VDEF, mark it for renaming.  */
+   if (gimple_vdef (stmt)
+       && TREE_CODE (gimple_vdef (stmt)) != SSA_NAME)
+     mark_sym_for_renaming (gimple_vdef (stmt));
+ 
    /* Check for the common case of 1 def that hasn't changed.  */
    if (old_ops && old_ops->next == NULL && num == 1
        && (tree *) VEC_index (tree, build_defs, 0) == DEF_OP_PTR (old_ops))
*************** finalize_ssa_defs (gimple stmt)
*** 731,747 ****
  
    /* Now set the stmt's operands.  */
    gimple_set_def_ops (stmt, new_list.next);
- 
- #ifdef ENABLE_CHECKING
-   {
-     def_optype_p ptr;
-     unsigned x = 0;
-     for (ptr = gimple_def_ops (stmt); ptr; ptr = ptr->next)
-       x++;
- 
-     gcc_assert (x == num);
-   }
- #endif
  }
  
  
--- 553,558 ----
*************** finalize_ssa_uses (gimple stmt)
*** 755,765 ****
--- 566,598 ----
    struct use_optype_d new_list;
    use_optype_p old_ops, ptr, last;
  
+   /* Set the symbols referenced by STMT.  */
+   if (gimple_has_mem_ops (stmt))
+     gimple_set_loaded_syms (stmt, build_loads, &operands_bitmap_obstack);
+ 
+   /* Pre-pend the VUSE we may have built.  */
+   if (build_vuse != NULL_TREE)
+     {
+       tree oldvuse = gimple_vuse (stmt);
+       if (oldvuse
+ 	  && TREE_CODE (oldvuse) == SSA_NAME)
+ 	oldvuse = SSA_NAME_VAR (oldvuse);
+       if (oldvuse != (build_vuse != NULL_TREE
+ 		      ? build_vuse : build_vdef))
+ 	gimple_set_vuse (stmt, NULL_TREE);
+       VEC_safe_insert (tree, heap, build_uses, 0, (tree)gimple_vuse_ptr (stmt));
+     }
+ 
    new_list.next = NULL;
    last = &new_list;
  
    old_ops = gimple_use_ops (stmt);
  
+   /* Clear a no longer necessary VUSE.  */
+   if (build_vuse == NULL_TREE
+       && gimple_vuse (stmt) != NULL_TREE)
+     gimple_set_vuse (stmt, NULL_TREE);
+ 
    /* If there is anything in the old list, free it.  */
    if (old_ops)
      {
*************** finalize_ssa_uses (gimple stmt)
*** 769,774 ****
--- 602,616 ----
        gimple_ssa_operands (cfun)->free_uses = old_ops;
      }
  
+   /* If we added a VUSE, make sure to set the operand if it is not already
+      present and mark it for renaming.  */
+   if (build_vuse != NULL_TREE
+       && gimple_vuse (stmt) == NULL_TREE)
+     {
+       gimple_set_vuse (stmt, gimple_vop (cfun));
+       mark_sym_for_renaming (gimple_vop (cfun));
+     }
+ 
    /* Now create nodes for all the new nodes.  */
    for (new_i = 0; new_i < VEC_length (tree, build_uses); new_i++)
      last = add_use_op (stmt, 
*************** finalize_ssa_uses (gimple stmt)
*** 777,1024 ****
  
    /* Now set the stmt's operands.  */
    gimple_set_use_ops (stmt, new_list.next);
- 
- #ifdef ENABLE_CHECKING
-   {
-     unsigned x = 0;
-     for (ptr = gimple_use_ops (stmt); ptr; ptr = ptr->next)
-       x++;
- 
-     gcc_assert (x == VEC_length (tree, build_uses));
-   }
- #endif
- }
- 
- 
- /* Takes elements from BUILD_VDEFS and turns them into vdef operands of
-    STMT.  */
- 
- static inline void
- finalize_ssa_vdefs (gimple stmt)
- {
-   unsigned new_i;
-   struct voptype_d new_list;
-   voptype_p old_ops, ptr, last;
- 
-   /* Set the symbols referenced by STMT.  */
-   gimple_set_stored_syms (stmt, build_stores, &operands_bitmap_obstack);
- 
-   new_list.next = NULL;
-   last = &new_list;
- 
-   old_ops = gimple_vdef_ops (stmt);
-   new_i = 0;
-   while (old_ops && new_i < VEC_length (tree, build_vdefs))
-     {
-       tree op = VEC_index (tree, build_vdefs, new_i);
-       unsigned new_uid = get_name_decl (op);
-       unsigned old_uid = get_name_decl (VDEF_RESULT (old_ops));
- 
-       /* FIXME, for now each VDEF operator should have at most one
- 	 operand in their RHS.  */
-       gcc_assert (VDEF_NUM (old_ops) == 1);
- 
-       if (old_uid == new_uid)
-         {
- 	  /* If the symbols are the same, reuse the existing operand.  */
- 	  last->next = old_ops;
- 	  last = old_ops;
- 	  old_ops = old_ops->next;
- 	  last->next = NULL;
- 	  set_virtual_use_link (VDEF_OP_PTR (last, 0), stmt);
- 	  new_i++;
- 	}
-       else if (old_uid < new_uid)
- 	{
- 	  /* If old is less than new, old goes to the free list.  */
- 	  voptype_p next;
- 	  delink_imm_use (VDEF_OP_PTR (old_ops, 0));
- 	  next = old_ops->next;
- 	  add_vop_to_freelist (old_ops);
- 	  old_ops = next;
- 	}
-       else
- 	{
- 	  /* This is a new operand.  */
- 	  last = add_vdef_op (stmt, op, 1, last);
- 	  mark_sym_for_renaming (gimple_vop (cfun));
- 	  new_i++;
- 	}
-     }
- 
-   /* If there is anything remaining in BUILD_VDEFS, simply emit it.  */
-   for ( ; new_i < VEC_length (tree, build_vdefs); new_i++)
-     {
-       last = add_vdef_op (stmt, VEC_index (tree, build_vdefs, new_i), 1, last);
-       mark_sym_for_renaming (gimple_vop (cfun));
-     }
- 
-   /* If there is anything in the old list, free it.  */
-   if (old_ops)
-     {
-       unlink_stmt_vdef (stmt);
-       for (ptr = old_ops; ptr; ptr = last)
-         {
- 	  last = ptr->next;
- 	  delink_imm_use (VDEF_OP_PTR (ptr, 0));
- 	  add_vop_to_freelist (ptr);
- 	}
-     }
- 
-   /* Now set STMT's operands.  */
-   gimple_set_vdef_ops (stmt, new_list.next);
- 
- #ifdef ENABLE_CHECKING
-   {
-     unsigned x = 0;
-     for (ptr = gimple_vdef_ops (stmt); ptr; ptr = ptr->next)
-       x++;
- 
-     gcc_assert (x == VEC_length (tree, build_vdefs));
-   }
- #endif
- }
- 
- 
- /* Takes elements from BUILD_VUSES and turns them into VUSE operands of
-    STMT.  */
- 
- static inline void
- finalize_ssa_vuse_ops (gimple stmt)
- {
-   unsigned new_i, old_i;
-   voptype_p old_ops, last;
-   VEC(tree,heap) *new_ops;
- 
-   /* Set the symbols referenced by STMT.  */
-   gimple_set_loaded_syms (stmt, build_loads, &operands_bitmap_obstack);
- 
-   /* STMT should have at most one VUSE operator.  */
-   old_ops = gimple_vuse_ops (stmt);
-   gcc_assert (old_ops == NULL || old_ops->next == NULL);
- 
-   new_ops = NULL;
-   new_i = old_i = 0;
-   while (old_ops
-          && old_i < VUSE_NUM (old_ops)
- 	 && new_i < VEC_length (tree, build_vuses))
-     {
-       tree new_op = VEC_index (tree, build_vuses, new_i);
-       tree old_op = VUSE_OP (old_ops, old_i);
-       unsigned new_uid = get_name_decl (new_op);
-       unsigned old_uid = get_name_decl (old_op);
- 
-       if (old_uid == new_uid)
-         {
- 	  /* If the symbols are the same, reuse the existing operand.  */
- 	  VEC_safe_push (tree, heap, new_ops, old_op);
- 	  new_i++;
- 	  old_i++;
- 	}
-       else if (old_uid < new_uid)
- 	{
- 	  /* If OLD_UID is less than NEW_UID, the old operand has
- 	     disappeared, skip to the next old operand.  */
- 	  old_i++;
- 	}
-       else
- 	{
- 	  /* This is a new operand.  */
- 	  VEC_safe_push (tree, heap, new_ops, new_op);
- 	  mark_sym_for_renaming (gimple_vop (cfun));
- 	  new_i++;
- 	}
-     }
- 
-   /* If there is anything remaining in the build_vuses list, simply emit it.  */
-   for ( ; new_i < VEC_length (tree, build_vuses); new_i++)
-     {
-       VEC_safe_push (tree, heap, new_ops, VEC_index (tree, build_vuses, new_i));
-       mark_sym_for_renaming (gimple_vop (cfun));
-     }
- 
-   /* If there is anything in the old list, free it.  */
-   if (old_ops)
-     {
-       for (old_i = 0; old_i < VUSE_NUM (old_ops); old_i++)
- 	delink_imm_use (VUSE_OP_PTR (old_ops, old_i));
-       add_vop_to_freelist (old_ops);
-       gimple_set_vuse_ops (stmt, NULL);
-     }
- 
-   /* If there are any operands, instantiate a VUSE operator for STMT.  */
-   if (new_ops)
-     {
-       tree op;
-       unsigned i;
- 
-       last = add_vuse_op (stmt, NULL, VEC_length (tree, new_ops), NULL);
- 
-       for (i = 0; VEC_iterate (tree, new_ops, i, op); i++)
- 	SET_USE (VUSE_OP_PTR (last, (int) i), op);
- 
-       gimple_set_vuse_ops (stmt, last);
-       VEC_free (tree, heap, new_ops);
-     }
- 
- #ifdef ENABLE_CHECKING
-   {
-     unsigned x;
-     
-     if (gimple_vuse_ops (stmt))
-       {
- 	gcc_assert (gimple_vuse_ops (stmt)->next == NULL);
- 	x = VUSE_NUM (gimple_vuse_ops (stmt));
-       }
-     else
-       x = 0;
- 
-     gcc_assert (x == VEC_length (tree, build_vuses));
-   }
- #endif
- }
- 
- /* Return a new VUSE operand vector for STMT.  */
-                                                                               
- static void
- finalize_ssa_vuses (gimple stmt)
- {
-   unsigned num, num_vdefs;
-   unsigned vuse_index;
- 
-   /* Remove superfluous VUSE operands.  If the statement already has a
-      VDEF operator for a variable 'a', then a VUSE for 'a' is not
-      needed because VDEFs imply a VUSE of the variable.  For instance,
-      suppose that variable 'a' is pointed-to by p and q:
- 
- 	      # VUSE <a_2>
- 	      # a_3 = VDEF <a_2>
- 	      *p = *q;
- 
-      The VUSE <a_2> is superfluous because it is implied by the
-      VDEF operator.  */
-   num = VEC_length (tree, build_vuses);
-   num_vdefs = VEC_length (tree, build_vdefs);
- 
-   if (num > 0 && num_vdefs > 0)
-     for (vuse_index = 0; vuse_index < VEC_length (tree, build_vuses); )
-       {
- 	tree vuse;
- 	vuse = VEC_index (tree, build_vuses, vuse_index);
- 	if (TREE_CODE (vuse) != SSA_NAME)
- 	  {
- 	    var_ann_t ann = var_ann (vuse);
- 	    ann->in_vuse_list = 0;
- 	    if (ann->in_vdef_list)
- 	      {
- 		VEC_ordered_remove (tree, build_vuses, vuse_index);
- 		continue;
- 	      }
- 	  }
- 	vuse_index++;
-       }
- 
-   finalize_ssa_vuse_ops (stmt);
  }
  
  
--- 619,624 ----
*************** finalize_ssa_vuses (gimple stmt)
*** 1028,1046 ****
  static inline void
  cleanup_build_arrays (void)
  {
!   unsigned i;
!   tree t;
! 
!   for (i = 0; VEC_iterate (tree, build_vdefs, i, t); i++)
!     if (TREE_CODE (t) != SSA_NAME)
!       var_ann (t)->in_vdef_list = false;
! 
!   for (i = 0; VEC_iterate (tree, build_vuses, i, t); i++)
!     if (TREE_CODE (t) != SSA_NAME)
!       var_ann (t)->in_vuse_list = false;
! 
!   VEC_truncate (tree, build_vdefs, 0);
!   VEC_truncate (tree, build_vuses, 0);
    VEC_truncate (tree, build_defs, 0);
    VEC_truncate (tree, build_uses, 0);
    bitmap_clear (build_loads);
--- 628,635 ----
  static inline void
  cleanup_build_arrays (void)
  {
!   build_vdef = NULL_TREE;
!   build_vuse = NULL_TREE;
    VEC_truncate (tree, build_defs, 0);
    VEC_truncate (tree, build_uses, 0);
    bitmap_clear (build_loads);
*************** finalize_ssa_stmt_operands (gimple stmt)
*** 1055,1065 ****
  {
    finalize_ssa_defs (stmt);
    finalize_ssa_uses (stmt);
-   if (gimple_has_mem_ops (stmt))
-     {
-       finalize_ssa_vdefs (stmt);
-       finalize_ssa_vuses (stmt);
-     }
    cleanup_build_arrays ();
  }
  
--- 644,649 ----
*************** start_ssa_stmt_operands (void)
*** 1071,1078 ****
  {
    gcc_assert (VEC_length (tree, build_defs) == 0);
    gcc_assert (VEC_length (tree, build_uses) == 0);
!   gcc_assert (VEC_length (tree, build_vuses) == 0);
!   gcc_assert (VEC_length (tree, build_vdefs) == 0);
    gcc_assert (bitmap_empty_p (build_loads));
    gcc_assert (bitmap_empty_p (build_stores));
  }
--- 655,662 ----
  {
    gcc_assert (VEC_length (tree, build_defs) == 0);
    gcc_assert (VEC_length (tree, build_uses) == 0);
!   gcc_assert (build_vuse == NULL_TREE);
!   gcc_assert (build_vdef == NULL_TREE);
    gcc_assert (bitmap_empty_p (build_loads));
    gcc_assert (bitmap_empty_p (build_stores));
  }
*************** static inline void
*** 1102,1114 ****
  append_vdef (void)
  {
    tree vop = gimple_vop (cfun);
-   var_ann_t ann;
  
!   ann = var_ann (vop);
!   if (ann->in_vdef_list)
!     return;
!   ann->in_vdef_list = true;
!   VEC_safe_push (tree, heap, build_vdefs, vop);
  }
  
  
--- 686,699 ----
  append_vdef (void)
  {
    tree vop = gimple_vop (cfun);
  
!   gcc_assert ((build_vdef == NULL_TREE
! 	       || build_vdef == vop)
! 	      && (build_vuse == NULL_TREE
! 		  || build_vuse == vop));
! 
!   build_vdef = vop;
!   build_vuse = vop;
  }
  
  
*************** static inline void
*** 1118,1133 ****
  append_vuse (void)
  {
    tree vop = gimple_vop (cfun);
-   var_ann_t ann;
  
!   ann = var_ann (vop);
!   if (ann->in_vuse_list)
!     return;
!   if (!ann->in_vdef_list)
!     {
!       ann->in_vuse_list = true;
!       VEC_safe_push (tree, heap, build_vuses, vop);
!     }
  }
  
  /* Add VAR to the virtual operands for STMT.  FLAGS is as in
--- 703,713 ----
  append_vuse (void)
  {
    tree vop = gimple_vop (cfun);
  
!   gcc_assert (build_vuse == NULL_TREE
! 	      || build_vuse == vop);
! 
!   build_vuse = vop;
  }
  
  /* Add VAR to the virtual operands for STMT.  FLAGS is as in
*************** build_ssa_operands (gimple stmt)
*** 1629,1636 ****
  
    start_ssa_stmt_operands ();
    parse_ssa_operands (stmt);
-   operand_build_sort_virtual (build_vuses);
-   operand_build_sort_virtual (build_vdefs);
    finalize_ssa_stmt_operands (stmt);
  
    /* For added safety, assume that statements with volatile operands
--- 1209,1214 ----
*************** free_stmt_operands (gimple stmt)
*** 1648,1656 ****
  {
    def_optype_p defs = gimple_def_ops (stmt), last_def;
    use_optype_p uses = gimple_use_ops (stmt), last_use;
-   voptype_p vuses = gimple_vuse_ops (stmt);
-   voptype_p vdefs = gimple_vdef_ops (stmt), vdef, next_vdef;
-   unsigned i;
  
    if (defs)
      {
--- 1226,1231 ----
*************** free_stmt_operands (gimple stmt)
*** 1671,1695 ****
        gimple_set_use_ops (stmt, NULL);
      }
  
-   if (vuses)
-     {
-       for (i = 0; i < VUSE_NUM (vuses); i++)
- 	delink_imm_use (VUSE_OP_PTR (vuses, i));
-       add_vop_to_freelist (vuses);
-       gimple_set_vuse_ops (stmt, NULL);
-     }
- 
-   if (vdefs)
-     {
-       for (vdef = vdefs; vdef; vdef = next_vdef)
- 	{
- 	  next_vdef = vdef->next;
- 	  delink_imm_use (VDEF_OP_PTR (vdef, 0));
- 	  add_vop_to_freelist (vdef);
- 	}
-       gimple_set_vdef_ops (stmt, NULL);
-     }
- 
    if (gimple_has_ops (stmt))
      gimple_set_addresses_taken (stmt, NULL);
  
--- 1246,1251 ----
*************** free_stmt_operands (gimple stmt)
*** 1697,1702 ****
--- 1253,1260 ----
      {
        gimple_set_stored_syms (stmt, NULL, &operands_bitmap_obstack);
        gimple_set_loaded_syms (stmt, NULL, &operands_bitmap_obstack);
+       gimple_set_vuse (stmt, NULL_TREE);
+       gimple_set_vdef (stmt, NULL_TREE);
      }
  }
  
*************** update_stmt_operands (gimple stmt)
*** 1721,1834 ****
  }
  
  
- /* Copies virtual operands from SRC to DST.  */
- 
- void
- copy_virtual_operands (gimple dest, gimple src)
- {
-   unsigned int i, n;
-   voptype_p src_vuses, dest_vuses;
-   voptype_p src_vdefs, dest_vdefs;
-   struct voptype_d vuse;
-   struct voptype_d vdef;
- 
-   if (!gimple_has_mem_ops (src))
-     return;
- 
-   gimple_set_vdef_ops (dest, NULL);
-   gimple_set_vuse_ops (dest, NULL);
- 
-   gimple_set_stored_syms (dest, gimple_stored_syms (src),
- 			  &operands_bitmap_obstack);
-   gimple_set_loaded_syms (dest, gimple_loaded_syms (src),
- 			  &operands_bitmap_obstack);
- 
-   /* Copy all the VUSE operators and corresponding operands.  */
-   dest_vuses = &vuse;
-   for (src_vuses = gimple_vuse_ops (src);
-        src_vuses;
-        src_vuses = src_vuses->next)
-     {
-       n = VUSE_NUM (src_vuses);
-       dest_vuses = add_vuse_op (dest, NULL_TREE, n, dest_vuses);
-       for (i = 0; i < n; i++)
- 	SET_USE (VUSE_OP_PTR (dest_vuses, i), VUSE_OP (src_vuses, i));
- 
-       if (gimple_vuse_ops (dest) == NULL)
- 	gimple_set_vuse_ops (dest, vuse.next);
-     }
- 
-   /* Copy all the VDEF operators and corresponding operands.  */
-   dest_vdefs = &vdef;
-   for (src_vdefs = gimple_vdef_ops (src);
-        src_vdefs;
-        src_vdefs = src_vdefs->next)
-     {
-       n = VUSE_NUM (src_vdefs);
-       dest_vdefs = add_vdef_op (dest, NULL_TREE, n, dest_vdefs);
-       VDEF_RESULT (dest_vdefs) = VDEF_RESULT (src_vdefs);
-       for (i = 0; i < n; i++)
- 	SET_USE (VUSE_OP_PTR (dest_vdefs, i), VUSE_OP (src_vdefs, i));
- 
-       if (gimple_vdef_ops (dest) == NULL)
- 	gimple_set_vdef_ops (dest, vdef.next);
-     }
- }
- 
- 
- /* Specifically for use in DOM's expression analysis.  Given a store, we
-    create an artificial stmt which looks like a load from the store, this can
-    be used to eliminate redundant loads.  OLD_OPS are the operands from the 
-    store stmt, and NEW_STMT is the new load which represents a load of the
-    values stored.  If DELINK_IMM_USES_P is specified, the immediate
-    uses of this stmt will be de-linked.  */
- 
- void
- create_ssa_artificial_load_stmt (gimple new_stmt, gimple old_stmt,
- 				 bool delink_imm_uses_p)
- {
-   tree op;
-   ssa_op_iter iter;
-   use_operand_p use_p;
-   unsigned i;
- 
-   gimple_set_modified (new_stmt, false);
- 
-   /* Process NEW_STMT looking for operands.  */
-   start_ssa_stmt_operands ();
-   parse_ssa_operands (new_stmt);
- 
-   for (i = 0; VEC_iterate (tree, build_vuses, i, op); i++)
-     if (TREE_CODE (op) != SSA_NAME)
-       var_ann (op)->in_vuse_list = false;
-    
-   for (i = 0; VEC_iterate (tree, build_vdefs, i, op); i++)
-     if (TREE_CODE (op) != SSA_NAME)
-       var_ann (op)->in_vdef_list = false;
- 
-   /* Remove any virtual operands that were found.  */
-   VEC_truncate (tree, build_vdefs, 0);
-   VEC_truncate (tree, build_vuses, 0);
- 
-   /* Clear the loads and stores bitmaps.  */
-   bitmap_clear (build_loads);
-   bitmap_clear (build_stores);
- 
-   /* For each VDEF on the original statement, we want to create a
-      VUSE of the VDEF result operand on the new statement.
-      ???  All this function can be simplified very much.  */
-   FOR_EACH_SSA_TREE_OPERAND (op, old_stmt, iter, SSA_OP_VDEF)
-     VEC_safe_push (tree, heap, build_vuses, op);
- 
-   finalize_ssa_stmt_operands (new_stmt);
- 
-   /* All uses in this fake stmt must not be in the immediate use lists.  */
-   if (delink_imm_uses_p)
-     FOR_EACH_SSA_USE_OPERAND (use_p, new_stmt, iter, SSA_OP_ALL_USES)
-       delink_imm_use (use_p);
- }
- 
- 
  /* Swap operands EXP0 and EXP1 in statement STMT.  No attempt is done
     to test the validity of the swap operation.  */
  
--- 1279,1284 ----
*************** push_stmt_changes (gimple *stmt_p)
*** 2048,2056 ****
    if (gimple_references_memory_p (stmt))
      {
        tree op;
-       ssa_op_iter i;
  
!       FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_VUSE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (buf->loads == NULL)
--- 1498,1505 ----
    if (gimple_references_memory_p (stmt))
      {
        tree op;
  
!       if ((op = gimple_vuse (stmt)) != NULL_TREE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (buf->loads == NULL)
*************** push_stmt_changes (gimple *stmt_p)
*** 2058,2064 ****
  	  bitmap_set_bit (buf->loads, DECL_UID (sym));
  	}
  
!       FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_VDEF)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (buf->stores == NULL)
--- 1507,1513 ----
  	  bitmap_set_bit (buf->loads, DECL_UID (sym));
  	}
  
!       if ((op = gimple_vdef (stmt)) != NULL_TREE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (buf->stores == NULL)
*************** pop_stmt_changes (gimple *stmt_p)
*** 2131,2139 ****
    if (gimple_references_memory_p (stmt))
      {
        tree op;
-       ssa_op_iter i;
  
!       FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_VUSE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (loads == NULL)
--- 1580,1587 ----
    if (gimple_references_memory_p (stmt))
      {
        tree op;
  
!       if ((op = gimple_vuse (stmt)) != NULL_TREE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (loads == NULL)
*************** pop_stmt_changes (gimple *stmt_p)
*** 2141,2147 ****
  	  bitmap_set_bit (loads, DECL_UID (sym));
  	}
  
!       FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_VDEF)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (stores == NULL)
--- 1589,1595 ----
  	  bitmap_set_bit (loads, DECL_UID (sym));
  	}
  
!       if ((op = gimple_vdef (stmt)) != NULL_TREE)
  	{
  	  tree sym = TREE_CODE (op) == SSA_NAME ? SSA_NAME_VAR (op) : op;
  	  if (stores == NULL)
Index: gcc/tree-vrp.c
===================================================================
*** gcc/tree-vrp.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-vrp.c	2009-01-19 14:30:25.000000000 +0100
*************** stmt_interesting_for_vrp (gimple stmt)
*** 5278,5284 ****
  	  && ((is_gimple_call (stmt)
  	       && gimple_call_fndecl (stmt) != NULL_TREE
  	       && DECL_IS_BUILTIN (gimple_call_fndecl (stmt)))
! 	      || ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)))
  	return true;
      }
    else if (gimple_code (stmt) == GIMPLE_COND
--- 5278,5284 ----
  	  && ((is_gimple_call (stmt)
  	       && gimple_call_fndecl (stmt) != NULL_TREE
  	       && DECL_IS_BUILTIN (gimple_call_fndecl (stmt)))
! 	      || !gimple_vuse (stmt)))
  	return true;
      }
    else if (gimple_code (stmt) == GIMPLE_COND
*************** vrp_visit_stmt (gimple stmt, edge *taken
*** 6097,6103 ****
        if ((is_gimple_call (stmt)
  	   && gimple_call_fndecl (stmt) != NULL_TREE
  	   && DECL_IS_BUILTIN (gimple_call_fndecl (stmt)))
! 	  || ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
  	return vrp_visit_assignment_or_call (stmt, output_p);
      }
    else if (gimple_code (stmt) == GIMPLE_COND)
--- 6097,6103 ----
        if ((is_gimple_call (stmt)
  	   && gimple_call_fndecl (stmt) != NULL_TREE
  	   && DECL_IS_BUILTIN (gimple_call_fndecl (stmt)))
! 	  || !gimple_vuse (stmt))
  	return vrp_visit_assignment_or_call (stmt, output_p);
      }
    else if (gimple_code (stmt) == GIMPLE_COND)
Index: gcc/tree-into-ssa.c
===================================================================
*** gcc/tree-into-ssa.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-into-ssa.c	2009-01-19 14:30:25.000000000 +0100
*************** rewrite_update_stmt (struct dom_walk_dat
*** 1959,1967 ****
        FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
  	maybe_replace_use (use_p);
  
!       if (need_to_update_vops_p)
! 	FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_VIRTUAL_USES)
! 	  maybe_replace_use (use_p);
      }
  
    /* Register definitions of names in NEW_SSA_NAMES and OLD_SSA_NAMES.
--- 1959,1967 ----
        FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
  	maybe_replace_use (use_p);
  
!       if (need_to_update_vops_p
! 	  && (use_p = gimple_vuse_op (stmt)) != NULL_USE_OPERAND_P)
! 	maybe_replace_use (use_p);
      }
  
    /* Register definitions of names in NEW_SSA_NAMES and OLD_SSA_NAMES.
*************** rewrite_update_stmt (struct dom_walk_dat
*** 1972,1980 ****
        FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, iter, SSA_OP_DEF)
  	maybe_register_def (def_p, stmt);
  
!       if (need_to_update_vops_p)
! 	FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, iter, SSA_OP_VIRTUAL_DEFS)
! 	  maybe_register_def (def_p, stmt);
      }
  }
  
--- 1972,1980 ----
        FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, iter, SSA_OP_DEF)
  	maybe_register_def (def_p, stmt);
  
!       if (need_to_update_vops_p
! 	  && (def_p = gimple_vdef_op (stmt)) != NULL_DEF_OPERAND_P)
! 	maybe_register_def (def_p, stmt);
      }
  }
  
Index: gcc/tree-ssa-loop-im.c
===================================================================
*** gcc/tree-ssa-loop-im.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-loop-im.c	2009-01-19 14:30:25.000000000 +0100
*************** movement_possibility (gimple stmt)
*** 362,368 ****
    if (gimple_get_lhs (stmt) == NULL_TREE)
      return MOVE_IMPOSSIBLE;
  
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
      return MOVE_IMPOSSIBLE;
  
    if (stmt_ends_bb_p (stmt)
--- 362,368 ----
    if (gimple_get_lhs (stmt) == NULL_TREE)
      return MOVE_IMPOSSIBLE;
  
!   if (gimple_vdef (stmt))
      return MOVE_IMPOSSIBLE;
  
    if (stmt_ends_bb_p (stmt)
*************** determine_max_movement (gimple stmt, boo
*** 681,687 ****
      if (!add_dependency (val, lim_data, loop, true))
        return false;
  
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_USES))
      {
        mem_ref_p ref = mem_ref_in_stmt (stmt);
  
--- 681,687 ----
      if (!add_dependency (val, lim_data, loop, true))
        return false;
  
!   if (gimple_vuse (stmt))
      {
        mem_ref_p ref = mem_ref_in_stmt (stmt);
  
*************** determine_max_movement (gimple stmt, boo
*** 694,700 ****
  	}
        else
  	{
! 	  FOR_EACH_SSA_TREE_OPERAND (val, stmt, iter, SSA_OP_VIRTUAL_USES)
  	    {
  	      if (!add_dependency (val, lim_data, loop, false))
  		return false;
--- 694,700 ----
  	}
        else
  	{
! 	  if ((val = gimple_vuse (stmt)) != NULL_TREE)
  	    {
  	      if (!add_dependency (val, lim_data, loop, false))
  		return false;
*************** gather_mem_refs_stmt (struct loop *loop,
*** 1309,1321 ****
    hashval_t hash;
    PTR *slot;
    mem_ref_p ref;
-   ssa_op_iter oi;
    tree vname;
    bool is_stored;
    bitmap clvops;
    unsigned id;
  
!   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
      return;
  
    mem = simple_mem_ref_in_stmt (stmt, &is_stored);
--- 1309,1320 ----
    hashval_t hash;
    PTR *slot;
    mem_ref_p ref;
    tree vname;
    bool is_stored;
    bitmap clvops;
    unsigned id;
  
!   if (!gimple_vuse (stmt))
      return;
  
    mem = simple_mem_ref_in_stmt (stmt, &is_stored);
*************** gather_mem_refs_stmt (struct loop *loop,
*** 1347,1360 ****
    if (is_stored)
      mark_ref_stored (ref, loop);
  
!   FOR_EACH_SSA_TREE_OPERAND (vname, stmt, oi, SSA_OP_VIRTUAL_USES)
      bitmap_set_bit (ref->vops, DECL_UID (SSA_NAME_VAR (vname)));
    record_mem_ref_loc (ref, loop, stmt, mem);
    return;
  
  fail:
    clvops = VEC_index (bitmap, memory_accesses.clobbered_vops, loop->num);
!   FOR_EACH_SSA_TREE_OPERAND (vname, stmt, oi, SSA_OP_VIRTUAL_USES)
      bitmap_set_bit (clvops, DECL_UID (SSA_NAME_VAR (vname)));
  }
  
--- 1346,1359 ----
    if (is_stored)
      mark_ref_stored (ref, loop);
  
!   if ((vname = gimple_vuse (stmt)) != NULL_TREE)
      bitmap_set_bit (ref->vops, DECL_UID (SSA_NAME_VAR (vname)));
    record_mem_ref_loc (ref, loop, stmt, mem);
    return;
  
  fail:
    clvops = VEC_index (bitmap, memory_accesses.clobbered_vops, loop->num);
!   if ((vname = gimple_vuse (stmt)) != NULL_TREE)
      bitmap_set_bit (clvops, DECL_UID (SSA_NAME_VAR (vname)));
  }
  
Index: gcc/tree-complex.c
===================================================================
*** gcc/tree-complex.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-complex.c	2009-01-19 14:30:25.000000000 +0100
*************** update_phi_components (basic_block bb)
*** 745,767 ****
      }
  }
  
- /* Mark each virtual op in STMT for ssa update.  */
- 
- static void
- update_all_vops (gimple stmt)
- {
-   ssa_op_iter iter;
-   tree sym;
- 
-   FOR_EACH_SSA_TREE_OPERAND (sym, stmt, iter, SSA_OP_ALL_VIRTUALS)
-     {
-       if (TREE_CODE (sym) == SSA_NAME)
- 	sym = SSA_NAME_VAR (sym);
-       mark_sym_for_renaming (sym);
-     }
- }
- 
- 
  /* Expand a complex move to scalars.  */
  
  static void
--- 745,750 ----
*************** expand_complex_move (gimple_stmt_iterato
*** 817,823 ****
  	}
        else
  	{
- 	  update_all_vops (stmt);
  	  if (gimple_assign_rhs_code (stmt) != COMPLEX_EXPR)
  	    {
  	      r = extract_component (gsi, rhs, 0, true);
--- 800,805 ----
*************** expand_complex_move (gimple_stmt_iterato
*** 860,866 ****
  	  gimple_return_set_retval (stmt, lhs);
  	}
  
-       update_all_vops (stmt);
        update_stmt (stmt);
      }
  }
--- 842,847 ----
Index: gcc/tree-loop-distribution.c
===================================================================
*** gcc/tree-loop-distribution.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-loop-distribution.c	2009-01-19 14:30:25.000000000 +0100
*************** static bool
*** 238,251 ****
  generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
  		      gimple_stmt_iterator bsi)
  {
!   tree t, addr_base;
    tree nb_bytes = NULL;
    bool res = false;
    gimple_seq stmts = NULL, stmt_list = NULL;
    gimple fn_call;
    tree mem, fndecl, fntype, fn;
    gimple_stmt_iterator i;
-   ssa_op_iter iter;
    struct data_reference *dr = XCNEW (struct data_reference);
  
    DR_STMT (dr) = stmt;
--- 238,250 ----
  generate_memset_zero (gimple stmt, tree op0, tree nb_iter,
  		      gimple_stmt_iterator bsi)
  {
!   tree addr_base;
    tree nb_bytes = NULL;
    bool res = false;
    gimple_seq stmts = NULL, stmt_list = NULL;
    gimple fn_call;
    tree mem, fndecl, fntype, fn;
    gimple_stmt_iterator i;
    struct data_reference *dr = XCNEW (struct data_reference);
  
    DR_STMT (dr) = stmt;
*************** generate_memset_zero (gimple stmt, tree
*** 295,323 ****
      {
        gimple s = gsi_stmt (i);
        update_stmt_if_modified (s);
- 
-       FOR_EACH_SSA_TREE_OPERAND (t, s, iter, SSA_OP_VIRTUAL_DEFS)
- 	{
- 	  if (TREE_CODE (t) == SSA_NAME)
- 	    t = SSA_NAME_VAR (t);
- 	  mark_sym_for_renaming (t);
- 	}
-     }
- 
-   /* Mark also the uses of the VDEFS of STMT to be renamed.  */
-   FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, SSA_OP_VIRTUAL_DEFS)
-     {
-       if (TREE_CODE (t) == SSA_NAME)
- 	{
- 	  gimple s;
- 	  imm_use_iterator imm_iter;
- 
- 	  FOR_EACH_IMM_USE_STMT (s, imm_iter, t)
- 	    update_stmt (s);
- 
- 	  t = SSA_NAME_VAR (t);
- 	}
-       mark_sym_for_renaming (t);
      }
  
    gsi_insert_seq_after (&bsi, stmt_list, GSI_CONTINUE_LINKING);
--- 294,299 ----
*************** static void
*** 594,600 ****
  rdg_flag_uses (struct graph *rdg, int u, bitmap partition, bitmap loops,
  	       bitmap processed, bool *part_has_writes)
  {
-   ssa_op_iter iter;
    use_operand_p use_p;
    struct vertex *x = &(rdg->vertices[u]);
    gimple stmt = RDGV_STMT (x);
--- 570,575 ----
*************** rdg_flag_uses (struct graph *rdg, int u,
*** 614,620 ****
  
    if (gimple_code (stmt) != GIMPLE_PHI)
      {
!       FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_VIRTUAL_USES)
  	{
  	  tree use = USE_FROM_PTR (use_p);
  
--- 589,595 ----
  
    if (gimple_code (stmt) != GIMPLE_PHI)
      {
!       if ((use_p = gimple_vuse_op (stmt)) != NULL_USE_OPERAND_P)
  	{
  	  tree use = USE_FROM_PTR (use_p);
  
Index: gcc/tree-ssa-dse.c
===================================================================
*** gcc/tree-ssa-dse.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-dse.c	2009-01-19 14:30:25.000000000 +0100
*************** dse_optimize_stmt (struct dom_walk_data
*** 256,262 ****
  
    /* If this statement has no virtual defs, then there is nothing
       to do.  */
!   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF))
      return;
  
    /* We know we have virtual definitions.  If this is a GIMPLE_ASSIGN
--- 256,262 ----
  
    /* If this statement has no virtual defs, then there is nothing
       to do.  */
!   if (!gimple_vdef (stmt))
      return;
  
    /* We know we have virtual definitions.  If this is a GIMPLE_ASSIGN
Index: gcc/tree-ssa-ccp.c
===================================================================
*** gcc/tree-ssa-ccp.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-ccp.c	2009-01-19 14:30:25.000000000 +0100
*************** surely_varying_stmt_p (gimple stmt)
*** 598,604 ****
      }
  
    /* Any other store operation is not interesting.  */
!   else if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
      return true;
  
    /* Anything other than assignments and conditional jumps are not
--- 598,604 ----
      }
  
    /* Any other store operation is not interesting.  */
!   else if (gimple_vdef (stmt))
      return true;
  
    /* Anything other than assignments and conditional jumps are not
*************** gimplify_and_update_call_from_tree (gimp
*** 3166,3172 ****
    else
      {
        new_stmt = gimple_build_assign (lhs, tmp);
-       copy_virtual_operands (new_stmt, stmt);
        move_ssa_defining_stmt_for_defs (new_stmt, stmt);
      }
  
--- 3166,3171 ----
Index: gcc/tree-ssa-dom.c
===================================================================
*** gcc/tree-ssa-dom.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-dom.c	2009-01-19 14:30:25.000000000 +0100
*************** eliminate_redundant_computations (gimple
*** 1841,1847 ****
    if (! def
        || TREE_CODE (def) != SSA_NAME
        || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def)
!       || !ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF)
        /* Do not record equivalences for increments of ivs.  This would create
  	 overlapping live ranges for a very questionable gain.  */
        || simple_iv_increment_p (stmt))
--- 1841,1847 ----
    if (! def
        || TREE_CODE (def) != SSA_NAME
        || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def)
!       || gimple_vdef (stmt)
        /* Do not record equivalences for increments of ivs.  This would create
  	 overlapping live ranges for a very questionable gain.  */
        || simple_iv_increment_p (stmt))
*************** record_equivalences_from_stmt (gimple st
*** 2021,2027 ****
        else
          new_stmt = gimple_build_assign (rhs, lhs);
  
!       create_ssa_artificial_load_stmt (new_stmt, stmt, true);
  
        /* Finally enter the statement into the available expression
  	 table.  */
--- 2021,2027 ----
        else
          new_stmt = gimple_build_assign (rhs, lhs);
  
!       gimple_set_vuse (new_stmt, gimple_vdef (stmt));
  
        /* Finally enter the statement into the available expression
  	 table.  */
*************** avail_expr_hash (const void *p)
*** 2405,2411 ****
    gimple stmt = ((const struct expr_hash_elt *)p)->stmt;
    const struct hashable_expr *expr = &((const struct expr_hash_elt *)p)->expr;
    tree vuse;
-   ssa_op_iter iter;
    hashval_t val = 0;
  
    val = iterative_hash_hashable_expr (expr, val);
--- 2405,2410 ----
*************** avail_expr_hash (const void *p)
*** 2416,2426 ****
    if (!stmt)
      return val;
  
!   /* Add the SSA version numbers of every vuse operand.  This is important
       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.  */
!   FOR_EACH_SSA_TREE_OPERAND (vuse, stmt, iter, SSA_OP_VUSE)
      val = iterative_hash_expr (vuse, val);
  
    return val;
--- 2415,2425 ----
    if (!stmt)
      return val;
  
!   /* Add the SSA version numbers of the vuse operand.  This is important
       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.  */
!   if ((vuse = gimple_vuse (stmt)))
      val = iterative_hash_expr (vuse, val);
  
    return val;
*************** avail_expr_eq (const void *p1, const voi
*** 2462,2469 ****
        && types_compatible_p (expr1->type, expr2->type))
      {
        /* Note that STMT1 and/or STMT2 may be NULL.  */
!       bool ret = compare_ssa_operands_equal (stmt1, stmt2, SSA_OP_VUSE);
!       return ret;
      }
  
    return false;
--- 2461,2468 ----
        && types_compatible_p (expr1->type, expr2->type))
      {
        /* Note that STMT1 and/or STMT2 may be NULL.  */
!       return ((stmt1 ? gimple_vuse (stmt1) : NULL_TREE)
! 	      == (stmt2 ? gimple_vuse (stmt2) : NULL_TREE));
      }
  
    return false;
Index: gcc/tree-ssa-propagate.c
===================================================================
*** gcc/tree-ssa-propagate.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-propagate.c	2009-01-19 14:30:25.000000000 +0100
*************** update_call_from_tree (gimple_stmt_itera
*** 730,736 ****
  
        new_stmt = gimple_build_call_vec (fn, args);
        gimple_call_set_lhs (new_stmt, lhs);
-       copy_virtual_operands (new_stmt, stmt);
        move_ssa_defining_stmt_for_defs (new_stmt, stmt);
        gimple_set_location (new_stmt, gimple_location (stmt));
        gsi_replace (si_p, new_stmt, false);
--- 730,735 ----
*************** update_call_from_tree (gimple_stmt_itera
*** 750,756 ****
               Introduce a new GIMPLE_ASSIGN statement.  */
            STRIP_USELESS_TYPE_CONVERSION (expr);
            new_stmt = gimple_build_assign (lhs, expr);
-           copy_virtual_operands (new_stmt, stmt);
            move_ssa_defining_stmt_for_defs (new_stmt, stmt);
          }
        else if (!TREE_SIDE_EFFECTS (expr))
--- 749,754 ----
*************** update_call_from_tree (gimple_stmt_itera
*** 771,777 ****
            add_referenced_var (lhs);
            lhs = make_ssa_name (lhs, new_stmt);
            gimple_assign_set_lhs (new_stmt, lhs);
!           copy_virtual_operands (new_stmt, stmt);
            move_ssa_defining_stmt_for_defs (new_stmt, stmt);
          }
        gimple_set_location (new_stmt, gimple_location (stmt));
--- 769,776 ----
            add_referenced_var (lhs);
            lhs = make_ssa_name (lhs, new_stmt);
            gimple_assign_set_lhs (new_stmt, lhs);
! 	  gimple_set_vuse (new_stmt, gimple_vuse (stmt));
! 	  gimple_set_vdef (new_stmt, gimple_vdef (stmt));
            move_ssa_defining_stmt_for_defs (new_stmt, stmt);
          }
        gimple_set_location (new_stmt, gimple_location (stmt));
*************** stmt_makes_single_load (gimple stmt)
*** 842,848 ****
        != GIMPLE_SINGLE_RHS)
      return false;
  
!   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF|SSA_OP_VUSE))
      return false;
  
    rhs = gimple_assign_rhs1 (stmt);
--- 841,847 ----
        != GIMPLE_SINGLE_RHS)
      return false;
  
!   if (!gimple_vuse (stmt))
      return false;
  
    rhs = gimple_assign_rhs1 (stmt);
*************** stmt_makes_single_store (gimple stmt)
*** 867,873 ****
        && gimple_code (stmt) != GIMPLE_CALL)
      return false;
  
!   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF))
      return false;
  
    lhs = gimple_get_lhs (stmt);
--- 866,872 ----
        && gimple_code (stmt) != GIMPLE_CALL)
      return false;
  
!   if (!gimple_vdef (stmt))
      return false;
  
    lhs = gimple_get_lhs (stmt);
Index: gcc/tree-ssa-sink.c
===================================================================
*** gcc/tree-ssa-sink.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-sink.c	2009-01-19 14:30:25.000000000 +0100
*************** is_hidden_global_store (gimple stmt)
*** 139,145 ****
    /* Check virtual definitions.  If we get here, the only virtual
       definitions we should see are those generated by assignment or call
       statements.  */
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
      {
        tree lhs;
  
--- 139,145 ----
    /* Check virtual definitions.  If we get here, the only virtual
       definitions we should see are those generated by assignment or call
       statements.  */
!   if (gimple_vdef (stmt))
      {
        tree lhs;
  
*************** statement_sink_location (gimple stmt, ba
*** 311,317 ****
        || code == FILTER_EXPR
        || is_hidden_global_store (stmt)
        || gimple_has_volatile_ops (stmt)
!       || !ZERO_SSA_OPERANDS (stmt, SSA_OP_VUSE))
      return false;
    
    FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, iter, SSA_OP_ALL_DEFS)
--- 311,317 ----
        || code == FILTER_EXPR
        || is_hidden_global_store (stmt)
        || gimple_has_volatile_ops (stmt)
!       || gimple_vuse (stmt))
      return false;
    
    FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, iter, SSA_OP_ALL_DEFS)
Index: gcc/tree-ssa-loop-ivcanon.c
===================================================================
*** gcc/tree-ssa-loop-ivcanon.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-loop-ivcanon.c	2009-01-19 14:30:25.000000000 +0100
*************** empty_loop_p (struct loop *loop)
*** 442,448 ****
  	{
  	  gimple stmt = gsi_stmt (gsi);
  
! 	  if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS)
  	      || gimple_has_volatile_ops (stmt))
  	    {
  	      free (body);
--- 442,448 ----
  	{
  	  gimple stmt = gsi_stmt (gsi);
  
! 	  if (gimple_vdef (stmt)
  	      || gimple_has_volatile_ops (stmt))
  	    {
  	      free (body);
Index: gcc/tree-ssa-ifcombine.c
===================================================================
*** gcc/tree-ssa-ifcombine.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-ifcombine.c	2009-01-19 14:30:25.000000000 +0100
*************** bb_no_side_effects_p (basic_block bb)
*** 108,114 ****
        gimple stmt = gsi_stmt (gsi);
  
        if (gimple_has_volatile_ops (stmt)
! 	  || !ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
  	return false;
      }
  
--- 108,114 ----
        gimple stmt = gsi_stmt (gsi);
  
        if (gimple_has_volatile_ops (stmt)
! 	  || gimple_vuse (stmt))
  	return false;
      }
  
Index: gcc/gimple-pretty-print.c
===================================================================
*** gcc/gimple-pretty-print.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/gimple-pretty-print.c	2009-01-19 14:30:25.000000000 +0100
*************** dump_gimple_cdt (pretty_printer *buffer,
*** 1379,1387 ****
  static void
  dump_gimple_mem_ops (pretty_printer *buffer, gimple gs, int spc, int flags)
  {
!   struct voptype_d *vdefs;
!   struct voptype_d *vuses;
!   int i, n;
  
    if (!ssa_operands_active () || !gimple_references_memory_p (gs))
      return;
--- 1379,1386 ----
  static void
  dump_gimple_mem_ops (pretty_printer *buffer, gimple gs, int spc, int flags)
  {
!   tree vdef = gimple_vdef (gs);
!   tree vuse = gimple_vuse (gs);
  
    if (!ssa_operands_active () || !gimple_references_memory_p (gs))
      return;
*************** dump_gimple_mem_ops (pretty_printer *buf
*** 1390,1397 ****
       contain symbol information (this happens before aliases have been
       computed).  */
    if ((flags & TDF_MEMSYMS)
!       && gimple_vuse_ops (gs) == NULL
!       && gimple_vdef_ops (gs) == NULL)
      {
        if (gimple_loaded_syms (gs))
  	{
--- 1389,1396 ----
       contain symbol information (this happens before aliases have been
       computed).  */
    if ((flags & TDF_MEMSYMS)
!       && vuse == NULL_TREE
!       && vdef == NULL_TREE)
      {
        if (gimple_loaded_syms (gs))
  	{
*************** dump_gimple_mem_ops (pretty_printer *buf
*** 1410,1459 ****
        return;
      }
  
!   vuses = gimple_vuse_ops (gs);
!   while (vuses)
      {
!       pp_string (buffer, "# VUSE <");
! 
!       n = VUSE_NUM (vuses);
!       for (i = 0; i < n; i++)
! 	{
! 	  dump_generic_node (buffer, VUSE_OP (vuses, i), spc + 2, flags, false);
! 	  if (i < n - 1)
! 	    pp_string (buffer, ", ");
! 	}
! 
        pp_character (buffer, '>');
  
!       if (flags & TDF_MEMSYMS)
! 	dump_symbols (buffer, gimple_loaded_syms (gs), flags);
  
        newline_and_indent (buffer, spc);
-       vuses = vuses->next;
      }
! 
!   vdefs = gimple_vdef_ops (gs);
!   while (vdefs)
      {
!       pp_string (buffer, "# ");
!       dump_generic_node (buffer, VDEF_RESULT (vdefs), spc + 2, flags, false);
!       pp_string (buffer, " = VDEF <");
! 
!       n = VDEF_NUM (vdefs);
!       for (i = 0; i < n; i++)
! 	{
! 	  dump_generic_node (buffer, VDEF_OP (vdefs, i), spc + 2, flags, 0);
! 	  if (i < n - 1)
! 	    pp_string (buffer, ", ");
! 	}
! 
        pp_character (buffer, '>');
  
!       if ((flags & TDF_MEMSYMS) && vdefs->next == NULL)
! 	dump_symbols (buffer, gimple_stored_syms (gs), flags);
  
        newline_and_indent (buffer, spc);
-       vdefs = vdefs->next;
      }
  }
  
--- 1409,1437 ----
        return;
      }
  
!   if (vdef != NULL_TREE)
      {
!       pp_string (buffer, "# ");
!       dump_generic_node (buffer, vdef, spc + 2, flags, false);
!       pp_string (buffer, " = VDEF <");
!       dump_generic_node (buffer, vuse, spc + 2, flags, false);
        pp_character (buffer, '>');
  
!       if ((flags & TDF_MEMSYMS))
! 	dump_symbols (buffer, gimple_stored_syms (gs), flags);
  
        newline_and_indent (buffer, spc);
      }
!   else if (vuse != NULL_TREE)
      {
!       pp_string (buffer, "# VUSE <");
!       dump_generic_node (buffer, vuse, spc + 2, flags, false);
        pp_character (buffer, '>');
  
!       if (flags & TDF_MEMSYMS)
! 	dump_symbols (buffer, gimple_loaded_syms (gs), flags);
  
        newline_and_indent (buffer, spc);
      }
  }
  
Index: gcc/tree-data-ref.c
===================================================================
*** gcc/tree-data-ref.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-data-ref.c	2009-01-19 14:30:25.000000000 +0100
*************** get_references_in_stmt (gimple stmt, VEC
*** 4016,4022 ****
  	  && gimple_asm_volatile_p (stmt)))
      clobbers_memory = true;
  
!   if (ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
      return clobbers_memory;
  
    if (stmt_code == GIMPLE_ASSIGN)
--- 4016,4022 ----
  	  && gimple_asm_volatile_p (stmt)))
      clobbers_memory = true;
  
!   if (!gimple_vuse (stmt))
      return clobbers_memory;
  
    if (stmt_code == GIMPLE_ASSIGN)
*************** stores_from_loop (struct loop *loop, VEC
*** 4896,4902 ****
        gimple_stmt_iterator bsi;
  
        for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
! 	if (!ZERO_SSA_OPERANDS (gsi_stmt (bsi), SSA_OP_VDEF))
  	  VEC_safe_push (gimple, heap, *stmts, gsi_stmt (bsi));
      }
  
--- 4896,4902 ----
        gimple_stmt_iterator bsi;
  
        for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
! 	if (gimple_vdef (gsi_stmt (bsi)))
  	  VEC_safe_push (gimple, heap, *stmts, gsi_stmt (bsi));
      }
  
Index: gcc/tree-vect-analyze.c
===================================================================
*** gcc/tree-vect-analyze.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-vect-analyze.c	2009-01-19 14:30:25.000000000 +0100
*************** vect_stmt_relevant_p (gimple stmt, loop_
*** 3792,3798 ****
  
    /* changing memory.  */
    if (gimple_code (stmt) != GIMPLE_PHI)
!     if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
        {
  	if (vect_print_dump_info (REPORT_DETAILS))
  	  fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
--- 3792,3798 ----
  
    /* changing memory.  */
    if (gimple_code (stmt) != GIMPLE_PHI)
!     if (gimple_vdef (stmt))
        {
  	if (vect_print_dump_info (REPORT_DETAILS))
  	  fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs.");
Index: gcc/tree-ssa-coalesce.c
===================================================================
*** gcc/tree-ssa-coalesce.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-coalesce.c	2009-01-19 14:30:25.000000000 +0100
*************** create_outofssa_var_map (coalesce_list_p
*** 1114,1126 ****
  	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, (SSA_OP_DEF|SSA_OP_USE))
  	    bitmap_set_bit (used_in_real_ops, DECL_UID (SSA_NAME_VAR (var)));
  
! 	  /* Validate that virtual ops don't get used in funny ways.  */
! 	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_VIRTUALS)
! 	    {
! 	      bitmap_set_bit (used_in_virtual_ops, 
! 			      DECL_UID (SSA_NAME_VAR (var)));
! 	    }
! 
  #endif /* ENABLE_CHECKING */
  	}
      }
--- 1114,1124 ----
  	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, (SSA_OP_DEF|SSA_OP_USE))
  	    bitmap_set_bit (used_in_real_ops, DECL_UID (SSA_NAME_VAR (var)));
  
! 	  /* Validate that virtual ops don't get used in funny ways.
! 	     ???  This verifying is now quite useless.  Checking that
! 	     the gimple VOP is not used in a real operand would be enough.  */
! 	  bitmap_set_bit (used_in_virtual_ops, 
! 			  DECL_UID (gimple_vop (cfun)));
  #endif /* ENABLE_CHECKING */
  	}
      }
Index: gcc/tree-dfa.c
===================================================================
*** gcc/tree-dfa.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-dfa.c	2009-01-19 14:30:25.000000000 +0100
*************** collect_dfa_stats (struct dfa_stats_d *d
*** 464,471 ****
  	  gimple stmt = gsi_stmt (si);
  	  dfa_stats_p->num_defs += NUM_SSA_OPERANDS (stmt, SSA_OP_DEF);
  	  dfa_stats_p->num_uses += NUM_SSA_OPERANDS (stmt, SSA_OP_USE);
! 	  dfa_stats_p->num_vdefs += NUM_SSA_OPERANDS (stmt, SSA_OP_VDEF);
! 	  dfa_stats_p->num_vuses += NUM_SSA_OPERANDS (stmt, SSA_OP_VUSE);
  	}
      }
  }
--- 464,471 ----
  	  gimple stmt = gsi_stmt (si);
  	  dfa_stats_p->num_defs += NUM_SSA_OPERANDS (stmt, SSA_OP_DEF);
  	  dfa_stats_p->num_uses += NUM_SSA_OPERANDS (stmt, SSA_OP_USE);
! 	  dfa_stats_p->num_vdefs += gimple_vdef (stmt) ? 1 : 0;
! 	  dfa_stats_p->num_vuses += gimple_vuse (stmt) ? 1 : 0;
  	}
      }
  }
Index: gcc/graphite.c
===================================================================
*** gcc/graphite.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/graphite.c	2009-01-19 14:30:25.000000000 +0100
*************** rename_variables_in_stmt (gimple stmt, h
*** 4054,4060 ****
    ssa_op_iter iter;
    use_operand_p use_p;
  
!   FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
      {
        tree use = USE_FROM_PTR (use_p);
        tree new_name = get_new_name_from_old_name (map, use);
--- 4054,4060 ----
    ssa_op_iter iter;
    use_operand_p use_p;
  
!   FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
      {
        tree use = USE_FROM_PTR (use_p);
        tree new_name = get_new_name_from_old_name (map, use);
*************** graphite_copy_stmts_from_block (basic_bl
*** 4351,4357 ****
  	 operands.  */
        copy = gimple_copy (stmt);
        gsi_insert_after (&gsi_tgt, copy, GSI_NEW_STMT);
!       mark_symbols_for_renaming (copy);
  
        region = lookup_stmt_eh_region (stmt);
        if (region >= 0)
--- 4351,4357 ----
  	 operands.  */
        copy = gimple_copy (stmt);
        gsi_insert_after (&gsi_tgt, copy, GSI_NEW_STMT);
!       mark_sym_for_renaming (gimple_vop (cfun));
  
        region = lookup_stmt_eh_region (stmt);
        if (region >= 0)
*************** graphite_copy_stmts_from_block (basic_bl
*** 4360,4366 ****
  
        /* Create new names for all the definitions created by COPY and
  	 add replacement mappings for each new name.  */
!       FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_DEF)
  	{
  	  tree old_name = DEF_FROM_PTR (def_p);
  	  tree new_name = create_new_def_for (old_name, copy, def_p);
--- 4360,4366 ----
  
        /* Create new names for all the definitions created by COPY and
  	 add replacement mappings for each new name.  */
!       FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_ALL_DEFS)
  	{
  	  tree old_name = DEF_FROM_PTR (def_p);
  	  tree new_name = create_new_def_for (old_name, copy, def_p);
*************** translate_clast (scop_p scop, struct loo
*** 4581,4588 ****
  					       context_loop, next_e, map);
        htab_delete (map);
        loop_iv_stack_remove_constants (ivstack);
-       update_ssa (TODO_update_ssa);
        recompute_all_dominators ();
        graphite_verify ();
        return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
      }
--- 4581,4588 ----
  					       context_loop, next_e, map);
        htab_delete (map);
        loop_iv_stack_remove_constants (ivstack);
        recompute_all_dominators ();
+       update_ssa (TODO_update_ssa);
        graphite_verify ();
        return translate_clast (scop, context_loop, stmt->next, next_e, ivstack);
      }
Index: gcc/tree-sra.c
===================================================================
*** gcc/tree-sra.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-sra.c	2009-01-19 14:30:25.000000000 +0100
*************** extern void debug_sra_elt_name (struct s
*** 210,216 ****
  static tree generate_element_ref (struct sra_elt *);
  static gimple_seq sra_build_assignment (tree dst, tree src);
  static void mark_all_v_defs_seq (gimple_seq);
- static void mark_all_v_defs_stmt (gimple);
  
  
  /* Return true if DECL is an SRA candidate.  */
--- 210,215 ----
*************** decide_instantiations (void)
*** 2014,2040 ****
  
  /* Phase Four: Update the function to match the replacements created.  */
  
- /* Mark all the variables in VDEF/VUSE operators for STMT for
-    renaming. This becomes necessary when we modify all of a
-    non-scalar.  */
- 
- static void
- mark_all_v_defs_stmt (gimple stmt)
- {
-   tree sym;
-   ssa_op_iter iter;
- 
-   update_stmt_if_modified (stmt);
- 
-   FOR_EACH_SSA_TREE_OPERAND (sym, stmt, iter, SSA_OP_ALL_VIRTUALS)
-     {
-       if (TREE_CODE (sym) == SSA_NAME)
- 	sym = SSA_NAME_VAR (sym);
-       mark_sym_for_renaming (sym);
-     }
- }
- 
- 
  /* Mark all the variables in virtual operands in all the statements in
     LIST for renaming.  */
  
--- 2013,2018 ----
*************** mark_all_v_defs_seq (gimple_seq seq)
*** 2044,2050 ****
    gimple_stmt_iterator gsi;
  
    for (gsi = gsi_start (seq); !gsi_end_p (gsi); gsi_next (&gsi))
!     mark_all_v_defs_stmt (gsi_stmt (gsi));
  }
  
  /* Mark every replacement under ELT with TREE_NO_WARNING.  */
--- 2022,2028 ----
    gimple_stmt_iterator gsi;
  
    for (gsi = gsi_start (seq); !gsi_end_p (gsi); gsi_next (&gsi))
!     update_stmt_if_modified (gsi_stmt (gsi));
  }
  
  /* Mark every replacement under ELT with TREE_NO_WARNING.  */
*************** static void
*** 2869,2874 ****
--- 2847,2853 ----
  sra_replace (gimple_stmt_iterator *gsi, gimple_seq seq)
  {
    sra_insert_before (gsi, seq);
+   unlink_stmt_vdef (gsi_stmt (*gsi));
    gsi_remove (gsi, false);
    if (gsi_end_p (*gsi))
      *gsi = gsi_last (gsi_seq (*gsi));
*************** scalarize_use (struct sra_elt *elt, tree
*** 3144,3150 ****
  	  replacement = tmp;
  	}
        if (is_output)
! 	  mark_all_v_defs_stmt (stmt);
        *expr_p = REPLDUP (replacement);
        update_stmt (stmt);
      }
--- 3123,3129 ----
  	  replacement = tmp;
  	}
        if (is_output)
! 	  update_stmt_if_modified (stmt);
        *expr_p = REPLDUP (replacement);
        update_stmt (stmt);
      }
*************** scalarize_copy (struct sra_elt *lhs_elt,
*** 3364,3370 ****
  	 original block copy statement.  */
  
        stmt = gsi_stmt (*gsi);
!       mark_all_v_defs_stmt (stmt);
  
        seq = NULL;
        generate_element_copy (lhs_elt, rhs_elt, &seq);
--- 3343,3349 ----
  	 original block copy statement.  */
  
        stmt = gsi_stmt (*gsi);
!       update_stmt_if_modified (stmt);
  
        seq = NULL;
        generate_element_copy (lhs_elt, rhs_elt, &seq);
*************** scalarize_init (struct sra_elt *lhs_elt,
*** 3431,3437 ****
        /* The LHS is fully instantiated.  The list of initializations
  	 replaces the original structure assignment.  */
        gcc_assert (seq);
!       mark_all_v_defs_stmt (gsi_stmt (*gsi));
        mark_all_v_defs_seq (seq);
        sra_replace (gsi, seq);
      }
--- 3410,3416 ----
        /* The LHS is fully instantiated.  The list of initializations
  	 replaces the original structure assignment.  */
        gcc_assert (seq);
!       update_stmt_if_modified (gsi_stmt (*gsi));
        mark_all_v_defs_seq (seq);
        sra_replace (gsi, seq);
      }
*************** scalarize_ldst (struct sra_elt *elt, tre
*** 3482,3488 ****
        gimple_seq seq = NULL;
        gimple stmt = gsi_stmt (*gsi);
  
!       mark_all_v_defs_stmt (stmt);
        generate_copy_inout (elt, is_output, other, &seq);
        gcc_assert (seq);
        mark_all_v_defs_seq (seq);
--- 3461,3467 ----
        gimple_seq seq = NULL;
        gimple stmt = gsi_stmt (*gsi);
  
!       update_stmt_if_modified (stmt);
        generate_copy_inout (elt, is_output, other, &seq);
        gcc_assert (seq);
        mark_all_v_defs_seq (seq);
Index: gcc/tree-predcom.c
===================================================================
*** gcc/tree-predcom.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-predcom.c	2009-01-19 14:30:25.000000000 +0100
*************** get_init_expr (chain_p chain, unsigned i
*** 1423,1429 ****
  void
  mark_virtual_ops_for_renaming (gimple stmt)
  {
-   ssa_op_iter iter;
    tree var;
  
    if (gimple_code (stmt) == GIMPLE_PHI)
--- 1423,1428 ----
*************** mark_virtual_ops_for_renaming (gimple st
*** 1439,1462 ****
      }
  
    update_stmt (stmt);
! 
!   FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_VIRTUALS)
!     {
!       if (TREE_CODE (var) == SSA_NAME)
! 	var = SSA_NAME_VAR (var);
!       mark_sym_for_renaming (var);
!     }
! }
! 
! /* Calls mark_virtual_ops_for_renaming for all members of LIST.  */
! 
! static void
! mark_virtual_ops_for_renaming_list (gimple_seq list)
! {
!   gimple_stmt_iterator gsi;
! 
!   for (gsi = gsi_start (list); !gsi_end_p (gsi); gsi_next (&gsi))
!     mark_virtual_ops_for_renaming (gsi_stmt (gsi));
  }
  
  /* Returns a new temporary variable used for the I-th variable carrying
--- 1438,1445 ----
      }
  
    update_stmt (stmt);
!   if (gimple_vuse (stmt))
!     mark_sym_for_renaming (gimple_vop (cfun));
  }
  
  /* Returns a new temporary variable used for the I-th variable carrying
*************** initialize_root_vars (struct loop *loop,
*** 1525,1534 ****
  
        init = force_gimple_operand (init, &stmts, true, NULL_TREE);
        if (stmts)
! 	{
! 	  mark_virtual_ops_for_renaming_list (stmts);
! 	  gsi_insert_seq_on_edge_immediate (entry, stmts);
! 	}
  
        phi = create_phi_node (var, loop->header);
        SSA_NAME_DEF_STMT (var) = phi;
--- 1508,1514 ----
  
        init = force_gimple_operand (init, &stmts, true, NULL_TREE);
        if (stmts)
! 	gsi_insert_seq_on_edge_immediate (entry, stmts);
  
        phi = create_phi_node (var, loop->header);
        SSA_NAME_DEF_STMT (var) = phi;
*************** initialize_root_vars_lm (struct loop *lo
*** 1589,1598 ****
        
    init = force_gimple_operand (init, &stmts, written, NULL_TREE);
    if (stmts)
!     {
!       mark_virtual_ops_for_renaming_list (stmts);
!       gsi_insert_seq_on_edge_immediate (entry, stmts);
!     }
  
    if (written)
      {
--- 1569,1575 ----
        
    init = force_gimple_operand (init, &stmts, written, NULL_TREE);
    if (stmts)
!     gsi_insert_seq_on_edge_immediate (entry, stmts);
  
    if (written)
      {
*************** prepare_initializers_chain (struct loop
*** 2466,2475 ****
  
        init = force_gimple_operand (init, &stmts, false, NULL_TREE);
        if (stmts)
! 	{
! 	  mark_virtual_ops_for_renaming_list (stmts);
! 	  gsi_insert_seq_on_edge_immediate (entry, stmts);
! 	}
  
        VEC_replace (tree, chain->inits, i, init);
      }
--- 2443,2449 ----
  
        init = force_gimple_operand (init, &stmts, false, NULL_TREE);
        if (stmts)
! 	gsi_insert_seq_on_edge_immediate (entry, stmts);
  
        VEC_replace (tree, chain->inits, i, init);
      }
Index: gcc/tree-ssa-copy.c
===================================================================
*** gcc/tree-ssa-copy.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-copy.c	2009-01-19 14:30:25.000000000 +0100
*************** propagate_tree_value_into_stmt (gimple_s
*** 363,370 ****
  
        tree expr = NULL_TREE;
        propagate_tree_value (&expr, val);
!       new_stmt  = gimple_build_assign (gimple_call_lhs (stmt), expr);
!       copy_virtual_operands (new_stmt, stmt);
        move_ssa_defining_stmt_for_defs (new_stmt, stmt);
        gsi_replace (gsi, new_stmt, false);
      }
--- 363,369 ----
  
        tree expr = NULL_TREE;
        propagate_tree_value (&expr, val);
!       new_stmt = gimple_build_assign (gimple_call_lhs (stmt), expr);
        move_ssa_defining_stmt_for_defs (new_stmt, stmt);
        gsi_replace (gsi, new_stmt, false);
      }
*************** stmt_may_generate_copy (gimple stmt)
*** 412,418 ****
      return false;
  
    /* Statements with loads and/or stores will never generate a useful copy.  */
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
      return false;
  
    /* Otherwise, the only statements that generate useful copies are
--- 411,417 ----
      return false;
  
    /* Statements with loads and/or stores will never generate a useful copy.  */
!   if (gimple_vuse (stmt))
      return false;
  
    /* Otherwise, the only statements that generate useful copies are
Index: gcc/tree-ssa-ter.c
===================================================================
*** gcc/tree-ssa-ter.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-ter.c	2009-01-19 14:30:25.000000000 +0100
*************** is_replaceable_p (gimple stmt)
*** 412,418 ****
      return false;
  
    /* There must be no VDEFs.  */
!   if (!(ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF)))
      return false;
  
    /* Without alias info we can't move around loads.  */
--- 412,418 ----
      return false;
  
    /* There must be no VDEFs.  */
!   if (gimple_vdef (stmt))
      return false;
  
    /* Without alias info we can't move around loads.  */
*************** process_replaceable (temp_expr_table_p t
*** 504,510 ****
    tab->expr_decl_uids[version] = def_vars;
  
    /* If there are VUSES, add a dependence on virtual defs.  */
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VUSE))
      {
        make_dependent_on_partition (tab, version, VIRTUAL_PARTITION (tab));
        add_to_partition_kill_list (tab, VIRTUAL_PARTITION (tab), version);
--- 504,510 ----
    tab->expr_decl_uids[version] = def_vars;
  
    /* If there are VUSES, add a dependence on virtual defs.  */
!   if (gimple_vuse (stmt))
      {
        make_dependent_on_partition (tab, version, VIRTUAL_PARTITION (tab));
        add_to_partition_kill_list (tab, VIRTUAL_PARTITION (tab), version);
*************** find_replaceable_in_bb (temp_expr_table_
*** 639,645 ****
  
        /* A V_{MAY,MUST}_DEF kills any expression using a virtual operand,
  	 including the current stmt.  */
!       if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
          kill_virtual_exprs (tab);
      }
  }
--- 639,645 ----
  
        /* A V_{MAY,MUST}_DEF kills any expression using a virtual operand,
  	 including the current stmt.  */
!       if (gimple_vdef (stmt))
          kill_virtual_exprs (tab);
      }
  }
Index: gcc/tree-ssa.c
===================================================================
*** gcc/tree-ssa.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa.c	2009-01-19 14:30:25.000000000 +0100
*************** verify_ssa (bool check_modified_stmt)
*** 589,594 ****
--- 589,595 ----
  	{
  	  gimple stmt = gsi_stmt (gsi);
  	  use_operand_p use_p;
+ 	  bool has_err;
  
  	  if (check_modified_stmt && gimple_modified_p (stmt))
  	    {
*************** verify_ssa (bool check_modified_stmt)
*** 608,614 ****
  
  	      if (base_address
  		  && SSA_VAR_P (base_address)
! 		  && ZERO_SSA_OPERANDS (stmt, SSA_OP_VDEF))
  		{
  		  error ("statement makes a memory store, but has no VDEFS");
  		  print_gimple_stmt (stderr, stmt, 0, TDF_VOPS);
--- 609,615 ----
  
  	      if (base_address
  		  && SSA_VAR_P (base_address)
! 		  && !gimple_vdef (stmt))
  		{
  		  error ("statement makes a memory store, but has no VDEFS");
  		  print_gimple_stmt (stderr, stmt, 0, TDF_VOPS);
*************** verify_ssa (bool check_modified_stmt)
*** 616,629 ****
  		}
  	    }
  
! 	  FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_ALL_VIRTUALS)
  	    {
! 	      if (verify_ssa_name (op, true))
  		{
! 		  error ("in statement");
! 		  print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
! 		  goto err;
  		}
  	    }
  
  	  FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE|SSA_OP_DEF)
--- 617,658 ----
  		}
  	    }
  
! 	  /* Verify the single virtual operand and its constraints.  */
! 	  has_err = false;
! 	  if (gimple_vdef (stmt))
  	    {
! 	      if (gimple_vdef_op (stmt) == NULL_DEF_OPERAND_P)
  		{
! 		  error ("statement has VDEF operand not in defs list");
! 		  has_err = true;
! 		}
! 	      if (!gimple_vuse (stmt))
! 		{
! 		  error ("statement has VDEF but no VUSE operand");
! 		  has_err = true;
! 		}
! 	      else if (SSA_NAME_VAR (gimple_vdef (stmt))
! 		       != SSA_NAME_VAR (gimple_vuse (stmt)))
! 		{
! 		  error ("VDEF and VUSE do not use the same symbol");
! 		  has_err = true;
  		}
+ 	      has_err |= verify_ssa_name (gimple_vdef (stmt), true);
+ 	    }
+ 	  if (gimple_vuse (stmt))
+ 	    {
+ 	      if  (gimple_vuse_op (stmt) == NULL_USE_OPERAND_P)
+ 		{
+ 		  error ("statement has VUSE operand not in usess list");
+ 		  has_err = true;
+ 		}
+ 	      has_err |= verify_ssa_name (gimple_vuse (stmt), true);
+ 	    }
+ 	  if (has_err)
+ 	    {
+ 	      error ("in statement");
+ 	      print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ 	      goto err;
  	    }
  
  	  FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE|SSA_OP_DEF)
*************** delete_tree_ssa (void)
*** 782,789 ****
  
  	  if (gimple_has_mem_ops (stmt))
  	    {
! 	      gimple_set_vdef_ops (stmt, NULL);
! 	      gimple_set_vuse_ops (stmt, NULL);
  	      BITMAP_FREE (stmt->gsmem.membase.stores);
  	      BITMAP_FREE (stmt->gsmem.membase.loads);
  	    }
--- 811,818 ----
  
  	  if (gimple_has_mem_ops (stmt))
  	    {
! 	      gimple_set_vdef (stmt, NULL_TREE);
! 	      gimple_set_vuse (stmt, NULL_TREE);
  	      BITMAP_FREE (stmt->gsmem.membase.stores);
  	      BITMAP_FREE (stmt->gsmem.membase.loads);
  	    }
*************** warn_uninitialized_var (tree *tp, int *w
*** 1254,1260 ****
  	if (data->stmt == NULL)
  	  return NULL_TREE;
  
! 	vuse = SINGLE_SSA_USE_OPERAND (data->stmt, SSA_OP_VUSE);
  	if (vuse == NULL_USE_OPERAND_P)
  	    return NULL_TREE;
  
--- 1283,1289 ----
  	if (data->stmt == NULL)
  	  return NULL_TREE;
  
! 	vuse = gimple_vuse_op (data->stmt);
  	if (vuse == NULL_USE_OPERAND_P)
  	    return NULL_TREE;
  
Index: gcc/tree-ssa-loop-prefetch.c
===================================================================
*** gcc/tree-ssa-loop-prefetch.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-loop-prefetch.c	2009-01-19 14:30:25.000000000 +0100
*************** gather_memory_references (struct loop *l
*** 501,507 ****
  
  	  if (gimple_code (stmt) != GIMPLE_ASSIGN)
  	    {
! 	      if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)
  		  || (is_gimple_call (stmt)
  		      && !(gimple_call_flags (stmt) & ECF_CONST)))
  		*no_other_refs = false;
--- 501,507 ----
  
  	  if (gimple_code (stmt) != GIMPLE_ASSIGN)
  	    {
! 	      if (gimple_vuse (stmt)
  		  || (is_gimple_call (stmt)
  		      && !(gimple_call_flags (stmt) & ECF_CONST)))
  		*no_other_refs = false;
Index: gcc/lambda-code.c
===================================================================
*** gcc/lambda-code.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/lambda-code.c	2009-01-19 14:30:25.000000000 +0100
*************** can_put_in_inner_loop (struct loop *inne
*** 2142,2148 ****
    use_operand_p use_p;
    
    gcc_assert (is_gimple_assign (stmt));
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS)
        || !stmt_invariant_in_loop_p (inner, stmt))
      return false;
    
--- 2142,2148 ----
    use_operand_p use_p;
    
    gcc_assert (is_gimple_assign (stmt));
!   if (gimple_vuse (stmt)
        || !stmt_invariant_in_loop_p (inner, stmt))
      return false;
    
*************** can_put_after_inner_loop (struct loop *l
*** 2167,2173 ****
    imm_use_iterator imm_iter;
    use_operand_p use_p;
  
!   if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS))
      return false;
    
    FOR_EACH_IMM_USE_FAST (use_p, imm_iter, gimple_assign_lhs (stmt))
--- 2167,2173 ----
    imm_use_iterator imm_iter;
    use_operand_p use_p;
  
!   if (gimple_vuse (stmt))
      return false;
    
    FOR_EACH_IMM_USE_FAST (use_p, imm_iter, gimple_assign_lhs (stmt))
*************** perfect_nestify (struct loop *loop,
*** 2535,2542 ****
  		 incremented when we do.  */
  	      for (bsi = gsi_start_bb (bbs[i]); !gsi_end_p (bsi);)
  		{ 
- 		  ssa_op_iter i;
- 		  tree n;
  		  gimple stmt = gsi_stmt (bsi);
  		  
  		  if (stmt == exit_condition
--- 2535,2540 ----
*************** perfect_nestify (struct loop *loop,
*** 2552,2563 ****
  		     VEC_index (tree, lbounds, 0), replacements, &firstbsi);
  
  		  gsi_move_before (&bsi, &tobsi);
! 		  
  		  /* If the statement has any virtual operands, they may
  		     need to be rewired because the original loop may
  		     still reference them.  */
! 		  FOR_EACH_SSA_TREE_OPERAND (n, stmt, i, SSA_OP_ALL_VIRTUALS)
! 		    mark_sym_for_renaming (SSA_NAME_VAR (n));
  		}
  	    }
  	  
--- 2550,2561 ----
  		     VEC_index (tree, lbounds, 0), replacements, &firstbsi);
  
  		  gsi_move_before (&bsi, &tobsi);
! 
  		  /* If the statement has any virtual operands, they may
  		     need to be rewired because the original loop may
  		     still reference them.  */
! 		  if (gimple_vuse (stmt))
! 		    mark_sym_for_renaming (gimple_vop (cfun));
  		}
  	    }
  	  
Index: gcc/tree-ssa-phiprop.c
===================================================================
*** gcc/tree-ssa-phiprop.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-phiprop.c	2009-01-19 14:30:25.000000000 +0100
*************** static bool
*** 105,116 ****
  phivn_valid_p (struct phiprop_d *phivn, tree name, basic_block bb)
  {
    gimple vop_stmt = phivn[SSA_NAME_VERSION (name)].vop_stmt;
-   ssa_op_iter ui;
    tree vuse;
  
    /* The def stmts of all virtual uses need to be post-dominated
       by bb.  */
!   FOR_EACH_SSA_TREE_OPERAND (vuse, vop_stmt, ui, SSA_OP_VUSE)
      {
        gimple use_stmt;
        imm_use_iterator ui2;
--- 105,115 ----
  phivn_valid_p (struct phiprop_d *phivn, tree name, basic_block bb)
  {
    gimple vop_stmt = phivn[SSA_NAME_VERSION (name)].vop_stmt;
    tree vuse;
  
    /* The def stmts of all virtual uses need to be post-dominated
       by bb.  */
!   if ((vuse = gimple_vuse (vop_stmt)))
      {
        gimple use_stmt;
        imm_use_iterator ui2;
*************** phivn_valid_p (struct phiprop_d *phivn,
*** 120,126 ****
  	{
  	  /* If BB does not dominate a VDEF, the value is invalid.  */
  	  if (((is_gimple_assign (use_stmt)
! 	        && !ZERO_SSA_OPERANDS (use_stmt, SSA_OP_VDEF))
  	       || gimple_code (use_stmt) == GIMPLE_PHI)
  	      && !dominated_by_p (CDI_DOMINATORS, gimple_bb (use_stmt), bb))
  	    {
--- 119,125 ----
  	{
  	  /* If BB does not dominate a VDEF, the value is invalid.  */
  	  if (((is_gimple_assign (use_stmt)
! 	        && gimple_vdef (use_stmt))
  	       || gimple_code (use_stmt) == GIMPLE_PHI)
  	      && !dominated_by_p (CDI_DOMINATORS, gimple_bb (use_stmt), bb))
  	    {
*************** propagate_with_phi (basic_block bb, gimp
*** 270,276 ****
    phi_inserted = false;
    FOR_EACH_IMM_USE_STMT (use_stmt, ui, ptr)
      {
-       ssa_op_iter ui2;
        tree vuse;
  
        /* Check whether this is a load of *ptr.  */
--- 269,274 ----
*************** propagate_with_phi (basic_block bb, gimp
*** 284,290 ****
  
        /* Check if we can move the loads.  The def stmts of all virtual uses
  	 need to be post-dominated by bb.  */
!       FOR_EACH_SSA_TREE_OPERAND (vuse, use_stmt, ui2, SSA_OP_VUSE)
  	{
  	  gimple def_stmt = SSA_NAME_DEF_STMT (vuse);
  	  if (!SSA_NAME_IS_DEFAULT_DEF (vuse)
--- 282,288 ----
  
        /* Check if we can move the loads.  The def stmts of all virtual uses
  	 need to be post-dominated by bb.  */
!       if ((vuse = gimple_vuse (use_stmt)) != NULL_TREE)
  	{
  	  gimple def_stmt = SSA_NAME_DEF_STMT (vuse);
  	  if (!SSA_NAME_IS_DEFAULT_DEF (vuse)
Index: gcc/tree-vect-transform.c
===================================================================
*** gcc/tree-vect-transform.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-vect-transform.c	2009-01-19 14:30:25.000000000 +0100
*************** vectorizable_call (gimple stmt, gimple_s
*** 3316,3322 ****
        return false;
      }
  
!   gcc_assert (ZERO_SSA_OPERANDS (stmt, SSA_OP_ALL_VIRTUALS));
  
    if (modifier == NARROW)
      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
--- 3316,3322 ----
        return false;
      }
  
!   gcc_assert (!gimple_vuse (stmt));
  
    if (modifier == NARROW)
      ncopies = LOOP_VINFO_VECT_FACTOR (loop_vinfo) / nunits_out;
*************** vect_gen_widened_results_half (enum tree
*** 3478,3485 ****
  { 
    gimple new_stmt;
    tree new_temp; 
-   tree sym; 
-   ssa_op_iter iter;
   
    /* Generate half of the widened result:  */ 
    if (code == CALL_EXPR) 
--- 3478,3483 ----
*************** vect_gen_widened_results_half (enum tree
*** 3505,3520 ****
      } 
    vect_finish_stmt_generation (stmt, new_stmt, gsi);
  
-   if (code == CALL_EXPR)
-     {
-       FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter, SSA_OP_ALL_VIRTUALS)
-         {
-           if (TREE_CODE (sym) == SSA_NAME)
-             sym = SSA_NAME_VAR (sym);
-           mark_sym_for_renaming (sym);
-         }
-     }
- 
    return new_stmt;
  }
  
--- 3503,3508 ----
*************** vectorizable_conversion (gimple stmt, gi
*** 3679,3687 ****
      case NONE:
        for (j = 0; j < ncopies; j++)
  	{
- 	  tree sym;
- 	  ssa_op_iter iter;
- 
  	  if (j == 0)
  	    vect_get_vec_defs (op0, NULL, stmt, &vec_oprnds0, NULL, slp_node); 
  	  else
--- 3667,3672 ----
*************** vectorizable_conversion (gimple stmt, gi
*** 3696,3708 ****
  	      new_temp = make_ssa_name (vec_dest, new_stmt);
  	      gimple_call_set_lhs (new_stmt, new_temp);
  	      vect_finish_stmt_generation (stmt, new_stmt, gsi);
- 	      FOR_EACH_SSA_TREE_OPERAND (sym, new_stmt, iter, 
- 					 SSA_OP_ALL_VIRTUALS)
- 		{
- 		  if (TREE_CODE (sym) == SSA_NAME)
- 		    sym = SSA_NAME_VAR (sym);
- 		  mark_sym_for_renaming (sym);
- 		}
  	      if (slp_node)
  		VEC_quick_push (gimple, SLP_TREE_VEC_STMTS (slp_node), new_stmt);
  	    }
--- 3681,3686 ----
*************** vect_create_mask_and_perm (gimple stmt,
*** 6005,6012 ****
    stmt_vec_info next_stmt_info;
    int i, group_size, stride, dr_chain_size;
    tree first_vec, second_vec, data_ref;
-   tree sym;
-   ssa_op_iter iter;
    VEC (tree, heap) *params = NULL;
  
    /* Create a vector mask.  */
--- 5983,5988 ----
*************** vect_create_mask_and_perm (gimple stmt,
*** 6044,6055 ****
        data_ref = make_ssa_name (perm_dest, perm_stmt);
        gimple_call_set_lhs (perm_stmt, data_ref);
        vect_finish_stmt_generation (stmt, perm_stmt, gsi);
-       FOR_EACH_SSA_TREE_OPERAND (sym, perm_stmt, iter, SSA_OP_ALL_VIRTUALS)
-         {
-           if (TREE_CODE (sym) == SSA_NAME)
-             sym = SSA_NAME_VAR (sym);
-           mark_sym_for_renaming (sym);
-         }
  
        /* Store the vector statement in NODE.  */ 
        VEC_replace (gimple, SLP_TREE_VEC_STMTS (node), 
--- 6020,6025 ----
*************** vectorizable_load (gimple stmt, gimple_s
*** 6638,6646 ****
  		new_stmt = gimple_build_assign (vec_dest, data_ref);
  		new_temp = make_ssa_name (vec_dest, new_stmt);
  		gimple_assign_set_lhs (new_stmt, new_temp);
  		vect_finish_stmt_generation (stmt, new_stmt, gsi);
- 		copy_virtual_operands (new_stmt, stmt);
- 		mark_symbols_for_renaming (new_stmt);
  		msq = new_temp;
  
  		bump = size_binop (MULT_EXPR, vs_minus_1,
--- 6608,6616 ----
  		new_stmt = gimple_build_assign (vec_dest, data_ref);
  		new_temp = make_ssa_name (vec_dest, new_stmt);
  		gimple_assign_set_lhs (new_stmt, new_temp);
+ 		gimple_set_vdef (new_stmt, gimple_vdef (stmt));
+ 		gimple_set_vuse (new_stmt, gimple_vuse (stmt));
  		vect_finish_stmt_generation (stmt, new_stmt, gsi);
  		msq = new_temp;
  
  		bump = size_binop (MULT_EXPR, vs_minus_1,
Index: gcc/gimple.c
===================================================================
*** gcc/gimple.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/gimple.c	2009-01-19 14:30:25.000000000 +0100
*************** gimple_copy (gimple stmt)
*** 2208,2215 ****
  
        if (gimple_has_mem_ops (stmt))
  	{
! 	  gimple_set_vdef_ops (copy, NULL);
! 	  gimple_set_vuse_ops (copy, NULL);
  	  copy->gsmem.membase.stores = NULL;
  	  copy->gsmem.membase.loads = NULL;
  	}
--- 2208,2215 ----
  
        if (gimple_has_mem_ops (stmt))
  	{
! 	  gimple_set_vdef (copy, gimple_vdef (stmt));
! 	  gimple_set_vuse (copy, gimple_vuse (stmt));
  	  copy->gsmem.membase.stores = NULL;
  	  copy->gsmem.membase.loads = NULL;
  	}
Index: gcc/tree-cfg.c
===================================================================
*** gcc/tree-cfg.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-cfg.c	2009-01-19 14:30:25.000000000 +0100
*************** gimple_duplicate_bb (basic_block bb)
*** 4949,4955 ****
  	 operands.  */
        copy = gimple_copy (stmt);
        gsi_insert_after (&gsi_tgt, copy, GSI_NEW_STMT);
-       copy_virtual_operands (copy, stmt);
        region = lookup_stmt_eh_region (stmt);
        if (region >= 0)
  	add_stmt_to_eh_region (copy, region);
--- 4949,4954 ----
Index: gcc/tree-ssa-reassoc.c
===================================================================
*** gcc/tree-ssa-reassoc.c.orig	2009-01-19 14:18:26.000000000 +0100
--- gcc/tree-ssa-reassoc.c	2009-01-19 14:30:25.000000000 +0100
*************** get_rank (tree e)
*** 242,248 ****
  	return 0;
  
        if (!is_gimple_assign (stmt)
! 	  || !ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS))
  	return bb_rank[gimple_bb (stmt)->index];
  
        /* If we already have a rank for this expression, use that.  */
--- 242,248 ----
  	return 0;
  
        if (!is_gimple_assign (stmt)
! 	  || gimple_vdef (stmt))
  	return bb_rank[gimple_bb (stmt)->index];
  
        /* If we already have a rank for this expression, use that.  */



More information about the Gcc-patches mailing list