SLP: support entire BB.
authorMartin Liska <mliska@suse.cz>
Fri, 31 Jul 2020 08:53:39 +0000 (10:53 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 24 Aug 2020 08:21:09 +0000 (10:21 +0200)
commitcdb2e365fc0dba2ee052827e5ca65234ca82d605
tree7f37c2b6a9b46a3312078c93aa11aac56c20a00b
parentadc646b10c7168c3c95373ee9321e3760fc4c5f1
SLP: support entire BB.

gcc/ChangeLog:

* tree-vect-data-refs.c (dr_group_sort_cmp): Work on
data_ref_pair.
(vect_analyze_data_ref_accesses): Work on groups.
(vect_find_stmt_data_reference): Add group_id argument and fill
up dataref_groups vector.
* tree-vect-loop.c (vect_get_datarefs_in_loop): Pass new
arguments.
(vect_analyze_loop_2): Likewise.
* tree-vect-slp.c (vect_slp_analyze_bb_1): Pass argument.
(vect_slp_bb_region): Likewise.
(vect_slp_region): Likewise.
(vect_slp_bb):Work on the entire BB.
* tree-vectorizer.h (vect_analyze_data_ref_accesses): Add new
argument.
(vect_find_stmt_data_reference): Likewise.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/bb-slp-38.c: Adjust pattern as now we only process
a single vectorization and now 2 partial.
* gcc.dg/vect/bb-slp-45.c: New test.
gcc/testsuite/gcc.dg/vect/bb-slp-38.c
gcc/testsuite/gcc.dg/vect/bb-slp-45.c [new file with mode: 0644]
gcc/tree-vect-data-refs.c
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vectorizer.h