On Wed, Oct 24, 2018 at 7:19 AM Richard Biener <rguent...@suse.de> wrote: > > > This does the last step (I've already changed costing, analysis and > code generation to process nodes as if it were) in making the SLP > tree a graph. This means adjusting SLP analysis to lookup already > identified SLP nodes for a set of scalar stmts and refering to a > slp_tree from multiple parents. > > This avoids blowing up during analysis and lets us vectorize > the testcase from PR87105 as well as clang does. > > I'm still fighting with the necessary refcounting, but maybe this > version did the trick. > > Re-bootstrap & regtest running on x86_64-unknown-linux-gnu, SPEC > CPU 2006 build is also on the way (though it looks like sth else > broke stuff there as well). > > Most changes are moving and re-indenting misindented stuff (looks like the > moving part isn't necessary so I'll edit it out). > > Note while costing and code generation share things cross SLP > instance the analysis part does not try to do that (I just thought > that might not be a good idea without re-vamping the whole > data structure to get rid of the idea of "separate" instances) > > Richard. > > From c0e980edec39850e4f9730b02df49cdd31ced8c0 Mon Sep 17 00:00:00 2001 > From: Richard Guenther <rguent...@suse.de> > Date: Wed, 24 Oct 2018 16:09:28 +0200 > Subject: [PATCH] make-slp-tree-a-graph > > PR tree-optimization/87105 > * tree-vectorizer.h (_slp_tree::refcnt): New member. > * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor > refcnt. > (vect_create_new_slp_node): Initialize refcnt to one. > (bst_traits): Move. > (scalar_stmts_set_t, bst_fail): Remove. > (vect_build_slp_tree_2): Add bst_map argument and adjust calls. > (vect_build_slp_tree): Add bst_map argument and lookup > already created SLP nodes. > (vect_print_slp_tree): Handle a SLP graph. > (vect_analyze_slp_instance): Adjust. > (vect_schedule_slp_instance): Add short-cut. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87801 H.J.