aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:26:40 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:26:40 +0000
commitddf98a96d0112377361258068a167ba7e51ed345 (patch)
tree8ba16671a7bd4b577e839b67b6e68dbd88bcf98b /gcc/tree-vectorizer.h
parentdddecc5c01a0cdeb06704ed98eac881ead550664 (diff)
downloadgcc-ddf98a96d0112377361258068a167ba7e51ed345.zip
gcc-ddf98a96d0112377361258068a167ba7e51ed345.tar.gz
gcc-ddf98a96d0112377361258068a167ba7e51ed345.tar.bz2
[46/46] Turn stmt_vec_info back into a typedef
This patch removes the stmt_vec_info wrapper class added near the beginning of the series and turns stmt_vec_info back into a typedef. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef. (NULL_STMT_VEC_INFO): Delete. (stmt_vec_info::operator*): Likewise. (stmt_vec_info::operator gimple *): Likewise. * tree-vect-loop.c (vectorizable_reduction): Use NULL instead of NULL_STMT_VEC_INFO. * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise. (vect_reassociating_reduction_p): Likewise. * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise. (vectorizable_store): Likewise. * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise. (vec_info::free_stmt_vec_infos): Likewise. From-SVN: r263161
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h32
1 files changed, 1 insertions, 31 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 717d373..47a459b 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -21,26 +21,7 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_VECTORIZER_H
#define GCC_TREE_VECTORIZER_H
-class stmt_vec_info {
-public:
- stmt_vec_info () {}
- stmt_vec_info (struct _stmt_vec_info *ptr) : m_ptr (ptr) {}
- struct _stmt_vec_info *operator-> () const { return m_ptr; }
- struct _stmt_vec_info &operator* () const;
- operator struct _stmt_vec_info * () const { return m_ptr; }
- operator gimple * () const;
- operator void * () const { return m_ptr; }
- operator bool () const { return m_ptr; }
- bool operator == (const stmt_vec_info &x) { return x.m_ptr == m_ptr; }
- bool operator == (_stmt_vec_info *x) { return x == m_ptr; }
- bool operator != (const stmt_vec_info &x) { return x.m_ptr != m_ptr; }
- bool operator != (_stmt_vec_info *x) { return x != m_ptr; }
-
-private:
- struct _stmt_vec_info *m_ptr;
-};
-
-#define NULL_STMT_VEC_INFO (stmt_vec_info (NULL))
+typedef struct _stmt_vec_info *stmt_vec_info;
#include "tree-data-ref.h"
#include "tree-hash-traits.h"
@@ -1091,17 +1072,6 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo)
&& TYPE_PRECISION (TYPE) == 1 \
&& TYPE_UNSIGNED (TYPE)))
-inline _stmt_vec_info &
-stmt_vec_info::operator* () const
-{
- return *m_ptr;
-}
-
-inline stmt_vec_info::operator gimple * () const
-{
- return m_ptr ? m_ptr->stmt : NULL;
-}
-
static inline bool
nested_in_vect_loop_p (struct loop *loop, stmt_vec_info stmt_info)
{