diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:26:14 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:26:14 +0000 |
commit | f5ae28565e7b0788c6b7a4945c2b67c54f46c45a (patch) | |
tree | c29ad4a40e234aea9c03035c3645b2b51040eca9 /gcc/tree-vectorizer.h | |
parent | 1e5e6ff5e63127a7a6ae4ee64d08a22a41a021c4 (diff) | |
download | gcc-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.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index a9c9805..61d89ac 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -240,6 +240,7 @@ struct vec_info { stmt_vec_info lookup_stmt (gimple *); stmt_vec_info lookup_def (tree); stmt_vec_info lookup_single_use (tree); + struct dr_vec_info *lookup_dr (data_reference *); void move_dr (stmt_vec_info, stmt_vec_info); /* The type of vectorization. */ @@ -1062,8 +1063,6 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo) #define PURE_SLP_STMT(S) ((S)->slp_type == pure_slp) #define STMT_SLP_TYPE(S) (S)->slp_type -#define DR_VECT_AUX(dr) (STMT_VINFO_DR_INFO (vect_dr_stmt (dr))) - #define VECT_MAX_COST 1000 /* The maximum number of intermediate steps required in multi-step type @@ -1273,20 +1272,6 @@ add_stmt_costs (void *data, stmt_vector_for_cost *cost_vec) cost->misalign, cost->where); } -/* Return the stmt DR is in. For DR_STMT that have been replaced by - a pattern this returns the corresponding pattern stmt. Otherwise - DR_STMT is returned. */ - -inline stmt_vec_info -vect_dr_stmt (data_reference *dr) -{ - gimple *stmt = DR_STMT (dr); - stmt_vec_info stmt_info = vinfo_for_stmt (stmt); - /* DR_STMT should never refer to a stmt in a pattern replacement. */ - gcc_checking_assert (!is_pattern_stmt_p (stmt_info)); - return stmt_info->dr_aux.stmt; -} - /*-----------------------------------------------------------------*/ /* Info on data references alignment. */ /*-----------------------------------------------------------------*/ |