From 8b7e9dba2bc921c24994129bb9231caa176d6da5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 18 Sep 2017 15:50:03 +0000 Subject: Move computation of SLP_TREE_NUMBER_OF_VEC_STMTS Previously SLP_TREE_NUMBER_OF_VEC_STMTS was calculated while scheduling an SLP tree after analysis, but sometimes it can be useful to know the value during analysis too. This patch moves the calculation to vect_slp_analyze_node_operations instead. 2017-09-18 Richard Sandiford Alan Hayward David Sherwood gcc/ * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters with a vec_info *. * tree-vect-loop.c (vect_analyze_loop_operations): Update call accordingly. * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info * parameter. Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in vect_schedule_slp_instance. (vect_slp_analyze_operations): Replace parameters with a vec_info *. Update call to vect_slp_analyze_node_operations. Simplify return value. (vect_slp_analyze_bb_1): Update call accordingly. (vect_schedule_slp_instance): Remove vectorization_factor parameter. Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here. (vect_schedule_slp): Update call accordingly. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r252935 --- gcc/tree-vectorizer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 57152ee..d6753ff 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1246,8 +1246,7 @@ extern void vect_free_slp_instance (slp_instance); extern bool vect_transform_slp_perm_load (slp_tree, vec , gimple_stmt_iterator *, int, slp_instance, bool, unsigned *); -extern bool vect_slp_analyze_operations (vec slp_instances, - void *); +extern bool vect_slp_analyze_operations (vec_info *); extern bool vect_schedule_slp (vec_info *); extern bool vect_analyze_slp (vec_info *, unsigned); extern bool vect_make_slp_decision (loop_vec_info); -- cgit v1.1