]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/target.def
add vectype parameter to add_stmt_cost hook
authorRichard Biener <rguenther@suse.de>
Wed, 13 May 2020 12:09:40 +0000 (14:09 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 13 May 2020 15:19:38 +0000 (17:19 +0200)
commit78db0e093e69f360ac1ef871ca08895a4d2bec06
tree0947d6f76ea1b64662ee13ecf46033c789754221
parentf9f98e59a7f6663f31b671c44998190079097f97
add vectype parameter to add_stmt_cost hook

This adds a vectype parameter to add_stmt_cost which avoids the need
to pass down a (wrong) stmt_info just to carry this information.
Useful for invariants which do not have a stmt_info associated.

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

* target.def (add_stmt_cost): Add new vectype parameter.
* targhooks.c (default_add_stmt_cost): Adjust.
* targhooks.h (default_add_stmt_cost): Likewise.
* config/aarch64/aarch64.c (aarch64_add_stmt_cost): Take new
vectype parameter.
* 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.

* tree-vectorizer.h (stmt_info_for_cost::vectype): Add.
(dump_stmt_cost): Add new vectype parameter.
(add_stmt_cost): Likewise.
(record_stmt_cost): Likewise.
(record_stmt_cost): Add overload with old signature.
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Adjust.
(vect_get_known_peeling_cost): Likewise.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vectorizer.c (dump_stmt_cost): Add new vectype parameter.
* tree-vect-stmts.c (record_stmt_cost): Likewise.
(vect_prologue_cost_for_slp_op): Remove stmt_vec_info parameter
and pass down correct vectype and NULL stmt_info.
(vect_model_simple_cost): Adjust.
(vect_model_store_cost): Likewise.
13 files changed:
gcc/ChangeLog
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/targhooks.c
gcc/targhooks.h
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h