public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <sebpop@gmail.com>
To: Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][GRAPHITE] Speedup SCOP detection some more, add region handling to domwalk
Date: Thu, 28 Sep 2017 20:13:00 -0000	[thread overview]
Message-ID: <CAFk3UF87NC-hJmCpzR2GGDgcnQq1CuEREYdEEajJHONkBPpdiQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1709271302380.26836@zhemvz.fhfr.qr>

On Wed, Sep 27, 2017 at 6:07 AM, Richard Biener <rguenther@suse.de> wrote:
>
> This removes another quadraticness from SCOP detection, gather_bbs
> domwalk.  This is done by enhancing domwalk to handle SEME regions
> via a special return value from before_dom_children.
>
> With this I'm now confident to remove the
> PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION parameter and its associated limit.
> Being there I've adjusted PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS to its
> documented default value which enables 90 more loos to be processed
> in SPEC CPU 2006.  I've also made a value of zero magic in disabling
> the limit (a trick commonly used in GCC).
>
> Statistics I have gathered a few patches before for SPEC CPU 2006:
>
> 1255 multi-loop SESEs in SCOP processing
> max. params 34, 3 scops >= 20, 15 scops >= 10, 33 scops >= 8
> max. drs per scop 869, 10 scops >= 100
> max. pbbs per scop 36, 12 scops >= 10
> 919 SCOPs fail in build_alias_sets
>
> which shows the default for PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
> is reasonable (if tuned to SPEC CPU 2006).
>
> I've also included the hunk that allows -fgraphite-identity
> to work ontop of -floop-nest-optimize and for -floop-nest-optimize
> -ftree-parallelize-all also make sure to code-gen loops that
> end up not transformed.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, SPEC CPU 2006
> tested, applied to trunk.
>
> Richard.
>
> 2017-09-27  Richard Biener  <rguenther@suse.de>
>
>         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
>         (graphite-max-nb-scop-params): Document special value zero.
>         * domwalk.h (dom_walker::STOP): New symbolical constant.
>         (dom_walker::dom_walker): Add optional parameter for bb to
>         RPO mapping.
>         (dom_walker::~dom_walker): Declare.
>         (dom_walker::before_dom_children): Document STOP return value.
>         (dom_walker::m_user_bb_to_rpo): New member.
>         (dom_walker::m_bb_to_rpo): Likewise.
>         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
>         mapping here if not provided by the user.
>         (dom_walker::~dom_walker): Free bb to RPO mapping if not
>         provided by the user.
>         (dom_walker::STOP): Define.
>         (dom_walker::walk): Do not compute bb to RPO mapping here.
>         Support STOP return value from before_dom_children to stop
>         walking.
>         * graphite-optimize-isl.c (optimize_isl): If the schedule
>         is the same still generate code if -fgraphite-identity
>         or -floop-parallelize-all are given.
>         * graphite-scop-detection.c: Include cfganal.h.
>         (gather_bbs::gather_bbs): Get and pass through bb to RPO
>         mapping.
>         (gather_bbs::before_dom_children): Return STOP for BBs
>         not in the region.
>         (build_scops): Compute bb to RPO mapping and pass it to
>         the domwalk.  Treat --param graphite-max-nb-scop-params=0
>         as not limiting the number of params.
>         * graphite.c (graphite_initialize): Remove limit on the
>         number of basic-blocks in a function.
>         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
>         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
>         default value of 10.

The patch looks good.  Thanks!

>
> Index: gcc/doc/invoke.texi
> ===================================================================
> --- gcc/doc/invoke.texi (revision 253224)
> +++ gcc/doc/invoke.texi (working copy)
> @@ -10512,13 +10512,9 @@ sequence pairs.  This option only applie
>  @item graphite-max-nb-scop-params
>  To avoid exponential effects in the Graphite loop transforms, the
>  number of parameters in a Static Control Part (SCoP) is bounded.  The
> -default value is 10 parameters.

Now that we have "compute-out" functionality in all supported
versions of isl, let's remove this parameter.

We needed this in the past when isl was not able to stop an
exponential computation, and that happened when operating
on large dimension spaces.

  reply	other threads:[~2017-09-28 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 11:09 Richard Biener
2017-09-28 20:13 ` Sebastian Pop [this message]
2017-09-28 20:29 ` Sebastian Pop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFk3UF87NC-hJmCpzR2GGDgcnQq1CuEREYdEEajJHONkBPpdiQ@mail.gmail.com \
    --to=sebpop@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).