diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-07-13 10:17:40 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-07-13 10:17:40 +0100 |
commit | bd5a69191f023b9bc2a1f83c5f7d5e591c333b9a (patch) | |
tree | 3829f0ef8a4af7e8999b9e27c5bc7ccee6b0e090 /gcc/tree-vect-loop.c | |
parent | 826c452e571884fcabbc73863eef5120e683d034 (diff) | |
download | gcc-bd5a69191f023b9bc2a1f83c5f7d5e591c333b9a.zip gcc-bd5a69191f023b9bc2a1f83c5f7d5e591c333b9a.tar.gz gcc-bd5a69191f023b9bc2a1f83c5f7d5e591c333b9a.tar.bz2 |
vect: Pass reduc_info to get_initial_def_for_reduction
Similarly to the previous patch, this one passes the reduc_info
to get_initial_def_for_reduction, rather than a stmt_vec_info that
lacks the metadata. This again becomes useful later.
gcc/
* tree-vect-loop.c (get_initial_def_for_reduction): Take the
reduc_info instead of the original stmt_vec_info.
(vect_transform_cycle_phi): Update accordingly.
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 565c285..a67036f 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4625,7 +4625,7 @@ vect_model_reduction_cost (loop_vec_info loop_vinfo, /* Function get_initial_def_for_reduction Input: - STMT_VINFO - a stmt that performs a reduction operation in the loop. + REDUC_INFO - the info_for_reduction INIT_VAL - the initial value of the reduction variable Output: @@ -4667,7 +4667,7 @@ vect_model_reduction_cost (loop_vec_info loop_vinfo, static tree get_initial_def_for_reduction (loop_vec_info loop_vinfo, - stmt_vec_info stmt_vinfo, + stmt_vec_info reduc_info, enum tree_code code, tree init_val, tree *adjustment_def) { @@ -4685,8 +4685,8 @@ get_initial_def_for_reduction (loop_vec_info loop_vinfo, gcc_assert (POINTER_TYPE_P (scalar_type) || INTEGRAL_TYPE_P (scalar_type) || SCALAR_FLOAT_TYPE_P (scalar_type)); - gcc_assert (nested_in_vect_loop_p (loop, stmt_vinfo) - || loop == (gimple_bb (stmt_vinfo->stmt))->loop_father); + gcc_assert (nested_in_vect_loop_p (loop, reduc_info) + || loop == (gimple_bb (reduc_info->stmt))->loop_father); /* ADJUSTMENT_DEF is NULL when called from vect_create_epilog_for_reduction to vectorize double reduction. */ @@ -7556,7 +7556,7 @@ vect_transform_cycle_phi (loop_vec_info loop_vinfo, if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) adjustment_defp = NULL; vec_initial_def - = get_initial_def_for_reduction (loop_vinfo, reduc_stmt_info, code, + = get_initial_def_for_reduction (loop_vinfo, reduc_info, code, initial_def, adjustment_defp); STMT_VINFO_REDUC_EPILOGUE_ADJUSTMENT (reduc_info) = adjustment_def; vec_initial_defs.create (ncopies); |