aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorAndre Vieira <andre.simoesdiasvieira@arm.com>2023-06-05 17:49:03 +0100
committerAndre Vieira <andre.simoesdiasvieira@arm.com>2023-06-05 17:52:38 +0100
commitfe29963d40a721d18b5f688b9d54dd9021bfb90a (patch)
tree23fa4fe7b84beba2641df8e2c45edbcd5597fd66 /gcc/tree-vectorizer.h
parent3ad9313a2e28287aa350d9dc3ea7746d8302662d (diff)
downloadgcc-fe29963d40a721d18b5f688b9d54dd9021bfb90a.zip
gcc-fe29963d40a721d18b5f688b9d54dd9021bfb90a.tar.gz
gcc-fe29963d40a721d18b5f688b9d54dd9021bfb90a.tar.bz2
vect: Refactor to allow internal_fn's
Refactor vect-patterns to allow patterns to be internal_fns starting with widening_plus/minus patterns 2023-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com> Joel Hutton <joel.hutton@arm.com> gcc/ChangeLog: * tree-vect-patterns.cc: Add include for gimple-iterator. (vect_recog_widen_op_pattern): Refactor to use code_helper. (vect_gimple_build): New function. * tree-vect-stmts.cc (simple_integer_narrowing): Refactor to use code_helper. (vectorizable_call): Likewise. (vect_gen_widened_results_half): Likewise. (vect_create_vectorized_demotion_stmts): Likewise. (vect_create_vectorized_promotion_stmts): Likewise. (vect_create_half_widening_stmts): Likewise. (vectorizable_conversion): Likewise. (supportable_widening_operation): Likewise. (supportable_narrowing_operation): Likewise. * tree-vectorizer.h (supportable_widening_operation): Change prototype to use code_helper. (supportable_narrowing_operation): Likewise. (vect_gimple_build): New function prototype. * tree.h (code_helper::safe_as_tree_code): New function. (code_helper::safe_as_fn_code): New function.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 34552f6..1e44f85 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -2147,13 +2147,12 @@ extern bool vect_is_simple_use (vec_info *, stmt_vec_info, slp_tree,
enum vect_def_type *,
tree *, stmt_vec_info * = NULL);
extern bool vect_maybe_update_slp_op_vectype (slp_tree, tree);
-extern bool supportable_widening_operation (vec_info *,
- enum tree_code, stmt_vec_info,
- tree, tree, enum tree_code *,
- enum tree_code *, int *,
- vec<tree> *);
-extern bool supportable_narrowing_operation (enum tree_code, tree, tree,
- enum tree_code *, int *,
+extern bool supportable_widening_operation (vec_info*, code_helper,
+ stmt_vec_info, tree, tree,
+ code_helper*, code_helper*,
+ int*, vec<tree> *);
+extern bool supportable_narrowing_operation (code_helper, tree, tree,
+ code_helper *, int *,
vec<tree> *);
extern unsigned record_stmt_cost (stmt_vector_for_cost *, int,
@@ -2593,4 +2592,7 @@ vect_is_integer_truncation (stmt_vec_info stmt_info)
&& TYPE_PRECISION (lhs_type) < TYPE_PRECISION (rhs_type));
}
+/* Build a GIMPLE_ASSIGN or GIMPLE_CALL with the tree_code,
+ or internal_fn contained in ch, respectively. */
+gimple * vect_gimple_build (tree, code_helper, tree, tree = NULL_TREE);
#endif /* GCC_TREE_VECTORIZER_H */