diff options
author | Richard Biener <rguenther@suse.de> | 2018-05-29 11:49:44 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-05-29 11:49:44 +0000 |
commit | f8c0baaf31ac987bd1e85a3ba2fa8a2edeff92a8 (patch) | |
tree | fd063fc6faee62c11cf26bbb7454f96ed1214453 /gcc/tree-parloops.c | |
parent | 092cb01cbf25e1c19d0b86bfac6dc4404c14a7dd (diff) | |
download | gcc-f8c0baaf31ac987bd1e85a3ba2fa8a2edeff92a8.zip gcc-f8c0baaf31ac987bd1e85a3ba2fa8a2edeff92a8.tar.gz gcc-f8c0baaf31ac987bd1e85a3ba2fa8a2edeff92a8.tar.bz2 |
tree-vectorizer.h (struct vec_info): Add stmt_vec_infos member.
2018-05-29 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
member.
(stmt_vec_info_vec): Make pointer.
(init_stmt_vec_info_vec): Remove.
(free_stmt_vec_info_vec): Likewise.
(set_stmt_vec_info_vec): New function.
(free_stmt_vec_infos): Likewise.
(vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
(set_vinfo_for_stmt): Likewise.
(get_earlier_stmt): Likewise.
(get_later_stmt): Likewise.
* tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
(vec_info::vec_info): Allocate stmt_vec_infos and set the global.
(vec_info::~vec_info): Free stmt_vec_infos.
(vectorize_loops): Set the global stmt_vec_info_vec to NULL.
Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
(pass_slp_vectorize::execute): Likewise.
* tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
(free_stmt_vec_info_vec): Likewise.
(set_stmt_vec_info_vec): New function.
(free_stmt_vec_infos): Likewise.
* tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
the global stmt_vec_info_vec.
* tree-parloops.c (gather_scalar_reductions): Use
set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
vector.
From-SVN: r260892
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r-- | gcc/tree-parloops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 3a788cc..aa74427 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -2593,8 +2593,9 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list auto_vec<gphi *, 4> double_reduc_phis; auto_vec<gimple *, 4> double_reduc_stmts; - if (!stmt_vec_info_vec.exists ()) - init_stmt_vec_info_vec (); + vec<stmt_vec_info> stmt_vec_infos; + stmt_vec_infos.create (50); + set_stmt_vec_info_vec (&stmt_vec_infos); simple_loop_info = vect_analyze_loop_form (loop); if (simple_loop_info == NULL) @@ -2674,7 +2675,7 @@ gather_scalar_reductions (loop_p loop, reduction_info_table_type *reduction_list gather_done: /* Release the claim on gimple_uid. */ - free_stmt_vec_info_vec (); + free_stmt_vec_infos (&stmt_vec_infos); if (reduction_list->elements () == 0) return; |