2016-07-03 Richard Biener <rguenther@suse.de>
commit44b24fa084932d30b6ac74a890499566abde55e9
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 07:28:28 +0000 (3 07:28 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 07:28:28 +0000 (3 07:28 +0000)
tree7fdd88d9eb9c5f83544cb4ff2ec1df7197ccc648
parent358f3a0662b79de06420e7aa96864b6e43a063d3
2016-07-03  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
reduction PHIs.
(vect_force_simple_reduction): Record reduction def -> phi mapping.
(vectorizable_reduction): Perform reduction PHI creation when
visiting a reduction PHI and adjust and simplify code generation
phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
(vect_transform_loop): Visit reduction PHIs.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
defs into the SLP tree.
(vect_build_slp_tree): Reduction defs terminate the recursion.
* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
of reduction defs.
(vect_get_vec_defs_for_stmt_copy): Export.
(vect_get_vec_defs): Likewise.
* tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
purpose.
(vect_get_vec_defs_for_stmt_copy): Declare.
(vect_get_vec_defs): Likewise.

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