2017-11-29 Richard Biener <rguenther@suse.de>
commitbd29fdb1a9db4a7925e241715f35df4363c39e9e
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Nov 2017 14:38:06 +0000 (29 14:38 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Nov 2017 14:38:06 +0000 (29 14:38 +0000)
treedb9b2a10fc6481be1fda9bfc85276cb2c9e9f376
parent97374f83b592474e15db51238f1de3646d59335b
2017-11-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/83202
* tree-vect-slp.c (scalar_stmts_set_t): New typedef.
(bst_fail): Use it.
(vect_analyze_slp_cost_1): Add visited set, do not account SLP
nodes vectorized to the same stmts multiple times.
(vect_analyze_slp_cost): Allocate a visited set and pass it down.
(vect_analyze_slp_instance): Adjust.
(scalar_stmts_to_slp_tree_map_t): New typedef.
(vect_schedule_slp_instance): Add a map recording the SLP node
representing the vectorized stmts for a set of scalar stmts.
Avoid code-generating redundancies.
(vect_schedule_slp): Allocate map and pass it down.

* gcc.dg/vect/costmodel/x86_64/costmodel-pr83202.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255233 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr83202.c [new file with mode: 0644]
gcc/tree-vect-slp.c