diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:26:31 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:26:31 +0000 |
commit | 6ef709e50228eb23c25d3620ac6eadb6d765d40d (patch) | |
tree | 433895df78a59e03d310b0cee116230e528175d7 /gcc/tree-vect-stmts.c | |
parent | 458135c0354f19eb2bd032d42c27076def8c31de (diff) | |
download | gcc-6ef709e50228eb23c25d3620ac6eadb6d765d40d.zip gcc-6ef709e50228eb23c25d3620ac6eadb6d765d40d.tar.gz gcc-6ef709e50228eb23c25d3620ac6eadb6d765d40d.tar.bz2 |
[44/46] Remove global vinfo_for_stmt-related routines
There are no more direct uses of:
- new_stmt_vec_info
- set_vinfo_for_stmt
- free_stmt_vec_infos
- free_stmt_vec_info
outside of vec_info, so they can now be private member functions.
It also seemed better to put them in tree-vectorizer.c, along with the
other vec_info routines.
We can also get rid of:
- vinfo_for_stmt
- stmt_vec_info_vec
- set_stmt_vec_info_vec
since nothing now uses them. This was the main goal of the series.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
(vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
(vec_info::free_stmt_vec_info): New private member functions.
(set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
(set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
* tree-parloops.c (gather_scalar_reductions): Remove calls to
set_stmt_vec_info_vec and free_stmt_vec_infos.
* tree-vect-loop.c (_loop_vec_info): Remove call to
set_stmt_vec_info_vec.
* tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
(free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
* tree-vectorizer.c (vec_info::new_stmt_vec_info)
(vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
(vec_info::free_stmt_vec_info): ...these new functions. Remove
assignments in {vec_info::,}new_stmt_vec_info that are redundant
with the clearing in the xcalloc.
(stmt_vec_info_vec): Delete.
(vec_info::vec_info): Don't call set_stmt_vec_info_vec.
(vectorize_loops): Likewise.
(vec_info::~vec_info): Remove argument from call to
free_stmt_vec_infos.
(vec_info::add_stmt): Remove vinfo argument from call to
new_stmt_vec_info.
From-SVN: r263159
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 12f1cac..568705c 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -9853,97 +9853,6 @@ vect_remove_stores (stmt_vec_info first_stmt_info) } } - -/* Function new_stmt_vec_info. - - Create and initialize a new stmt_vec_info struct for STMT. */ - -stmt_vec_info -new_stmt_vec_info (gimple *stmt, vec_info *vinfo) -{ - stmt_vec_info res; - res = (_stmt_vec_info *) xcalloc (1, sizeof (struct _stmt_vec_info)); - - STMT_VINFO_TYPE (res) = undef_vec_info_type; - STMT_VINFO_STMT (res) = stmt; - res->vinfo = vinfo; - STMT_VINFO_RELEVANT (res) = vect_unused_in_scope; - STMT_VINFO_LIVE_P (res) = false; - STMT_VINFO_VECTYPE (res) = NULL; - STMT_VINFO_VEC_STMT (res) = NULL; - STMT_VINFO_VECTORIZABLE (res) = true; - STMT_VINFO_IN_PATTERN_P (res) = false; - STMT_VINFO_PATTERN_DEF_SEQ (res) = NULL; - STMT_VINFO_VEC_REDUCTION_TYPE (res) = TREE_CODE_REDUCTION; - STMT_VINFO_VEC_CONST_COND_REDUC_CODE (res) = ERROR_MARK; - - if (gimple_code (stmt) == GIMPLE_PHI - && is_loop_header_bb_p (gimple_bb (stmt))) - STMT_VINFO_DEF_TYPE (res) = vect_unknown_def_type; - else - STMT_VINFO_DEF_TYPE (res) = vect_internal_def; - - STMT_VINFO_SAME_ALIGN_REFS (res).create (0); - STMT_SLP_TYPE (res) = loop_vect; - STMT_VINFO_NUM_SLP_USES (res) = 0; - - res->first_element = NULL; /* GROUP_FIRST_ELEMENT */ - res->next_element = NULL; /* GROUP_NEXT_ELEMENT */ - res->size = 0; /* GROUP_SIZE */ - res->store_count = 0; /* GROUP_STORE_COUNT */ - res->gap = 0; /* GROUP_GAP */ - res->same_dr_stmt = NULL; /* GROUP_SAME_DR_STMT */ - - /* This is really "uninitialized" until vect_compute_data_ref_alignment. */ - res->dr_aux.misalignment = DR_MISALIGNMENT_UNINITIALIZED; - - return res; -} - - -/* Set the current stmt_vec_info vector to V. */ - -void -set_stmt_vec_info_vec (vec<stmt_vec_info> *v) -{ - stmt_vec_info_vec = v; -} - -/* Free the stmt_vec_info entries in V and release V. */ - -void -free_stmt_vec_infos (vec<stmt_vec_info> *v) -{ - unsigned int i; - stmt_vec_info info; - FOR_EACH_VEC_ELT (*v, i, info) - if (info != NULL_STMT_VEC_INFO) - free_stmt_vec_info (info); - if (v == stmt_vec_info_vec) - stmt_vec_info_vec = NULL; - v->release (); -} - - -/* Free stmt vectorization related info. */ - -void -free_stmt_vec_info (stmt_vec_info stmt_info) -{ - if (stmt_info->pattern_stmt_p) - { - gimple_set_bb (stmt_info->stmt, NULL); - tree lhs = gimple_get_lhs (stmt_info->stmt); - if (lhs && TREE_CODE (lhs) == SSA_NAME) - release_ssa_name (lhs); - } - - STMT_VINFO_SAME_ALIGN_REFS (stmt_info).release (); - STMT_VINFO_SIMD_CLONE_INFO (stmt_info).release (); - free (stmt_info); -} - - /* Function get_vectype_for_scalar_type_and_size. Returns the vector type corresponding to SCALAR_TYPE and SIZE as supported |