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-vect-loop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/tree-vect-loop.c') diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 3140bbb..bf49e26 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2031,8 +2031,7 @@ start_over: remove unsupported SLP instances which makes the above SLP kind detection invalid. */ unsigned old_size = LOOP_VINFO_SLP_INSTANCES (loop_vinfo).length (); - vect_slp_analyze_operations (LOOP_VINFO_SLP_INSTANCES (loop_vinfo), - LOOP_VINFO_TARGET_COST_DATA (loop_vinfo)); + vect_slp_analyze_operations (loop_vinfo); if (LOOP_VINFO_SLP_INSTANCES (loop_vinfo).length () != old_size) goto again; } -- cgit v1.1