Add explicit SLP_TREE_LANES
authorRichard Biener <rguenther@suse.de>
Fri, 29 May 2020 09:23:05 +0000 (11:23 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 4 Jun 2020 13:57:45 +0000 (15:57 +0200)
commita0dae768c6f78eba6997930065b55184202d87ba
tree745fe20263889703d48e9d8673d29eb6687d6a07
parente1008cd1d8504775e6a5e39325e396e61b39b84c
Add explicit SLP_TREE_LANES

This adds an explicit number of scalar lanes to the SLP node
avoiding to dispatch between stmts/ops and eventually not require
those vectors at all.

2020-05-27  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (_slp_tree::lanes): New.
(SLP_TREE_LANES): Likewise.
* tree-vect-loop.c (vect_create_epilog_for_reduction): Use it.
(vectorizable_reduction): Likewise.
(vect_transform_cycle_phi): Likewise.
(vectorizable_induction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-slp.c (_slp_tree::_slp_tree): Initialize lanes.
(vect_create_new_slp_node): Likewise.
(slp_copy_subtree): Copy it.
(vect_optimize_slp): Use it.
(vect_slp_analyze_node_operations_1): Likewise.
(vect_slp_convert_to_external): Likewise.
(vect_bb_vectorization_profitable_p): Likewise.
* tree-vect-stmts.c (vectorizable_load): Likewise.
(get_vectype_for_scalar_type): Likewise.
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h