diff options
author | Richard Biener <rguenther@suse.de> | 2020-05-06 13:20:38 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-05-06 15:30:14 +0200 |
commit | 4e849a74a8512cb313831a5929501ac2a735b7e1 (patch) | |
tree | 305e6d48028c8d2c68c43c8c56c490694672822e /gcc/tree-vect-data-refs.c | |
parent | a3f1fc0625cd3c0492c2e66a32ae75dbedc06731 (diff) | |
download | gcc-4e849a74a8512cb313831a5929501ac2a735b7e1.zip gcc-4e849a74a8512cb313831a5929501ac2a735b7e1.tar.gz gcc-4e849a74a8512cb313831a5929501ac2a735b7e1.tar.bz2 |
Prepare removal of SLP_INSTANCE_GROUP_SIZE
This removes trivial instances of SLP_INSTANCE_GROUP_SIZE and refrains
from using a "SLP instance" which nowadays is just one of the possibly
many entries into the SLP graph.
2020-05-06 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (vect_transform_slp_perm_load): Adjust.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
Remove slp_instance parameter, just iterate over all scalar stmts.
(vect_slp_analyze_instance_dependence): Adjust and likewise.
* tree-vect-slp.c (vect_bb_slp_scalar_cost): Remove unused BB
parameter.
(vect_schedule_slp): Just iterate over all scalar stmts.
(vect_supported_load_permutation_p): Adjust.
(vect_transform_slp_perm_load): Remove slp_instance parameter,
instead use the number of lanes in the node as group size.
* tree-vect-stmts.c (vect_model_load_cost): Get vectorization
factor instead of slp_instance as parameter.
(vectorizable_load): Adjust.
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 7e9ab3e..d41ba49 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -695,8 +695,7 @@ vect_slp_analyze_data_ref_dependence (vec_info *vinfo, disambiguating the loads. */ static bool -vect_slp_analyze_node_dependences (vec_info *vinfo, - slp_instance instance, slp_tree node, +vect_slp_analyze_node_dependences (vec_info *vinfo, slp_tree node, vec<stmt_vec_info> stores, stmt_vec_info last_store_info) { @@ -704,7 +703,7 @@ vect_slp_analyze_node_dependences (vec_info *vinfo, in NODE verifying we can sink them up to the last stmt in the group. */ stmt_vec_info last_access_info = vect_find_last_scalar_stmt_in_slp (node); - for (unsigned k = 0; k < SLP_INSTANCE_GROUP_SIZE (instance); ++k) + for (unsigned k = 0; k < SLP_TREE_SCALAR_STMTS (node).length (); ++k) { stmt_vec_info access_info = SLP_TREE_SCALAR_STMTS (node)[k]; if (access_info == last_access_info) @@ -794,13 +793,12 @@ vect_slp_analyze_instance_dependence (vec_info *vinfo, slp_instance instance) stmt_vec_info last_store_info = NULL; if (store) { - if (! vect_slp_analyze_node_dependences (vinfo, instance, store, - vNULL, NULL)) + if (! vect_slp_analyze_node_dependences (vinfo, store, vNULL, NULL)) return false; /* Mark stores in this instance and remember the last one. */ last_store_info = vect_find_last_scalar_stmt_in_slp (store); - for (unsigned k = 0; k < SLP_INSTANCE_GROUP_SIZE (instance); ++k) + for (unsigned k = 0; k < SLP_TREE_SCALAR_STMTS (store).length (); ++k) gimple_set_visited (SLP_TREE_SCALAR_STMTS (store)[k]->stmt, true); } @@ -811,7 +809,7 @@ vect_slp_analyze_instance_dependence (vec_info *vinfo, slp_instance instance) slp_tree load; unsigned int i; FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (instance), i, load) - if (! vect_slp_analyze_node_dependences (vinfo, instance, load, + if (! vect_slp_analyze_node_dependences (vinfo, load, store ? SLP_TREE_SCALAR_STMTS (store) : vNULL, last_store_info)) @@ -822,7 +820,7 @@ vect_slp_analyze_instance_dependence (vec_info *vinfo, slp_instance instance) /* Unset the visited flag. */ if (store) - for (unsigned k = 0; k < SLP_INSTANCE_GROUP_SIZE (instance); ++k) + for (unsigned k = 0; k < SLP_TREE_SCALAR_STMTS (store).length (); ++k) gimple_set_visited (SLP_TREE_SCALAR_STMTS (store)[k]->stmt, false); return res; |