tree-vect-transform.c (vectorizable_store): Mark necessary objects in the vectorized...
authorDiego Novillo <dnovillo@redhat.com>
Fri, 15 Apr 2005 16:18:25 +0000 (16:18 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 Apr 2005 16:18:25 +0000 (10:18 -0600)
* tree-vect-transform.c (vectorizable_store): Mark necessary
objects in the vectorized store needing renaming.  Update the
SSA graph for V_MAY_DEF operands in the original store.

From-SVN: r98189

gcc/ChangeLog
gcc/tree-vect-transform.c

index 3a9a6eb9751217d3fbe0224ce52e26674618efe2..e884a571f8edc11853ac85c85250cdbfd5bb18fb 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-15  Diego Novillo  <dnovillo@redhat.com>
+
+       * tree-vect-transform.c (vectorizable_store): Mark necessary
+       objects in the vectorized store needing renaming.  Update the
+       SSA graph for V_MAY_DEF operands in the original store.
+
 2005-04-14  Daniel Berlin <dberlin@dberlin.org>
 
        * tree-ssa-pre.c (compute_avail): It's okay to have
index 52f5de333823a6dbb42e8adfe45d023733e20f6c..e325ef80e423f93568d3660f9ff6aca633c2f49f 100644 (file)
@@ -856,8 +856,8 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
   enum machine_mode vec_mode;
   tree dummy;
   enum dr_alignment_support alignment_support_cheme;
-  v_may_def_optype v_may_defs;
-  int nv_may_defs, i;
+  ssa_op_iter iter;
+  tree def;
 
   /* Is vectorizable store? */
 
@@ -915,20 +915,16 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
   *vec_stmt = build2 (MODIFY_EXPR, vectype, data_ref, vec_oprnd1);
   vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
 
-  /* Copy the V_MAY_DEFS representing the aliasing of the original array
-     element's definition to the vector's definition then update the
-     defining statement.  The original is being deleted so the same
-     SSA_NAMEs can be used.  */
-  copy_virtual_operands (*vec_stmt, stmt);
-  v_may_defs = STMT_V_MAY_DEF_OPS (*vec_stmt);
-  nv_may_defs = NUM_V_MAY_DEFS (v_may_defs);
+  /* Mark all non-SSA variables in the statement for rewriting.  */
+  mark_new_vars_to_rename (*vec_stmt);
            
-  for (i = 0; i < nv_may_defs; i++)
-    {
-      tree ssa_name = V_MAY_DEF_RESULT (v_may_defs, i);
-      SSA_NAME_DEF_STMT (ssa_name) = *vec_stmt;
-    }
-
+  /* The new vectorized statement will have better aliasing
+     information, so some of the virtual definitions of the old
+     statement will likely disappear from the IL.  Mark them to have
+     their SSA form updated.  */
+  FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_VMAYDEF)
+    mark_sym_for_renaming (SSA_NAME_VAR (def));
   return true;
 }