aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:26:18 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:26:18 +0000
commitb5b56c2a039cd308a9d00fc35baf65c1fb59070b (patch)
treec5d6d08e6e4b53af6d0690bfd84301ec152bd335 /gcc/tree-vect-loop.c
parentf5ae28565e7b0788c6b7a4945c2b67c54f46c45a (diff)
downloadgcc-b5b56c2a039cd308a9d00fc35baf65c1fb59070b.zip
gcc-b5b56c2a039cd308a9d00fc35baf65c1fb59070b.tar.gz
gcc-b5b56c2a039cd308a9d00fc35baf65c1fb59070b.tar.bz2
[41/46] Add vec_info::remove_stmt
This patch adds a new helper function for permanently removing a statement and its associated stmt_vec_info. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vec_info::remove_stmt): Declare. * tree-vectorizer.c (vec_info::remove_stmt): New function. * tree-vect-loop-manip.c (vect_set_loop_condition): Use it. * tree-vect-loop.c (vect_transform_loop): Likewise. * tree-vect-slp.c (vect_schedule_slp): Likewise. * tree-vect-stmts.c (vect_remove_stores): Likewise. From-SVN: r263156
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 32643d3..6a00695 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -8487,28 +8487,18 @@ vect_transform_loop (loop_vec_info loop_vinfo)
vect_transform_loop_stmt (loop_vinfo, stmt_info, &si,
&seen_store, &slp_scheduled);
}
+ gsi_next (&si);
if (seen_store)
{
if (STMT_VINFO_GROUPED_ACCESS (seen_store))
- {
- /* Interleaving. If IS_STORE is TRUE, the
- vectorization of the interleaving chain was
- completed - free all the stores in the chain. */
- gsi_next (&si);
- vect_remove_stores (DR_GROUP_FIRST_ELEMENT (seen_store));
- }
+ /* Interleaving. If IS_STORE is TRUE, the
+ vectorization of the interleaving chain was
+ completed - free all the stores in the chain. */
+ vect_remove_stores (DR_GROUP_FIRST_ELEMENT (seen_store));
else
- {
- /* Free the attached stmt_vec_info and remove the
- stmt. */
- free_stmt_vec_info (stmt);
- unlink_stmt_vdef (stmt);
- gsi_remove (&si, true);
- release_defs (stmt);
- }
+ /* Free the attached stmt_vec_info and remove the stmt. */
+ loop_vinfo->remove_stmt (stmt_info);
}
- else
- gsi_next (&si);
}
}