aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.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-slp.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-slp.c')
-rw-r--r--gcc/tree-vect-slp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 07f10c0..fe123bf 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -4088,7 +4088,6 @@ vect_schedule_slp (vec_info *vinfo)
slp_tree root = SLP_INSTANCE_TREE (instance);
stmt_vec_info store_info;
unsigned int j;
- gimple_stmt_iterator gsi;
/* Remove scalar call stmts. Do not do this for basic-block
vectorization as not all uses may be vectorized.
@@ -4109,11 +4108,7 @@ vect_schedule_slp (vec_info *vinfo)
if (is_pattern_stmt_p (store_info))
store_info = STMT_VINFO_RELATED_STMT (store_info);
/* Free the attached stmt_vec_info and remove the stmt. */
- gsi = gsi_for_stmt (store_info);
- unlink_stmt_vdef (store_info);
- gsi_remove (&gsi, true);
- release_defs (store_info);
- free_stmt_vec_info (store_info);
+ vinfo->remove_stmt (store_info);
}
}