From ca823c85882f5a0ca9779d8cd7adfcec02549d3b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 25 Jun 2018 11:04:01 +0000 Subject: tree-vectorizer.h (struct vec_info_shared): New structure with parts split out from struct vec_info and loop_nest from... 2018-06-25 Richard Biener * tree-vectorizer.h (struct vec_info_shared): New structure with parts split out from struct vec_info and loop_nest from struct _loop_vec_info. (struct vec_info): Adjust accordingly. (struct _loop_vec_info): Likewise. (LOOP_VINFO_LOOP_NEST): Adjust. (LOOP_VINFO_DATAREFS): Likewise. (LOOP_VINFO_DDRS): Likewise. (struct _bb_vec_info): Likewise. (BB_VINFO_DATAREFS): Likewise. (BB_VINFO_DDRS): Likewise. (struct _stmt_vec_info): Add dr_aux member. (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo. (DR_MISALIGNMENT_UNINITIALIZED): New. (set_dr_misalignment): Adjust. (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED. (vect_analyze_loop): Adjust prototype. (vect_analyze_loop_form): Likewise. * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Compute dependences lazily. (vect_record_base_alignments): Use shared datarefs/ddrs. (vect_verify_datarefs_alignment): Likewise. (vect_analyze_data_refs_alignment): Likewise. (vect_analyze_data_ref_accesses): Likewise. (vect_analyze_data_refs): Likewise. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add constructor parameter for shared part. (vect_analyze_loop_form): Pass in shared part and adjust. (vect_analyze_loop_2): Pass in storage for the number of stmts. Move loop nest finding to the caller. Compute datarefs lazily. (vect_analyze_loop): Pass in shared part. (vect_transform_loop): Verify shared datarefs are unchanged. * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add constructor parameter for shared part. (vect_slp_analyze_bb_1): Pass in shared part and adjust. (vect_slp_bb): Verify shared datarefs are unchanged before transform. * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX change. (new_stmt_vec_info): Initialize DR_AUX misalignment to DR_MISALIGNMENT_UNINITIALIZED. * tree-vectorizer.c (vec_info::vec_info): Add constructor parameter for shared part. (vec_info::~vec_info): Adjust. (vec_info_shared::vec_info_shared): New. (vec_info_shared::~vec_info_shared): Likewise. (vec_info_shared::save_datarefs): Likewise. (vec_info_shared::check_datarefs): Likewise. (try_vectorize_loop_1): Construct shared part live for analyses of a single loop for multiple vector sizes. * tree-parloops.c (gather_scalar_reductions): Adjust. From-SVN: r262009 --- gcc/tree-vect-stmts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/tree-vect-stmts.c') diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 1181bc9..07dc222 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6123,7 +6123,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi, static void ensure_base_align (struct data_reference *dr) { - if (!dr->aux) + if (DR_VECT_AUX (dr)->misalignment == DR_MISALIGNMENT_UNINITIALIZED) return; if (DR_VECT_AUX (dr)->base_misaligned) @@ -9831,6 +9831,9 @@ new_stmt_vec_info (gimple *stmt, vec_info *vinfo) res->gap = 0; /* GROUP_GAP */ res->same_dr_stmt = NULL; /* GROUP_SAME_DR_STMT */ + /* This is really "uninitialized" until vect_compute_data_ref_alignment. */ + res->dr_aux.misalignment = DR_MISALIGNMENT_UNINITIALIZED; + return res; } -- cgit v1.1