add vec_info * parameters where needed
authorRichard Biener <rguenther@suse.de>
Mon, 16 Mar 2020 10:47:00 +0000 (11:47 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 5 May 2020 07:48:03 +0000 (09:48 +0200)
commit308bc496884706af4b3077171cbac684c7a6f7c6
treec7fb9f12b283cb185bd33cf5b3fcd34e2d56f10c
parent228646a64fc1013f9133159d2e7b05fdd9972772
add vec_info * parameters where needed

Soonish we'll get SLP nodes which have no corresponding scalar
stmt and thus not stmt_vec_info and thus no way to get back to
the associated vec_info.  This patch makes the vec_info available
as part of the APIs instead of putting in that back-pointer into
the leaf data structures.

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

* tree-vectorizer.h (_stmt_vec_info::vinfo): Remove.
(STMT_VINFO_LOOP_VINFO): Likewise.
(STMT_VINFO_BB_VINFO): Likewise.
* tree-vect-data-refs.c: Adjust for the above, adding vec_info *
parameters and adjusting calls.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.

* target.def (add_stmt_cost): Add vec_info * parameter.
* target.h (stmt_in_inner_loop_p): Likewise.
* targhooks.c (default_add_stmt_cost): Adjust.
* doc/tm.texi: Re-generate.

* config/aarch64/aarch64.c (aarch64_extending_load_p): Add
vec_info * parameter and adjust.
(aarch64_sve_adjust_stmt_cost): Likewise.
(aarch64_add_stmt_cost): Likewise.
* config/arm/arm.c (arm_add_stmt_cost): Likewise.
* config/i386/i386.c (ix86_add_stmt_cost): Likewise.
* config/rs6000/rs6000.c (rs6000_add_stmt_cost): Likewise.
16 files changed:
gcc/config/aarch64/aarch64.c
gcc/config/arm/arm.c
gcc/config/i386/i386.c
gcc/config/rs6000/rs6000.c
gcc/doc/tm.texi
gcc/target.def
gcc/target.h
gcc/targhooks.c
gcc/tree-vect-data-refs.c
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vect-patterns.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h