aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:25:47 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:25:47 +0000
commit634e7150449157267db1a1152370b11446acb6d0 (patch)
treecea9147d59e72017aab54498a40a8debc589f618 /gcc/tree-vectorizer.h
parentcef6cac8bcacc3314760686dfae7b23efdf7db07 (diff)
downloadgcc-634e7150449157267db1a1152370b11446acb6d0.zip
gcc-634e7150449157267db1a1152370b11446acb6d0.tar.gz
gcc-634e7150449157267db1a1152370b11446acb6d0.tar.bz2
[36/46] Add a pattern_stmt_p field to stmt_vec_info
This patch adds a pattern_stmt_p field to stmt_vec_info, so that it's possible to tell whether the statement is a pattern statement without referring to other statements. The new field goes in what was previously a hole in the structure, so the size is the same as before. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field. (is_pattern_stmt_p): Use it. * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p on pattern statements. From-SVN: r263151
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 37f8b87..74ea6cf 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -791,6 +791,12 @@ struct _stmt_vec_info {
/* Stmt is part of some pattern (computation idiom) */
bool in_pattern_p;
+ /* True if the statement was created during pattern recognition as
+ part of the replacement for RELATED_STMT. This implies that the
+ statement isn't part of any basic block, although for convenience
+ its gimple_bb is the same as for RELATED_STMT. */
+ bool pattern_stmt_p;
+
/* Is this statement vectorizable or should it be skipped in (partial)
vectorization. */
bool vectorizable;
@@ -1157,8 +1163,7 @@ get_later_stmt (stmt_vec_info stmt1_info, stmt_vec_info stmt2_info)
static inline bool
is_pattern_stmt_p (stmt_vec_info stmt_info)
{
- stmt_vec_info related_stmt_info = STMT_VINFO_RELATED_STMT (stmt_info);
- return related_stmt_info && STMT_VINFO_IN_PATTERN_P (related_stmt_info);
+ return stmt_info->pattern_stmt_p;
}
/* Return true if BB is a loop header. */