From b0b45e582f31b496ea37a76a20b1f79b25165635 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 1 Aug 2018 14:59:35 +0000 Subject: [PATCH] [03/11] Remove vect_transform_stmt grouped_store argument Nothing now uses the grouped_store value passed back by vect_transform_stmt, so we might as well remove it. 2018-08-01 Richard Sandiford 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. From-SVN: r263216 --- gcc/ChangeLog | 9 +++++++++ gcc/tree-vect-loop.c | 5 ++--- gcc/tree-vect-slp.c | 7 +++---- gcc/tree-vect-stmts.c | 4 +--- gcc/tree-vectorizer.h | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0dd29def4e2..be6b24c0478 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-08-01 Richard Sandiford + + * 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. + 2018-08-01 Richard Sandiford * tree-vectorizer.h (vect_schedule_slp): Return void. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 607e722f9d9..29f980a3f37 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -8243,8 +8243,7 @@ vect_transform_loop_stmt (loop_vec_info loop_vinfo, stmt_vec_info stmt_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_vinfo) { 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); } } diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 30458064371..cee2c7f21a5 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -3853,7 +3853,6 @@ static void 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 node, slp_instance instance, vec 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 node, slp_instance instance, 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) diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 4869b634a60..28d5f8d165c 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9662,8 +9662,7 @@ vect_analyze_stmt (stmt_vec_info stmt_info, bool *need_to_vectorize, 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_info, gimple_stmt_iterator *gsi, 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; diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index a58cc581ccf..37833ce81ef 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1459,7 +1459,7 @@ extern tree vect_init_vector (stmt_vec_info, tree, tree, 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 *); -- 2.30.2