From a7701dd16103048432ec8051e4773760c0e2cf90 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 24 Sep 2019 13:43:07 +0000 Subject: tree-vectorizer.h (_stmt_vec_info::const_cond_reduc_code): Rename to... 2019-09-24 Richard Biener * tree-vectorizer.h (_stmt_vec_info::const_cond_reduc_code): Rename to... (_stmt_vec_info::cond_reduc_code): ... this. (_stmt_vec_info::induc_cond_initial_val): Add. (STMT_VINFO_VEC_CONST_COND_REDUC_CODE): Rename to... (STMT_VINFO_VEC_COND_REDUC_CODE): ... this. (STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL): Add. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Adjust. * tree-vect-loop.c (get_initial_def_for_reduction): Pass in the reduction code. (vect_create_epilog_for_reduction): Drop special induction condition reduction params, pass in reduction code and simplify. (vectorizable_reduction): Perform condition reduction kind selection only at analysis time. Adjust passing on state. From-SVN: r276099 --- gcc/tree-vectorizer.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 09d31ec8b1c..370ce132f74 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -934,8 +934,12 @@ public: /* For reduction loops, this is the type of reduction. */ enum vect_reduction_type v_reduc_type; - /* For CONST_COND_REDUCTION, record the reduc code. */ - enum tree_code const_cond_reduc_code; + /* For CONST_COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION, the + reduction code. */ + enum tree_code cond_reduc_code; + + /* For INTEGER_INDUC_COND_REDUCTION, the initial value to be used. */ + tree induc_cond_initial_val; /* On a reduction PHI the reduction type as detected by vect_force_simple_reduction. */ @@ -1033,7 +1037,8 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) #define STMT_VINFO_MEMORY_ACCESS_TYPE(S) (S)->memory_access_type #define STMT_VINFO_SIMD_LANE_ACCESS_P(S) (S)->simd_lane_access_p #define STMT_VINFO_VEC_REDUCTION_TYPE(S) (S)->v_reduc_type -#define STMT_VINFO_VEC_CONST_COND_REDUC_CODE(S) (S)->const_cond_reduc_code +#define STMT_VINFO_VEC_COND_REDUC_CODE(S) (S)->cond_reduc_code +#define STMT_VINFO_VEC_INDUC_COND_INITIAL_VAL(S) (S)->induc_cond_initial_val #define STMT_VINFO_REDUC_IDX(S) (S)->reduc_idx #define STMT_VINFO_DR_WRT_VEC_LOOP(S) (S)->dr_wrt_vec_loop -- cgit v1.2.3