[09/46] Add vec_info::lookup_single_use
commitaaac0b1019b8def62de47d14632d5b88132eaf17
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:21:51 +0000 (31 14:21 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 14:21:51 +0000 (31 14:21 +0000)
tree1ca4973bd7c74cc1e5bda94fe35cba4da262da40
parent9cfd4e76d1ea65367610eb989ea6373c78d7d722
[09/46] Add vec_info::lookup_single_use

This patch adds a helper function for seeing whether there is a single
user of an SSA name, and whether that user has a stmt_vec_info.

2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vectorizer.h (vec_info::lookup_single_use): Declare.
* tree-vectorizer.c (vec_info::lookup_single_use): New function.
* tree-vect-loop.c (vectorizable_reduction): Use it instead of
a single_imm_use-based sequence.
* tree-vect-stmts.c (supportable_widening_operation): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263124 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h