diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:26:18 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:26:18 +0000 |
commit | b5b56c2a039cd308a9d00fc35baf65c1fb59070b (patch) | |
tree | c5d6d08e6e4b53af6d0690bfd84301ec152bd335 /gcc/tree-vect-stmts.c | |
parent | f5ae28565e7b0788c6b7a4945c2b67c54f46c45a (diff) | |
download | gcc-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-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 46ef3bb..1bf9dd8 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9845,8 +9845,8 @@ vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, void vect_remove_stores (stmt_vec_info first_stmt_info) { + vec_info *vinfo = first_stmt_info->vinfo; stmt_vec_info next_stmt_info = first_stmt_info; - gimple_stmt_iterator next_si; while (next_stmt_info) { @@ -9854,11 +9854,7 @@ vect_remove_stores (stmt_vec_info first_stmt_info) if (is_pattern_stmt_p (next_stmt_info)) next_stmt_info = STMT_VINFO_RELATED_STMT (next_stmt_info); /* Free the attached stmt_vec_info and remove the stmt. */ - next_si = gsi_for_stmt (next_stmt_info->stmt); - unlink_stmt_vdef (next_stmt_info->stmt); - gsi_remove (&next_si, true); - release_defs (next_stmt_info->stmt); - free_stmt_vec_info (next_stmt_info); + vinfo->remove_stmt (next_stmt_info); next_stmt_info = tmp; } } |