diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-07-31 14:22:09 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-07-31 14:22:09 +0000 |
commit | 10681ce8cb6227ae5c11cc74ddf48f2fc5e6f87e (patch) | |
tree | 35855509f186bc71e3434bad3b0a5ae381027fc6 /gcc/tree-vect-patterns.c | |
parent | e1bd72966309ac459a55e2bc64ad355272d402f5 (diff) | |
download | gcc-10681ce8cb6227ae5c11cc74ddf48f2fc5e6f87e.zip gcc-10681ce8cb6227ae5c11cc74ddf48f2fc5e6f87e.tar.gz gcc-10681ce8cb6227ae5c11cc74ddf48f2fc5e6f87e.tar.bz2 |
[13/46] Make STMT_VINFO_RELATED_STMT a stmt_vec_info
This patch changes STMT_VINFO_RELATED_STMT from a gimple stmt to a
stmt_vec_info.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
a gimple stmt to a stmt_vec_info.
(is_pattern_stmt_p): Update accordingly.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
(vect_record_grouped_load_vectors): Likewise.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
(vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
(vect_model_reduction_cost): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_reduction, vectorizable_induction): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
Return the stmt_vec_info for the pattern statement.
(vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
(vect_split_statement, vect_mark_pattern_stmts): Likewise.
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
(vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
* tree-vect-stmts.c (vect_mark_relevant): Likewise.
(vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
(vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
(free_stmt_vec_info, vect_is_simple_use): Likewise.
From-SVN: r263128
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 4ac8f9b..6fce980 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -94,10 +94,11 @@ vect_pattern_detected (const char *name, gimple *stmt) } } -/* Associate pattern statement PATTERN_STMT with ORIG_STMT_INFO. - Set its vector type to VECTYPE if it doesn't have one already. */ +/* Associate pattern statement PATTERN_STMT with ORIG_STMT_INFO and + return the pattern statement's stmt_vec_info. Set its vector type to + VECTYPE if it doesn't have one already. */ -static void +static stmt_vec_info vect_init_pattern_stmt (gimple *pattern_stmt, stmt_vec_info orig_stmt_info, tree vectype) { @@ -107,11 +108,12 @@ vect_init_pattern_stmt (gimple *pattern_stmt, stmt_vec_info orig_stmt_info, pattern_stmt_info = orig_stmt_info->vinfo->add_stmt (pattern_stmt); gimple_set_bb (pattern_stmt, gimple_bb (orig_stmt_info->stmt)); - STMT_VINFO_RELATED_STMT (pattern_stmt_info) = orig_stmt_info->stmt; + STMT_VINFO_RELATED_STMT (pattern_stmt_info) = orig_stmt_info; STMT_VINFO_DEF_TYPE (pattern_stmt_info) = STMT_VINFO_DEF_TYPE (orig_stmt_info); if (!STMT_VINFO_VECTYPE (pattern_stmt_info)) STMT_VINFO_VECTYPE (pattern_stmt_info) = vectype; + return pattern_stmt_info; } /* Set the pattern statement of ORIG_STMT_INFO to PATTERN_STMT. @@ -123,8 +125,8 @@ vect_set_pattern_stmt (gimple *pattern_stmt, stmt_vec_info orig_stmt_info, tree vectype) { STMT_VINFO_IN_PATTERN_P (orig_stmt_info) = true; - STMT_VINFO_RELATED_STMT (orig_stmt_info) = pattern_stmt; - vect_init_pattern_stmt (pattern_stmt, orig_stmt_info, vectype); + STMT_VINFO_RELATED_STMT (orig_stmt_info) + = vect_init_pattern_stmt (pattern_stmt, orig_stmt_info, vectype); } /* Add NEW_STMT to STMT_INFO's pattern definition statements. If VECTYPE @@ -634,8 +636,7 @@ vect_split_statement (stmt_vec_info stmt2_info, tree new_rhs, { /* STMT2_INFO is part of a pattern. Get the statement to which the pattern is attached. */ - stmt_vec_info orig_stmt2_info - = vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt2_info)); + stmt_vec_info orig_stmt2_info = STMT_VINFO_RELATED_STMT (stmt2_info); vect_init_pattern_stmt (stmt1, orig_stmt2_info, vectype); if (dump_enabled_p ()) @@ -659,7 +660,7 @@ vect_split_statement (stmt_vec_info stmt2_info, tree new_rhs, } gimple_seq *def_seq = &STMT_VINFO_PATTERN_DEF_SEQ (orig_stmt2_info); - if (STMT_VINFO_RELATED_STMT (orig_stmt2_info) == stmt2_info->stmt) + if (STMT_VINFO_RELATED_STMT (orig_stmt2_info) == stmt2_info) /* STMT2_INFO is the actual pattern statement. Add STMT1 to the end of the definition sequence. */ gimple_seq_add_stmt_without_update (def_seq, stmt1); @@ -4754,8 +4755,7 @@ vect_mark_pattern_stmts (gimple *orig_stmt, gimple *pattern_stmt, } /* Switch to the statement that ORIG replaces. */ - orig_stmt_info - = vinfo_for_stmt (STMT_VINFO_RELATED_STMT (orig_stmt_info)); + orig_stmt_info = STMT_VINFO_RELATED_STMT (orig_stmt_info); /* We shouldn't be replacing the main pattern statement. */ gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) != orig_stmt); |