From 458135c0354f19eb2bd032d42c27076def8c31de Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 31 Jul 2018 14:26:26 +0000 Subject: [43/46] Make free_stmt_vec_info take a stmt_vec_info This patch makes free_stmt_vec_info take the stmt_vec_info that it's supposed to free and makes it free only that stmt_vec_info. Callers need to update the statement mapping where necessary (but now there are only a couple of callers). This in turns means that we can leave ~vec_info to do the actual freeing, since there's no longer a need to do it before resetting the gimple_uids. 2018-07-31 Richard Sandiford gcc/ * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info rather than a gimple stmt. * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free information for pattern statements when passed the original statement; instead wait to be passed the pattern statement itself. Don't call set_vinfo_for_stmt here. (free_stmt_vec_infos): Update call to free_stmt_vec_info. * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free stmt_vec_infos here. * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise. * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's stmt_vec_infos entry. From-SVN: r263158 --- gcc/tree-vect-loop.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'gcc/tree-vect-loop.c') diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 6a00695..840b38c 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -894,9 +894,6 @@ _loop_vec_info::~_loop_vec_info () for (j = 0; j < nbbs; j++) { basic_block bb = bbs[j]; - for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si)) - free_stmt_vec_info (gsi_stmt (si)); - for (si = gsi_start_bb (bb); !gsi_end_p (si); ) { gimple *stmt = gsi_stmt (si); @@ -936,9 +933,6 @@ _loop_vec_info::~_loop_vec_info () } } } - - /* Free stmt_vec_info. */ - free_stmt_vec_info (stmt); gsi_next (&si); } } -- cgit v1.1