aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:26:14 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:26:14 +0000
commitf5ae28565e7b0788c6b7a4945c2b67c54f46c45a (patch)
treec29ad4a40e234aea9c03035c3645b2b51040eca9 /gcc/tree-vectorizer.c
parent1e5e6ff5e63127a7a6ae4ee64d08a22a41a021c4 (diff)
downloadgcc-f5ae28565e7b0788c6b7a4945c2b67c54f46c45a.zip
gcc-f5ae28565e7b0788c6b7a4945c2b67c54f46c45a.tar.gz
gcc-f5ae28565e7b0788c6b7a4945c2b67c54f46c45a.tar.bz2
[40/46] Add vec_info::lookup_dr
This patch replaces DR_VECT_AUX and vect_dr_stmt with a new vec_info::lookup_dr function, so that the lookup is relative to a particular vec_info rather than to global state. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vec_info::lookup_dr): New member function. (vect_dr_stmt): Delete. * tree-vectorizer.c (vec_info::lookup_dr): New function. * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead of DR_VECT_AUX. * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr) (vect_analyze_data_ref_dependence, vect_record_base_alignments) (vect_verify_datarefs_alignment, vect_peeling_supportable) (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list) (vect_analyze_data_refs): Likewise. (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info argument. (vect_find_same_alignment_drs): Likewise. (vect_slp_analyze_node_dependences): Update calls accordingly. (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr instead of DR_VECT_AUX. (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead of a vector data references. Use vec_info::lookup_dr instead of DR_VECT_AUX. (vect_peeling_hash_get_lowest_cost): Update calls accordingly. (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr instead of DR_VECT_AUX. From-SVN: r263155
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r--gcc/tree-vectorizer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index edf139d..cece978 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -562,6 +562,17 @@ vec_info::lookup_single_use (tree lhs)
return NULL;
}
+/* Return vectorization information about DR. */
+
+dr_vec_info *
+vec_info::lookup_dr (data_reference *dr)
+{
+ stmt_vec_info stmt_info = lookup_stmt (DR_STMT (dr));
+ /* DR_STMT should never refer to a stmt in a pattern replacement. */
+ gcc_checking_assert (!is_pattern_stmt_p (stmt_info));
+ return STMT_VINFO_DR_INFO (stmt_info->dr_aux.stmt);
+}
+
/* Record that NEW_STMT_INFO now implements the same data reference
as OLD_STMT_INFO. */