diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:21:23 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:21:23 +0000 |
commit | 6e2dd807c2aaaba8906a36766b9f98dfbeddc27d (patch) | |
tree | 6760573d95c4d3ddb86bad7346fd830cd6aed104 /gcc/tree-vectorizer.c | |
parent | ac1359be3a39f4d12342c98c2a2e77bd59a839f4 (diff) | |
download | gcc-6e2dd807c2aaaba8906a36766b9f98dfbeddc27d.zip gcc-6e2dd807c2aaaba8906a36766b9f98dfbeddc27d.tar.gz gcc-6e2dd807c2aaaba8906a36766b9f98dfbeddc27d.tar.bz2 |
[03/46] Remove unnecessary update of NUM_SLP_USES
vect_free_slp_tree had:
gimple *stmt;
FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt)
/* After transform some stmts are removed and thus their vinfo is gone. */
if (vinfo_for_stmt (stmt))
{
gcc_assert (STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmt)) > 0);
STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmt))--;
}
But after transform this update is redundant even for statements that do
exist, so it seems better to skip this loop for the final teardown.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
* tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
STMT_VINFO_NUM_SLP_USES when it's true.
(vect_free_slp_instance): Add a final_p parameter and pass it to
vect_free_slp_tree.
(vect_build_slp_tree_2): Update call to vect_free_slp_instance.
(vect_analyze_slp_instance): Likewise.
(vect_slp_analyze_operations): Likewise.
(vect_slp_analyze_bb_1): Likewise.
* tree-vectorizer.c (vec_info): Likewise.
* tree-vect-loop.c (vect_transform_loop): Likewise.
From-SVN: r263118
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 971221c..ffd9a9c 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -466,7 +466,7 @@ vec_info::~vec_info () unsigned int i; FOR_EACH_VEC_ELT (slp_instances, i, instance) - vect_free_slp_instance (instance); + vect_free_slp_instance (instance, true); destroy_cost_data (target_cost_data); free_stmt_vec_infos (&stmt_vec_infos); |