aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.c
diff options
context:
space:
mode:
authorIra Rosen <irar@il.ibm.com>2008-08-19 08:31:41 +0000
committerIra Rosen <irar@gcc.gnu.org>2008-08-19 08:31:41 +0000
commit5d59337297f9410a407e2e8e89f38ebbc9aa40df (patch)
treef4481b3ce0ab856f0a57386df3e28b42d737975d /gcc/tree-vect-patterns.c
parent45ea82c11f4e9984a8f902f1e70913d5472911d3 (diff)
downloadgcc-5d59337297f9410a407e2e8e89f38ebbc9aa40df.zip
gcc-5d59337297f9410a407e2e8e89f38ebbc9aa40df.tar.gz
gcc-5d59337297f9410a407e2e8e89f38ebbc9aa40df.tar.bz2
tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion...
* tree-vectorizer.c (supportable_widening_operation): Support multi-step conversion, return the number of steps in such conversion and the required intermediate types. (supportable_narrowing_operation): Likewise. * tree-vectorizer.h (vect_pow2): New function. (supportable_widening_operation): Change argument types. (supportable_narrowing_operation): Likewise. (vectorizable_type_promotion): Add an argument. (vectorizable_type_demotion): Likewise. * tree-vect-analyze.c (vect_analyze_operations): Call vectorizable_type_promotion and vectorizable_type_demotion with additional argument. (vect_get_and_check_slp_defs): Detect patterns. (vect_build_slp_tree): Add an argument, don't fail in case of multiple types. (vect_analyze_slp_instance): Don't fail in case of multiple types. Call vect_build_slp_tree with correct arguments. Calculate unrolling factor according to the smallest type in the loop. (vect_detect_hybrid_slp_stmts): Include statements from patterns. * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Call supportable_widening_operation with correct arguments. * tree-vect-transform.c (vect_get_slp_defs): Allocate output vector operands lists according to the number of vector statements in left or right node, if exists. (vect_gen_widened_results_half): Remove unused argument. (vectorizable_conversion): Call supportable_widening_operation, supportable_narrowing_operation, and vect_gen_widened_results_half with correct arguments. (vectorizable_assignment): Change documentation, support multiple types in SLP. (vectorizable_operation): Likewise. (vect_get_loop_based_defs): New function. (vect_create_vectorized_demotion_stmts): Likewise. (vectorizable_type_demotion): Support loop-aware SLP and general multi-step conversion. Call vect_get_loop_based_defs and vect_create_vectorized_demotion_stmts for transformation. (vect_create_vectorized_promotion_stmts): New function. (vectorizable_type_promotion): Support loop-aware SLP and general multi-step conversion. Call vect_create_vectorized_promotion_stmts for transformation. (vectorizable_store): Change documentation, support multiple types in SLP. (vectorizable_load): Likewise. (vect_transform_stmt): Pass SLP_NODE to vectorizable_type_promotion and vectorizable_type_demotion. (vect_schedule_slp_instance): Move here the calculation of number of vectorized statements for each node from... (vect_schedule_slp): ... here. (vect_transform_loop): Call vect_schedule_slp without the last argument. From-SVN: r139225
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r--gcc/tree-vect-patterns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index d5bff5a..8486775 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -374,7 +374,8 @@ vect_recog_widen_mult_pattern (gimple last_stmt,
tree dummy;
tree var;
enum tree_code dummy_code;
- bool dummy_bool;
+ int dummy_int;
+ VEC (tree, heap) *dummy_vec;
if (!is_gimple_assign (last_stmt))
return NULL;
@@ -415,7 +416,7 @@ vect_recog_widen_mult_pattern (gimple last_stmt,
if (!vectype
|| !supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt, vectype,
&dummy, &dummy, &dummy_code,
- &dummy_code, &dummy_bool, &dummy))
+ &dummy_code, &dummy_int, &dummy_vec))
return NULL;
*type_in = vectype;