diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:21:56 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:21:56 +0000 |
commit | dbe1b846648fad29d105e2e503120a4279a32593 (patch) | |
tree | 802554bcedd96fbe606d76e35cf2b1dc4d319c9d /gcc/tree-vect-patterns.c | |
parent | 0d0a4e205bb6da84e9218c483acf7b13453f0698 (diff) | |
download | gcc-dbe1b846648fad29d105e2e503120a4279a32593.zip gcc-dbe1b846648fad29d105e2e503120a4279a32593.tar.gz gcc-dbe1b846648fad29d105e2e503120a4279a32593.tar.bz2 |
[10/46] Temporarily make stmt_vec_info a class
This patch turns stmt_vec_info into an unspeakably bad wrapper class
and adds an implicit conversion to the associated gimple stmt.
Having this conversion makes the rest of the series easier to write,
but since the class goes away again at the end of the series, I've
not bothered adding any comments or tried to make it pretty.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vectorizer.h (stmt_vec_info): Temporarily change from
a typedef to a wrapper class.
(NULL_STMT_VEC_INFO): New macro.
(vec_info::stmt_infos): Change to vec<stmt_vec_info>.
(stmt_vec_info::operator*): New function.
(stmt_vec_info::operator gimple *): Likewise.
(set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
(add_stmt_costs): Likewise.
* tree-vect-loop-manip.c (iv_phi_p): Likewise.
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
(vect_get_known_peeling_cost): Likewise.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
* tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
* tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
(vectorizable_store, free_stmt_vec_infos): Likewise.
(new_stmt_vec_info): Change return type of xcalloc to
_stmt_vec_info *.
From-SVN: r263125
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 4f9f092..f4174e4 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -103,7 +103,7 @@ vect_init_pattern_stmt (gimple *pattern_stmt, stmt_vec_info orig_stmt_info, { vec_info *vinfo = orig_stmt_info->vinfo; stmt_vec_info pattern_stmt_info = vinfo->lookup_stmt (pattern_stmt); - if (pattern_stmt_info == NULL) + if (pattern_stmt_info == NULL_STMT_VEC_INFO) pattern_stmt_info = orig_stmt_info->vinfo->add_stmt (pattern_stmt); gimple_set_bb (pattern_stmt, gimple_bb (orig_stmt_info->stmt)); |