On Thu, Jul 26, 2018 at 1:08 PM Richard Sandiford <richard.sandif...@arm.com> wrote: > > [Updated after new 37/46 and 38/46] > > After previous changes, it makes more sense for STMT_VINFO_UNALIGNED_DR > to be dr_vec_info rather than a data_reference.
OK. > > 2018-07-26 Richard Sandiford <richard.sandif...@arm.com> > > gcc/ > * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to > dr_vec_info. > * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update > accordingly. > * tree-vect-loop.c (vect_analyze_loop_2): Likewise. > * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise. > (vect_gen_prolog_loop_niters): Likewise. > > Index: gcc/tree-vectorizer.h > =================================================================== > --- gcc/tree-vectorizer.h 2018-07-26 11:42:19.035663718 +0100 > +++ gcc/tree-vectorizer.h 2018-07-26 11:42:24.919598492 +0100 > @@ -437,7 +437,7 @@ typedef struct _loop_vec_info : public v > tree mask_compare_type; > > /* Unknown DRs according to which loop was peeled. */ > - struct data_reference *unaligned_dr; > + struct dr_vec_info *unaligned_dr; > > /* peeling_for_alignment indicates whether peeling for alignment will take > place, and what the peeling factor should be: > Index: gcc/tree-vect-data-refs.c > =================================================================== > --- gcc/tree-vect-data-refs.c 2018-07-26 11:42:19.031663762 +0100 > +++ gcc/tree-vect-data-refs.c 2018-07-26 11:42:24.915598537 +0100 > @@ -2135,7 +2135,7 @@ vect_enhance_data_refs_alignment (loop_v > vect_update_misalignment_for_peel (dr_info, dr0_info, npeel); > } > > - LOOP_VINFO_UNALIGNED_DR (loop_vinfo) = dr0_info->dr; > + LOOP_VINFO_UNALIGNED_DR (loop_vinfo) = dr0_info; > if (npeel) > LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) = npeel; > else > Index: gcc/tree-vect-loop.c > =================================================================== > --- gcc/tree-vect-loop.c 2018-07-26 11:42:19.031663762 +0100 > +++ gcc/tree-vect-loop.c 2018-07-26 11:42:24.919598492 +0100 > @@ -2142,8 +2142,7 @@ vect_analyze_loop_2 (loop_vec_info loop_ > /* Niters for peeled prolog loop. */ > if (LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo) < 0) > { > - dr_vec_info *dr_info > - = DR_VECT_AUX (LOOP_VINFO_UNALIGNED_DR (loop_vinfo)); > + dr_vec_info *dr_info = LOOP_VINFO_UNALIGNED_DR (loop_vinfo); > tree vectype = STMT_VINFO_VECTYPE (dr_info->stmt); > niters_th += TYPE_VECTOR_SUBPARTS (vectype) - 1; > } > Index: gcc/tree-vect-loop-manip.c > =================================================================== > --- gcc/tree-vect-loop-manip.c 2018-07-26 11:42:19.031663762 +0100 > +++ gcc/tree-vect-loop-manip.c 2018-07-26 11:42:24.915598537 +0100 > @@ -1560,7 +1560,7 @@ vect_update_ivs_after_vectorizer (loop_v > static tree > get_misalign_in_elems (gimple **seq, loop_vec_info loop_vinfo) > { > - dr_vec_info *dr_info = DR_VECT_AUX (LOOP_VINFO_UNALIGNED_DR (loop_vinfo)); > + dr_vec_info *dr_info = LOOP_VINFO_UNALIGNED_DR (loop_vinfo); > stmt_vec_info stmt_info = dr_info->stmt; > tree vectype = STMT_VINFO_VECTYPE (stmt_info); > > @@ -1627,7 +1627,7 @@ get_misalign_in_elems (gimple **seq, loo > vect_gen_prolog_loop_niters (loop_vec_info loop_vinfo, > basic_block bb, int *bound) > { > - dr_vec_info *dr_info = DR_VECT_AUX (LOOP_VINFO_UNALIGNED_DR (loop_vinfo)); > + dr_vec_info *dr_info = LOOP_VINFO_UNALIGNED_DR (loop_vinfo); > tree var; > tree niters_type = TREE_TYPE (LOOP_VINFO_NITERS (loop_vinfo)); > gimple_seq stmts = NULL, new_stmts = NULL;