diff options
author | Joel Hutton <Joel.Hutton@arm.com> | 2019-11-04 16:39:32 +0000 |
---|---|---|
committer | Andre Vieira <avieira@gcc.gnu.org> | 2019-11-04 16:39:32 +0000 |
commit | 818b3293f4545d899148810f4f7d676b81e989dd (patch) | |
tree | 2702ccd3ba1baf99c6cb15f51052689b1b0cb9e2 /gcc/tree-vectorizer.h | |
parent | a6ba623777513e31721030092e4d786f461a0f06 (diff) | |
download | gcc-818b3293f4545d899148810f4f7d676b81e989dd.zip gcc-818b3293f4545d899148810f4f7d676b81e989dd.tar.gz gcc-818b3293f4545d899148810f4f7d676b81e989dd.tar.bz2 |
[SLP] SLP vectorization: vectorize vector constructors
gcc/ChangeLog:
2019-11-04 Joel Hutton <Joel.Hutton@arm.com>
* expr.c (store_constructor): Modify to handle single element vectors.
* tree-vect-slp.c (vect_analyze_slp_instance): Add case for vector
constructors.
(vect_slp_check_for_constructors): New function.
(vect_slp_analyze_bb_1): Call new function to check for vector
constructors.
(vectorize_slp_instance_root_stmt): New function.
(vect_schedule_slp): Call new function to vectorize root stmt of vector
constructors.
* tree-vectorizer.h (SLP_INSTANCE_ROOT_STMT): New field.
gcc/testsuite/ChangeLog:
2019-11-04 Joel Hutton <Joel.Hutton@arm.com>
* gcc.dg/vect/bb-slp-40.c: New test.
* gcc.dg/vect/bb-slp-41.c: New test.
From-SVN: r277784
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 71b5f38..0fa6435 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -152,6 +152,10 @@ public: /* The root of SLP tree. */ slp_tree root; + /* For vector constructors, the constructor stmt that the SLP tree is built + from, NULL otherwise. */ + stmt_vec_info root_stmt; + /* Size of groups of scalar stmts that will be replaced by SIMD stmt/s. */ unsigned int group_size; @@ -171,6 +175,7 @@ public: #define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size #define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor #define SLP_INSTANCE_LOADS(S) (S)->loads +#define SLP_INSTANCE_ROOT_STMT(S) (S)->root_stmt #define SLP_TREE_CHILDREN(S) (S)->children #define SLP_TREE_SCALAR_STMTS(S) (S)->stmts |