diff options
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 767a077..a36974c 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -300,6 +300,13 @@ public: #define SLP_TREE_LANES(S) (S)->lanes #define SLP_TREE_CODE(S) (S)->code +enum vect_partial_vector_style { + vect_partial_vectors_none, + vect_partial_vectors_while_ult, + vect_partial_vectors_avx512, + vect_partial_vectors_len +}; + /* Key for map that records association between scalar conditions and corresponding loop mask, and is populated by vect_record_loop_mask. */ @@ -591,12 +598,15 @@ is_a_helper <_bb_vec_info *>::test (vec_info *i) /* The controls (like masks or lengths) needed by rgroups with nV vectors, according to the description above. */ struct rgroup_controls { - /* The largest nS for all rgroups that use these controls. */ + /* The largest nS for all rgroups that use these controls. + For vect_partial_vectors_avx512 this is the constant nscalars_per_iter + for all members of the group. */ unsigned int max_nscalars_per_iter; /* For the largest nS recorded above, the loop controls divide each scalar into FACTOR equal-sized pieces. This is useful if we need to split - element-based accesses into byte-based accesses. */ + element-based accesses into byte-based accesses. + For vect_partial_vectors_avx512 this records nV instead. */ unsigned int factor; /* This is a vector type with MAX_NSCALARS_PER_ITER * VF / nV elements. @@ -605,6 +615,10 @@ struct rgroup_controls { specified number of elements; the type of the elements doesn't matter. */ tree type; + /* When there is no uniformly used LOOP_VINFO_RGROUP_COMPARE_TYPE this + is the rgroup specific type used. */ + tree compare_type; + /* A vector of nV controls, in iteration order. */ vec<tree> controls; @@ -613,7 +627,17 @@ struct rgroup_controls { tree bias_adjusted_ctrl; }; -typedef auto_vec<rgroup_controls> vec_loop_masks; +struct vec_loop_masks +{ + bool is_empty () const { return mask_set.is_empty (); } + + /* Set to record vectype, nvector pairs. */ + hash_set<pair_hash <nofree_ptr_hash <tree_node>, + int_hash<unsigned, 0>>> mask_set; + + /* rgroup_controls used for the partial vector scheme. */ + auto_vec<rgroup_controls> rgc_vec; +}; typedef auto_vec<rgroup_controls> vec_loop_lens; @@ -741,6 +765,10 @@ public: LOOP_VINFO_USING_PARTIAL_VECTORS_P is true. */ tree rgroup_iv_type; + /* The style used for implementing partial vectors when + LOOP_VINFO_USING_PARTIAL_VECTORS_P is true. */ + vect_partial_vector_style partial_vector_style; + /* Unknown DRs according to which loop was peeled. */ class dr_vec_info *unaligned_dr; @@ -914,6 +942,7 @@ public: #define LOOP_VINFO_MASK_SKIP_NITERS(L) (L)->mask_skip_niters #define LOOP_VINFO_RGROUP_COMPARE_TYPE(L) (L)->rgroup_compare_type #define LOOP_VINFO_RGROUP_IV_TYPE(L) (L)->rgroup_iv_type +#define LOOP_VINFO_PARTIAL_VECTORS_STYLE(L) (L)->partial_vector_style #define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask #define LOOP_VINFO_N_STMTS(L) (L)->shared->n_stmts #define LOOP_VINFO_LOOP_NEST(L) (L)->shared->loop_nest |