[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