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


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

Re: [03/11] Remove vect_transform_stmt grouped_store argument


On Mon, Jul 30, 2018 at 1:38 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Nothing now uses the grouped_store value passed back by
> vect_transform_stmt, so we might as well remove it.

OK.

>
> 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
>
> gcc/
>         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
>         argument.
>         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
>         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
>         (vect_transform_loop): Likewise.
>         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
>
> Index: gcc/tree-vectorizer.h
> ===================================================================
> --- gcc/tree-vectorizer.h       2018-07-30 12:32:19.366596715 +0100
> +++ gcc/tree-vectorizer.h       2018-07-30 12:32:22.718567174 +0100
> @@ -1459,7 +1459,7 @@ extern tree vect_init_vector (stmt_vec_i
>                                gimple_stmt_iterator *);
>  extern tree vect_get_vec_def_for_stmt_copy (vec_info *, tree);
>  extern bool vect_transform_stmt (stmt_vec_info, gimple_stmt_iterator *,
> -                                 bool *, slp_tree, slp_instance);
> +                                slp_tree, slp_instance);
>  extern void vect_remove_stores (stmt_vec_info);
>  extern bool vect_analyze_stmt (stmt_vec_info, bool *, slp_tree, slp_instance,
>                                stmt_vector_for_cost *);
> Index: gcc/tree-vect-stmts.c
> ===================================================================
> --- gcc/tree-vect-stmts.c       2018-07-30 12:32:09.114687014 +0100
> +++ gcc/tree-vect-stmts.c       2018-07-30 12:32:22.718567174 +0100
> @@ -9662,8 +9662,7 @@ vect_analyze_stmt (stmt_vec_info stmt_in
>
>  bool
>  vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
> -                    bool *grouped_store, slp_tree slp_node,
> -                     slp_instance slp_node_instance)
> +                    slp_tree slp_node, slp_instance slp_node_instance)
>  {
>    vec_info *vinfo = stmt_info->vinfo;
>    bool is_store = false;
> @@ -9727,7 +9726,6 @@ vect_transform_stmt (stmt_vec_info stmt_
>              last store in the chain is reached.  Store stmts before the last
>              one are skipped, and there vec_stmt_info shouldn't be freed
>              meanwhile.  */
> -         *grouped_store = true;
>           stmt_vec_info group_info = DR_GROUP_FIRST_ELEMENT (stmt_info);
>           if (DR_GROUP_STORE_COUNT (group_info) == DR_GROUP_SIZE (group_info))
>             is_store = true;
> Index: gcc/tree-vect-loop.c
> ===================================================================
> --- gcc/tree-vect-loop.c        2018-07-30 12:32:16.190624704 +0100
> +++ gcc/tree-vect-loop.c        2018-07-30 12:32:22.714567210 +0100
> @@ -8243,8 +8243,7 @@ vect_transform_loop_stmt (loop_vec_info
>    if (dump_enabled_p ())
>      dump_printf_loc (MSG_NOTE, vect_location, "transform statement.\n");
>
> -  bool grouped_store = false;
> -  if (vect_transform_stmt (stmt_info, gsi, &grouped_store, NULL, NULL))
> +  if (vect_transform_stmt (stmt_info, gsi, NULL, NULL))
>      *seen_store = stmt_info;
>  }
>
> @@ -8425,7 +8424,7 @@ vect_transform_loop (loop_vec_info loop_
>             {
>               if (dump_enabled_p ())
>                 dump_printf_loc (MSG_NOTE, vect_location, "transform phi.\n");
> -             vect_transform_stmt (stmt_info, NULL, NULL, NULL, NULL);
> +             vect_transform_stmt (stmt_info, NULL, NULL, NULL);
>             }
>         }
>
> Index: gcc/tree-vect-slp.c
> ===================================================================
> --- gcc/tree-vect-slp.c 2018-07-30 12:32:19.366596715 +0100
> +++ gcc/tree-vect-slp.c 2018-07-30 12:32:22.714567210 +0100
> @@ -3853,7 +3853,6 @@ vect_transform_slp_perm_load (slp_tree n
>  vect_schedule_slp_instance (slp_tree node, slp_instance instance,
>                             scalar_stmts_to_slp_tree_map_t *bst_map)
>  {
> -  bool grouped_store;
>    gimple_stmt_iterator si;
>    stmt_vec_info stmt_info;
>    unsigned int group_size;
> @@ -3945,11 +3944,11 @@ vect_schedule_slp_instance (slp_tree nod
>           vec<stmt_vec_info> v1;
>           unsigned j;
>           tree tmask = NULL_TREE;
> -         vect_transform_stmt (stmt_info, &si, &grouped_store, node, instance);
> +         vect_transform_stmt (stmt_info, &si, node, instance);
>           v0 = SLP_TREE_VEC_STMTS (node).copy ();
>           SLP_TREE_VEC_STMTS (node).truncate (0);
>           gimple_assign_set_rhs_code (stmt, ocode);
> -         vect_transform_stmt (stmt_info, &si, &grouped_store, node, instance);
> +         vect_transform_stmt (stmt_info, &si, node, instance);
>           gimple_assign_set_rhs_code (stmt, code0);
>           v1 = SLP_TREE_VEC_STMTS (node).copy ();
>           SLP_TREE_VEC_STMTS (node).truncate (0);
> @@ -3994,7 +3993,7 @@ vect_schedule_slp_instance (slp_tree nod
>           return;
>         }
>      }
> -  vect_transform_stmt (stmt_info, &si, &grouped_store, node, instance);
> +  vect_transform_stmt (stmt_info, &si, node, instance);
>
>    /* Restore stmt def-types.  */
>    FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)


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