diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-11-10 12:31:01 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-11-10 12:31:01 +0000 |
commit | 6ddc6a57a74c3a388eb1626e59005f54c6e66c57 (patch) | |
tree | ad74173fbfebe5e04d3a357472cc5161ffd1611f /gcc/tree-vectorizer.c | |
parent | 5720a9d5beacb558c1ddccbbfef9f9e4f91b14cf (diff) | |
download | gcc-6ddc6a57a74c3a388eb1626e59005f54c6e66c57.zip gcc-6ddc6a57a74c3a388eb1626e59005f54c6e66c57.tar.gz gcc-6ddc6a57a74c3a388eb1626e59005f54c6e66c57.tar.bz2 |
vect: Keep scalar costs around longer
The scalar costs for a loop are fleeting, with only the final
single_scalar_iteration_cost being kept for later comparison.
This patch replaces single_scalar_iteration_cost with the cost
structure, so that (with later patches) it's possible for targets
to examine other target-specific cost properties as well. This will
be done by passing the scalar costs to hooks where appropriate;
targets shouldn't try to read the information directly from
loop_vec_infos.
gcc/
* tree-vectorizer.h (_loop_vec_info::scalar_costs): New member
variable.
(_loop_vec_info::single_scalar_iteration_cost): Delete.
(LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST): Delete.
(vector_costs::total_cost): New function.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Update
after above changes.
(_loop_vec_info::~_loop_vec_info): Delete scalar_costs.
(vect_compute_single_scalar_iteration_cost): Store the costs
in loop_vinfo->scalar_costs.
(vect_estimate_min_profitable_iters): Get the scalar cost from
loop_vinfo->scalar_costs.
Diffstat (limited to 'gcc/tree-vectorizer.c')
0 files changed, 0 insertions, 0 deletions