diff options
author | Richard Biener <rguenther@suse.de> | 2020-10-13 11:42:27 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-10-13 13:35:11 +0200 |
commit | a673744dee7a80e6525fb0da87d053c8ccab6275 (patch) | |
tree | e7a3608db67dfd55be77428841e045d71cc940b7 /gcc/vec.h | |
parent | 35103c6d8e3ee24a2497888bb1f7ef37327ace2b (diff) | |
download | gcc-a673744dee7a80e6525fb0da87d053c8ccab6275.zip gcc-a673744dee7a80e6525fb0da87d053c8ccab6275.tar.gz gcc-a673744dee7a80e6525fb0da87d053c8ccab6275.tar.bz2 |
Remove STMT_VINFO_SAME_ALIGN_REFS
This makes the only consumer of STMT_VINFO_SAME_ALIGN_REFS, the
loop peeling for alignment code, use locally computed data and
then removes STMT_VINFO_SAME_ALIGN_REFS and its computation.
It also adjusts the auto_vec<> move CTOR/assignment so you
can write
auto_vec<..> foo = bar.copy ();
and have foo own the generated copy.
2020-10-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/97382
* tree-vectorizer.h (_stmt_vec_info::same_align_refs): Remove.
(STMT_VINFO_SAME_ALIGN_REFS): Likewise.
* tree-vectorizer.c (vec_info::new_stmt_vec_info): Do not
allocate STMT_VINFO_SAME_ALIGN_REFS.
(vec_info::free_stmt_vec_info): Do not release
STMT_VINFO_SAME_ALIGN_REFS.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
Do not compute self and read-read dependences.
(vect_dr_aligned_if_related_peeled_dr_is): New helper.
(vect_dr_aligned_if_peeled_dr_is): Likewise.
(vect_update_misalignment_for_peel): Use it instead of
iterating over STMT_VINFO_SAME_ALIGN_REFS.
(dr_align_group_sort_cmp): New function.
(vect_enhance_data_refs_alignment): Count the number of
same aligned refs here and elide uses of STMT_VINFO_SAME_ALIGN_REFS.
(vect_find_same_alignment_drs): Remove.
(vect_analyze_data_refs_alignment): Do not call it.
* vec.h (auto_vec<T, 0>::auto_vec): Adjust CTOR to take
a vec<>&&, assert it isn't using auto storage.
(auto_vec& operator=): Apply a similar change.
* gcc.dg/vect/no-vfa-vect-dv-2.c: Remove same align dump
scanning.
* gcc.dg/vect/vect-103.c: Likewise.
* gcc.dg/vect/vect-91.c: Likewise.
* gfortran.dg/vect/vect-4.f90: Likewise.
Diffstat (limited to 'gcc/vec.h')
-rw-r--r-- | gcc/vec.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1541,13 +1541,15 @@ public: auto_vec (size_t n) { this->create (n); } ~auto_vec () { this->release (); } - auto_vec (auto_vec&& r) + auto_vec (vec<T, va_heap>&& r) { + gcc_assert (!r.using_auto_storage ()); this->m_vec = r.m_vec; r.m_vec = NULL; } - auto_vec& operator= (auto_vec&& r) + auto_vec& operator= (vec<T, va_heap>&& r) { + gcc_assert (!r.using_auto_storage ()); this->release (); this->m_vec = r.m_vec; r.m_vec = NULL; |