public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Steve Ellcey <sellcey@caviumnetworks.com>,
	Michael Matz <matz@suse.de>, 	GCC Development <gcc@gcc.gnu.org>,
	Jeff Law <law@redhat.com>
Subject: Re: SPEC 456.hmmer vectorization question
Date: Thu, 09 Mar 2017 08:19:00 -0000	[thread overview]
Message-ID: <CAFiYyc1Ytg6EOuhc6dZa8E77xzeUoZUqgms8iUqeTZMKXY89xg@mail.gmail.com> (raw)
In-Reply-To: <20170309081243.GE22703@tucnak>

On Thu, Mar 9, 2017 at 9:12 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Mar 09, 2017 at 09:02:38AM +0100, Richard Biener wrote:
>> It would need to be done before graphite, and yes, the question is when
>> to do this (given the non-trival text size and runtime cost).  One option is
>> to do sth similar like we do with IFN_LOOP_VECTORIZED, that is, after
>> followup transforms decide whether the specialized version received any
>> important optimization.  Another option is to add value profile counters
>> for aliasing and only do this with FDO when we know at runtime there
>> is no aliasing.
>
> It doesn't have to be either/or.  If we have FDO, we can do it
> unconditionally if we have gathered into that there is likely no aliasing,
> and optimize the other loop (for the case of aliasing) for size.
> If we don't have FDO, we could do the IFN_LOOP_VERSIONED way.
> For IFN_LOOP_VERSIONED, if we check all aliasing cases we could then either
> use the OpenMP/Cilk/ivdep pragma loop properties (loop->safelen etc.),
> or even have something stronger (that would say that there aren't
> any inter-iteration memory dependencies).

We can use MR_DEPENDENCE_* to partition the dependences properly
as well.

For loop distribution we can also check profitability before adding any
dependence related edges and version according to them.  Of course
that needs a meaningful cost model...

Similarly you can run the ISL optimizer as if there were no dependences
and compare the resulting code to the original one with a cost model.

This is what the vectorizer does before doing the versioning.  For enablement
transforms cost modeling is of course hard unless you can chain analysis
parts of multiple passes (basically integrate loop passes into "one").

Of course this breaks down once you consider not disambiguating all
unknown dependences but only a few (in case the transform can still
handle some of those cases - the vectorizer for example cannot deal
with any unknown dependences).  (breaks down in complexity)

Richard.

>
>         Jakub

      reply	other threads:[~2017-03-09  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 22:37 Steve Ellcey
2017-03-07 13:45 ` Michael Matz
2017-03-08 19:41   ` Steve Ellcey
2017-03-09  8:02     ` Richard Biener
2017-03-09  8:12       ` Jakub Jelinek
2017-03-09  8:19         ` Richard Biener [this message]

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=CAFiYyc1Ytg6EOuhc6dZa8E77xzeUoZUqgms8iUqeTZMKXY89xg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=matz@suse.de \
    --cc=sellcey@caviumnetworks.com \
    /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).