From 1c5d68a677b076262c5508e6d4fbdb765cba2d2f Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 29 Nov 2019 14:47:34 +0000 Subject: Make vect_get_mask_type_for_stmt take a group size This patch makes vect_get_mask_type_for_stmt and get_mask_type_for_scalar_type take a group size instead of the SLP node, so that later patches can call it before an SLP node has been built. 2019-11-29 Richard Sandiford gcc/ * tree-vectorizer.h (get_mask_type_for_scalar_type): Replace the slp_tree parameter with a group size parameter. (vect_get_mask_type_for_stmt): Likewise. * tree-vect-stmts.c (get_mask_type_for_scalar_type): Likewise. (vect_get_mask_type_for_stmt): Likewise. * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Update call accordingly. From-SVN: r278849 --- gcc/tree-vect-slp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-vect-slp.c') diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 48aca3b..e3fd0e9 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2757,7 +2757,8 @@ vect_slp_analyze_node_operations_1 (vec_info *vinfo, slp_tree node, bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info); if (bb_vinfo && STMT_VINFO_VECTYPE (stmt_info) == boolean_type_node) { - tree vectype = vect_get_mask_type_for_stmt (stmt_info, node); + unsigned int group_size = SLP_TREE_SCALAR_STMTS (node).length (); + tree vectype = vect_get_mask_type_for_stmt (stmt_info, group_size); if (!vectype) /* vect_get_mask_type_for_stmt has already explained the failure. */ -- cgit v1.1