aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-06-02 13:25:59 +0200
committerRichard Biener <rguenther@suse.de>2021-06-08 15:09:18 +0200
commit4bd2cdb74e26f68a4e9d51e74ace60326c9950d1 (patch)
tree72560a71ebd054ae782a3f45c43571895f1e7124 /gcc/tree-vectorizer.h
parent4ab8f20348676d209aa8da12baf5da07fa769788 (diff)
downloadgcc-4bd2cdb74e26f68a4e9d51e74ace60326c9950d1.zip
gcc-4bd2cdb74e26f68a4e9d51e74ace60326c9950d1.tar.gz
gcc-4bd2cdb74e26f68a4e9d51e74ace60326c9950d1.tar.bz2
Make SLP root stmt a vector
This fixes a TODO noticed when adding vectorization of BIT_INSERT_EXPRs and what's now useful for vectorization of BB reductions. 2021-06-08 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_slp_instance::root_stmt): Change to... (_slp_instance::root_stmts): ... a vector. (SLP_INSTANCE_ROOT_STMT): Rename to ... (SLP_INSTANCE_ROOT_STMTS): ... this. (slp_root::root): Change to... (slp_root::roots): ... a vector. (slp_root::slp_root): Adjust. * tree-vect-slp.c (_slp_instance::location): Adjust. (vect_free_slp_instance): Release the root stmt vector. (vect_build_slp_instance): Adjust. (vect_analyze_slp): Likewise. (_bb_vec_info::~_bb_vec_info): Likewise. (vect_slp_analyze_operations): Likewise. (vect_bb_vectorization_profitable_p): Likewise. Adjust costs for the root stmt. (vect_slp_check_for_constructors): Gather all BIT_INSERT_EXPRs as root stmts. (vect_slp_analyze_bb_1): Simplify by marking all root stmts as pure_slp. (vectorize_slp_instance_root_stmt): Adjust. (vect_schedule_slp): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 7dcb4cd..06d20c7 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -197,7 +197,7 @@ public:
/* For vector constructors, the constructor stmt that the SLP tree is built
from, NULL otherwise. */
- stmt_vec_info root_stmt;
+ vec<stmt_vec_info> root_stmts;
/* The unrolling factor required to vectorized this SLP instance. */
poly_uint64 unrolling_factor;
@@ -226,7 +226,7 @@ public:
#define SLP_INSTANCE_TREE(S) (S)->root
#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_INSTANCE_ROOT_STMTS(S) (S)->root_stmts
#define SLP_INSTANCE_KIND(S) (S)->kind
#define SLP_TREE_CHILDREN(S) (S)->children
@@ -861,11 +861,11 @@ loop_vec_info_for_loop (class loop *loop)
struct slp_root
{
slp_root (slp_instance_kind kind_, vec<stmt_vec_info> stmts_,
- stmt_vec_info root_)
- : kind(kind_), stmts(stmts_), root(root_) {}
+ vec<stmt_vec_info> roots_)
+ : kind(kind_), stmts(stmts_), roots(roots_) {}
slp_instance_kind kind;
vec<stmt_vec_info> stmts;
- stmt_vec_info root;
+ vec<stmt_vec_info> roots;
};
typedef class _bb_vec_info : public vec_info