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-loop.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-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 4fe3e1d..e451cbc 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1139,7 +1139,7 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo) j, si) { struct _stmt_vec_info *stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; (void) add_stmt_cost (target_cost_data, si->count, si->kind, stmt_info, si->misalign, vect_body); @@ -3351,7 +3351,7 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, FOR_EACH_VEC_ELT (*scalar_cost_vec, j, si) { stmt_vec_info stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; retval += record_stmt_cost (prologue_cost_vec, si->count * peel_iters_prologue, si->kind, stmt_info, si->misalign, @@ -3361,7 +3361,7 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, FOR_EACH_VEC_ELT (*scalar_cost_vec, j, si) { stmt_vec_info stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; retval += record_stmt_cost (epilogue_cost_vec, si->count * *peel_iters_epilogue, si->kind, stmt_info, si->misalign, @@ -3504,7 +3504,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, j, si) { struct _stmt_vec_info *stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; (void) add_stmt_cost (target_cost_data, si->count, si->kind, stmt_info, si->misalign, vect_epilogue); @@ -3541,7 +3541,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, FOR_EACH_VEC_ELT (LOOP_VINFO_SCALAR_ITERATION_COST (loop_vinfo), j, si) { struct _stmt_vec_info *stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; (void) add_stmt_cost (target_cost_data, si->count * peel_iters_prologue, si->kind, stmt_info, si->misalign, @@ -3573,7 +3573,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, FOR_EACH_VEC_ELT (prologue_cost_vec, j, si) { struct _stmt_vec_info *stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; (void) add_stmt_cost (data, si->count, si->kind, stmt_info, si->misalign, vect_prologue); } @@ -3581,7 +3581,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, FOR_EACH_VEC_ELT (epilogue_cost_vec, j, si) { struct _stmt_vec_info *stmt_info - = si->stmt ? vinfo_for_stmt (si->stmt) : NULL; + = si->stmt ? vinfo_for_stmt (si->stmt) : NULL_STMT_VEC_INFO; (void) add_stmt_cost (data, si->count, si->kind, stmt_info, si->misalign, vect_epilogue); } |