From: Richard Sandiford Date: Tue, 31 Jul 2018 14:26:10 +0000 (+0000) Subject: [39/46] Change STMT_VINFO_UNALIGNED_DR to a dr_vec_info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e5e6ff5e63127a7a6ae4ee64d08a22a41a021c4;p=gcc.git [39/46] Change STMT_VINFO_UNALIGNED_DR to a dr_vec_info After previous changes, it makes more sense for STMT_VINFO_UNALIGNED_DR to be dr_vec_info rather than a data_reference. 2018-07-31 Richard Sandiford 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. From-SVN: r263154 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 298e2e9cf29..a9d81d4aaac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2018-07-31 Richard Sandiford + + * 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. + 2018-07-31 Richard Sandiford * tree-vectorizer.h (set_dr_misalignment, dr_misalignment) diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 193575dff54..aac7fb4e9e8 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2135,7 +2135,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo) 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 diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 58cfebf23bb..e566333420d 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1560,7 +1560,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, 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 @@ static tree 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; diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index dc67dc5bebe..32643d303af 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2142,8 +2142,7 @@ start_over: /* 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; } diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index d45c573db38..a9c9805c51f 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -437,7 +437,7 @@ typedef struct _loop_vec_info : public vec_info { 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: