aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2016-05-24 14:05:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2016-05-24 14:05:20 +0000
commitfce57248c89d5b990d1f82a2f8eba5a9741c9ad9 (patch)
treefea3d6343aca03af342d9d4ea601fc7a7abb9a42 /gcc/tree-vectorizer.h
parentd1fb69400edb679142810fb86cc4c80254c60787 (diff)
downloadgcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.zip
gcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.tar.gz
gcc-fce57248c89d5b990d1f82a2f8eba5a9741c9ad9.tar.bz2
Clean up PURE_SLP_STMT handling
The vectorizable_* routines had many instances of: slp_node || PURE_SLP_STMT (stmt_info) which gives the misleading impression that we can have !slp_node && PURE_SLP_STMT (stmt_info). In this context it's really enough to test slp_node on its own. There are three cases: loop vectorisation only: vectorizable_foo called only with !slp_node pure SLP: vectorizable_foo called only with slp_node hybrid SLP: (e.g. a vector that's used in SLP statements and also in a reduction) - vectorizable_foo called once with slp_node for the SLP uses. - vectorizable_foo called once with !slp_node for the non-SLP uses. Hybrid SLP isn't possible for stores, so I added an explicit assert for that. I also made vectorizable_comparison static, to make it obvious that no other callers outside tree-vect-stmts.c could use it with the !slp && PURE_SLP_STMT combination. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vectorizable_comparison): Delete. * tree-vect-loop.c (vectorizable_reduction): Remove redundant PURE_SLP_STMT check. * tree-vect-stmts.c (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_store): Likewise. Assert that we don't have hybrid SLP. (vectorizable_comparison): Make static. Remove redundant PURE_SLP_STMT check. (vect_transform_stmt): Assert that we always have an slp_node if PURE_SLP_STMT. From-SVN: r236642
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index bd1d55a..5816006 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1004,8 +1004,6 @@ extern void vect_remove_stores (gimple *);
extern bool vect_analyze_stmt (gimple *, bool *, slp_tree);
extern bool vectorizable_condition (gimple *, gimple_stmt_iterator *,
gimple **, tree, int, slp_tree);
-extern bool vectorizable_comparison (gimple *, gimple_stmt_iterator *,
- gimple **, tree, int, slp_tree);
extern void vect_get_load_cost (struct data_reference *, int, bool,
unsigned int *, unsigned int *,
stmt_vector_for_cost *,