aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-11-13 09:03:07 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-11-13 09:03:07 +0000
commite4020b28d02a00d478a3a769855ae6a8d9cc6b26 (patch)
tree8795d85f2e900a5d8c52ef2b19865109b138051a /gcc/tree-vectorizer.h
parent3f446c27195400aea98ff9c37ed2651ab54f7c03 (diff)
downloadgcc-e4020b28d02a00d478a3a769855ae6a8d9cc6b26.zip
gcc-e4020b28d02a00d478a3a769855ae6a8d9cc6b26.tar.gz
gcc-e4020b28d02a00d478a3a769855ae6a8d9cc6b26.tar.bz2
Don't assign a cost to vectorizable_assignment
vectorizable_assignment handles true SSA-to-SSA copies (which hopefully we don't see in practice) and no-op conversions that are required to maintain correct gimple, such as changes between signed and unsigned types. These cases shouldn't generate any code and so shouldn't count against either the scalar or vector costs. Later patches test this, but it seemed worth splitting out. 2019-11-13 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vect_nop_conversion_p): Declare. * tree-vect-stmts.c (vect_nop_conversion_p): New function. (vectorizable_assignment): Don't add a cost for nop conversions. * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Likewise. * tree-vect-slp.c (vect_bb_slp_scalar_cost): Likewise. From-SVN: r278122
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index e556e0e..e93ccc7 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1650,6 +1650,7 @@ extern tree vect_get_vec_def_for_stmt_copy (vec_info *, tree);
extern bool vect_transform_stmt (stmt_vec_info, gimple_stmt_iterator *,
slp_tree, slp_instance);
extern void vect_remove_stores (stmt_vec_info);
+extern bool vect_nop_conversion_p (stmt_vec_info);
extern opt_result vect_analyze_stmt (stmt_vec_info, bool *, slp_tree,
slp_instance, stmt_vector_for_cost *);
extern void vect_get_load_cost (stmt_vec_info, int, bool,