]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Incremental changes to toT merge.
authorSameera Deshpande <sameerad@gcc.gnu.org>
Tue, 14 Feb 2017 14:47:59 +0000 (20:17 +0530)
committerSameera Deshpande <sameerad@gcc.gnu.org>
Tue, 14 Feb 2017 14:47:59 +0000 (20:17 +0530)
From-SVN: r245428

gcc/tree-vect-data-refs.c
gcc/tree-vect-unified.c
gcc/tree-vectorizer.h

index 36a57e7eca512cde6cc3ff164c19e2c042470ac8..289e19cf39cd127b3dc7aed4d39656f793b7ffb9 100644 (file)
@@ -3328,28 +3328,35 @@ bool
 vect_check_gather_scatter (gimple *stmt, loop_vec_info loop_vinfo,
                           gather_scatter_info *info)
 {
+  tree *basep, *offp, *declp;
+  int *scalep;
+  bool retval;
   struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
-  tree base;
-  bool is_read;
-  tree vec_type;
 
-  base = DR_REF (dr);
-  is_read = DR_IS_READ (dr);
-  vec_type = STMT_VINFO_VECTYPE (stmt_info);
 
-  return vect_check_gather_scatter_1 (stmt, base, is_read, loop, vec_type,
-                                      basep, offp, scalep);
+  retval = vect_check_gather_scatter_1 (stmt, DR_REF (dr), DR_IS_READ (dr),
+                                       loop, STMT_VINFO_VECTYPE (stmt_info),
+                                       basep, offp, scalep, declp);
+
+  info->decl = *declp;
+  info->base = *basep;
+  info->offset = *offp;
+  info->offset_dt = vect_unknown_def_type;
+  info->offset_vectype = NULL_TREE;
+  info->scale = *scalep;
+
+  return retval;
 }
 
 /* Check whether a non-affine read or write in stmt is suitable for gather load
    or scatter store and if so, return a builtin decl for that operation.  */
 
-tree
+bool
 vect_check_gather_scatter_1 (gimple *stmt, tree base, bool is_read,
                             struct loop *loop, tree vec_type, tree *basep,
-                            tree *offp, int *scalep)
+                            tree *offp, int *scalep, tree *declp)
 {
   HOST_WIDE_INT scale = 1, pbitpos, pbitsize;
   tree offtype = NULL_TREE;
@@ -3545,12 +3552,10 @@ vect_check_gather_scatter_1 (gimple *stmt, tree base, bool is_read,
   if (decl == NULL_TREE)
     return false;
 
-  info->decl = decl;
-  info->base = base;
-  info->offset = off;
-  info->offset_dt = vect_unknown_def_type;
-  info->offset_vectype = NULL_TREE;
-  info->scale = scale;
+  *declp = decl;
+  *basep = base;
+  *offp = off;
+  *scalep = scale;
   return true;
 }
 
index 8b6acd67db1cbf83d6f5814d49b4e19a8d4b6387..872d7d72320230804e500f9cdde9ed06a9fd3b92 100644 (file)
@@ -222,14 +222,13 @@ new_stmt_attr ()
 static struct ITER_node *
 vect_populate_iter_node_from_loop (struct loop *loop)
 {
-  tree number_of_iterations, number_of_iterationsm1;
+  tree number_of_iterations, number_of_iterationsm1, assumptions;
   basic_block *bbs;
   gcond *loop_cond, *inner_loop_cond = NULL;
   int i;
   gimple_stmt_iterator si;
 
-  if (! vect_analyze_loop_form_1 (loop, &loop_cond, &number_of_iterationsm1,
-           &number_of_iterations, &inner_loop_cond))
+  if (! vect_analyze_loop_form_1 (loop, &loop_cond, &assumptions, &number_of_iterationsm1, &number_of_iterations, &inner_loop_cond))
     return NULL;
 
   struct ITER_node * t_iter_node = new_iter_node (loop);
@@ -2067,7 +2066,7 @@ is_ptree_complete (struct ITER_node *inode)
 static bool
 create_ptree (struct ITER_node *inode)
 {
-  auto_vec<gimple *, 64> worklist;
+  vec<gimple *> worklist;
   bool is_ok;
 
   mark_probable_root_nodes (inode);
index 743b31c3d24303adfa4f72e08421a6d3968ec1f5..97e4d5e40f97b8a1eaa6f406a6774f346c050a88 100644 (file)
@@ -1134,9 +1134,8 @@ extern bool vect_analyze_data_ref_accesses (vec_info *);
 extern bool vect_prune_runtime_alias_test_list (loop_vec_info);
 extern bool vect_check_gather_scatter (gimple *, loop_vec_info,
                                       gather_scatter_info *);
-extern tree vect_check_gather_scatter_1 (gimple *, tree, bool, struct loop *,
-                                        tree, tree *, tree *, int *);
-
+extern bool vect_check_gather_scatter_1 (gimple *, tree, bool, struct loop *,
+                                        tree, tree *, tree *, int *, tree *);
 extern bool vect_analyze_data_refs (vec_info *, int *);
 extern tree vect_create_data_ref_ptr (gimple *, tree, struct loop *, tree,
                                      tree *, gimple_stmt_iterator *,
@@ -1178,7 +1177,7 @@ extern void vect_gen_vector_loop_niters (loop_vec_info, tree, tree *, bool);
 extern struct loop *vect_transform_loop (loop_vec_info);
 extern loop_vec_info vect_analyze_loop_form (struct loop *);
 extern bool vect_analyze_loop_form_1 (struct loop *, gcond **, tree *, tree *,
-                                     gcond **);
+                                     tree *, gcond **);
 extern bool vectorizable_live_operation (gimple *, gimple_stmt_iterator *,
                                         slp_tree, int, gimple **);
 extern bool vectorizable_reduction (gimple *, gimple_stmt_iterator *,