aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-05-27 15:38:20 +0200
committerRichard Biener <rguenther@suse.de>2020-05-28 12:25:15 +0200
commite31cd607e999ca6ab47b7e65a7045b1594e4fba4 (patch)
tree7b6da4b9226701de481deca383dee0d735609aca /gcc/tree-vectorizer.h
parentb0aae85bd689cf581ac85d02a7e84eae0015dbe5 (diff)
downloadgcc-e31cd607e999ca6ab47b7e65a7045b1594e4fba4.zip
gcc-e31cd607e999ca6ab47b7e65a7045b1594e4fba4.tar.gz
gcc-e31cd607e999ca6ab47b7e65a7045b1594e4fba4.tar.bz2
Code generate externals/invariants during the SLP graph walk
This generates vector defs for externals and invariants during the SLP walk rather than as part of getting vectorized defs when vectorizing the users. This is a requirement to make sharing of external/invariant nodes be reflected in actual code generation. This temporarily adds a SLP_TREE_VEC_DEFS vector alongside the SLP_TREE_VEC_STMTS one. Eventually the latter can go away. 2020-05-27 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_slp_tree::vec_defs): Add. (SLP_TREE_VEC_DEFS): Likewise. * tree-vect-slp.c (_slp_tree::_slp_tree): Adjust. (_slp_tree::~_slp_tree): Likewise. (vect_mask_constant_operand_p): Remove unused function. (vect_get_constant_vectors): Rename to... (vect_create_constant_vectors): ... this. Take the invariant node as argument and code generate it. Remove dead code, remove temporary asserts. Pass a NULL stmt_info to vect_init_vector. (vect_get_slp_defs): Simplify. (vect_schedule_slp_instance): Code-generate externals and invariants using vect_create_constant_vectors.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 2eb3ab5..2bde717 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -136,6 +136,7 @@ struct _slp_tree {
tree vectype;
/* Vectorized stmt/s. */
vec<stmt_vec_info> vec_stmts;
+ vec<tree> vec_defs;
/* Number of vector stmts that are created to replace the group of scalar
stmts. It is calculated during the transformation phase as the number of
scalar elements in one scalar iteration (GROUP_SIZE) multiplied by VF
@@ -186,6 +187,7 @@ public:
#define SLP_TREE_SCALAR_STMTS(S) (S)->stmts
#define SLP_TREE_SCALAR_OPS(S) (S)->ops
#define SLP_TREE_VEC_STMTS(S) (S)->vec_stmts
+#define SLP_TREE_VEC_DEFS(S) (S)->vec_defs
#define SLP_TREE_NUMBER_OF_VEC_STMTS(S) (S)->vec_stmts_size
#define SLP_TREE_LOAD_PERMUTATION(S) (S)->load_permutation
#define SLP_TREE_TWO_OPERATORS(S) (S)->two_operators