]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/96043 - BB vectorization costing improvement
authorRichard Biener <rguenther@suse.de>
Tue, 8 Sep 2020 12:49:59 +0000 (14:49 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 10 Sep 2020 09:18:18 +0000 (11:18 +0200)
commit47ddf4c7b1d4471cb9534f27844ab5e4279c2168
tree5983e9d8c24326c178aa7f721b107e4651fa1628
parent484af18ee1c63eb8d212563e40aa765da5be7f82
tree-optimization/96043 - BB vectorization costing improvement

This makes the BB vectorizer cost independent SLP subgraphs
separately.  While on pristine trunk and for x86_64 I failed to
distill a testcase where the vectorizer would think _any_
basic-block vectorization opportunity is not profitable I do
have pending work that would make the cost savings of a
profitable opportunity make another independently not
profitable opportunity vectorized.

2020-09-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/96043
* tree-vectorizer.h (_slp_instance::cost_vec): New.
(_slp_instance::subgraph_entries): Likewise.
(BB_VINFO_TARGET_COST_DATA): Remove.
* tree-vect-slp.c (vect_free_slp_instance): Free
cost_vec and subgraph_entries.
(vect_analyze_slp_instance): Initialize them.
(vect_slp_analyze_operations): Defer passing costs to
the target, instead record them in the SLP graph entry.
(get_ultimate_leader): New helper for graph partitioning.
(vect_bb_partition_graph_r): Likewise.
(vect_bb_partition_graph): New function to partition the
SLP graph into independently costable parts.
(vect_bb_vectorization_profitable_p): Adjust to work on
a subgraph.
(vect_bb_vectorization_profitable_p): New wrapper,
discarding non-profitable vectorization of subgraphs.
(vect_slp_analyze_bb_1): Call vect_bb_partition_graph before
costing.

* gcc.dg/vect/costmodel/x86_64/costmodel-pr69297.c: Adjust.
gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr69297.c
gcc/tree-vect-slp.c
gcc/tree-vectorizer.h
This page took 0.06416 seconds and 5 git commands to generate.