On Tue, Sep 26, 2017 at 7:03 AM, Richard Biener <rguent...@suse.de> wrote:
> > The following is the result of me trying to understand SCOP detection > and the validity checks spread around the machinery. It removes several > quadraticnesses by folding validity checks into > scop_detection::harmful_loop_in_region where we already walk over all > BBs in the region and process individual found loops. > > It also rewrites build_scop_depth/build_scop_breadth into something > I can undestand. > > Bootstrap and regtest is running on x86_64-unknown-linux-gnu (graphite.exp > for all langs is happy, so is SPEC CPU 2006 testing where the statistics > agree before/after the patch). > > I'll apply this after the bootstrap finished. > Have you tried to bootstrap with BOOT_CFLAGS="-O2 -fgraphite-identity"? > Richard. > > 2017-09-26 Richard Biener <rguent...@suse.de> > > * graphite-scop-detection.c (scop_detection::build_scop_depth): > Rewrite, > fold in ... > (scop_detection::build_scop_breadth): ... this. Removed. > (scop_detection::loop_is_valid_in_scop): Fold into single caller. > (scop_detection::harmful_stmt_in_bb): Likewise. > (scop_detection::graphite_can_represent_stmt): Likewise. > (scop_detection::loop_body_is_valid_scop): Likewise. Remove > recursion. > (scop_detection::can_represent_loop): Remove recursion, fold in > ... > (scop_detection::can_represent_loop_1): ... this. Removed. > (scop_detection::harmful_loop_in_region): Simplify after inlining > the above and remove more quadraticness. > (build_scops): Adjust. > * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless > quadraticness. > > This goes in the right direction: it cuts down compilation time. As it is not a trivial change, I need some time to understand how the scop detection works with this change. Sebastian