diff options
author | Richard Biener <rguenther@suse.de> | 2023-07-24 12:14:26 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-07-24 15:32:00 +0200 |
commit | 2b074dc7bdf4402c1e3e44f247e27f3ef51bd8e4 (patch) | |
tree | e3314c54ccfb9c37c61b0d4eedca1daea5b5e620 /gcc/tree-vectorizer.h | |
parent | 8547c451aac1c1f0178cf0914243b20fa0dde0c3 (diff) | |
download | gcc-2b074dc7bdf4402c1e3e44f247e27f3ef51bd8e4.zip gcc-2b074dc7bdf4402c1e3e44f247e27f3ef51bd8e4.tar.gz gcc-2b074dc7bdf4402c1e3e44f247e27f3ef51bd8e4.tar.bz2 |
Remove SLP_TREE_VEC_STMTS in favor of SLP_TREE_VEC_DEFS
The following unifies SLP_TREE_VEC_STMTS into SLP_TREE_VEC_DEFS
which can handle all cases we need.
* tree-vectorizer.h (_slp_tree::push_vec_def): Add.
(_slp_tree::vec_stmts): Remove.
(SLP_TREE_VEC_STMTS): Remove.
* tree-vect-slp.cc (_slp_tree::push_vec_def): Define.
(_slp_tree::_slp_tree): Adjust.
(_slp_tree::~_slp_tree): Likewise.
(vect_get_slp_vect_def): Simplify.
(vect_get_slp_defs): Likewise.
(vect_transform_slp_perm_load_1): Adjust.
(vect_add_slp_permutation): Likewise.
(vect_schedule_slp_node): Likewise.
(vectorize_slp_instance_root_stmt): Likewise.
(vect_schedule_scc): Likewise.
* tree-vect-stmts.cc (vectorizable_bswap): Use push_vec_def.
(vectorizable_call): Likewise.
(vectorizable_call): Likewise.
(vect_create_vectorized_demotion_stmts): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_comparison): Likewise.
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Adjust.
(vectorize_fold_left_reduction): Use push_vec_def.
(vect_transform_reduction): Likewise.
(vect_transform_cycle_phi): Likewise.
(vectorizable_lc_phi): Likewise.
(vectorizable_phi): Likewise.
(vectorizable_recurr): Likewise.
(vectorizable_induction): Likewise.
(vectorizable_live_operation): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 6b1cf6d..a651614 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -174,6 +174,9 @@ struct _slp_tree { _slp_tree (); ~_slp_tree (); + void push_vec_def (gimple *def); + void push_vec_def (tree def) { vec_defs.quick_push (def); } + /* Nodes that contain def-stmts of this node statements operands. */ vec<slp_tree> children; @@ -194,8 +197,7 @@ struct _slp_tree { lane_permutation_t lane_permutation; tree vectype; - /* Vectorized stmt/s. */ - vec<gimple *> vec_stmts; + /* Vectorized defs. */ 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 @@ -289,7 +291,6 @@ public: #define SLP_TREE_SCALAR_STMTS(S) (S)->stmts #define SLP_TREE_SCALAR_OPS(S) (S)->ops #define SLP_TREE_REF_COUNT(S) (S)->refcnt -#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 |