From ca09abcb399bcb8cddbda68c75e702cc8989a6ca Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 14 Sep 2017 16:30:54 +0000 Subject: Add a vect_worthwhile_without_simd_p helper routine The vectoriser sometimes considers lowering "vector" operations into N scalar word operations. This N needs to be fixed at compile time, so the condition guarding it needs to change when variable-lengh vectors are added. This patch puts the condition into a helper routine so that there's only one place to update. 2017-09-14 Richard Sandiford Alan Hayward David Sherwood gcc/ * tree-vectorizer.h (vect_min_worthwhile_factor): Delete. (vect_worthwhile_without_simd_p): Declare. * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function. (vectorizable_reduction): Use it. * tree-vect-stmts.c (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r252765 --- gcc/tree-vectorizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 6efcd51..3807f60 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1230,7 +1230,7 @@ extern bool vectorizable_reduction (gimple *, gimple_stmt_iterator *, extern bool vectorizable_induction (gimple *, gimple_stmt_iterator *, gimple **, slp_tree); extern tree get_initial_def_for_reduction (gimple *, tree, tree *); -extern int vect_min_worthwhile_factor (enum tree_code); +extern bool vect_worthwhile_without_simd_p (vec_info *, tree_code); extern int vect_get_known_peeling_cost (loop_vec_info, int, int *, stmt_vector_for_cost *, stmt_vector_for_cost *, -- cgit v1.1