public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Ilya Enkovich <enkovich.gnu@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [vec-cmp, patch 2/6] Vectorization factor computation
Date: Tue, 20 Oct 2015 13:52:00 -0000	[thread overview]
Message-ID: <CAFiYyc3etYmOY=+cE0T_eof7Y-7rO6CmcgK6QPO8Ydvqrwbb=g@mail.gmail.com> (raw)
In-Reply-To: <CAMbmDYb0OjQ5__kUhdjdn6ygnm4Sg7deCG_Nnkpwki2yBD=Tnw@mail.gmail.com>

On Wed, Oct 14, 2015 at 1:21 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> 2015-10-13 16:37 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>> On Thu, Oct 8, 2015 at 4:59 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>> Hi,
>>>
>>> This patch handles statements with boolean result in vectorization factor computation.  For comparison its operands type is used instead of restult type to compute VF.  Other boolean statements are ignored for VF.
>>>
>>> Vectype for comparison is computed using type of compared values.  Computed type is propagated into other boolean operations.
>>
>> This feels rather ad-hoc, mixing up the existing way of computing
>> vector type and VF.  I'd rather have turned the whole
>> vector type computation around to the scheme working on the operands
>> rather than on the lhs and then searching
>> for smaller/larger types on the rhs'.
>>
>> I know this is a tricky function (heh, but you make it even worse...).
>> And it needs a helper with knowledge about operations
>> so one can compute the result vector type for an operation on its
>> operands.  The seeds should be PHIs (handled like now)
>> and loads, and yes, externals need special handling.
>>
>> Ideally we'd do things in two stages, first compute vector types in a
>> less constrained manner (not forcing a single vector size)
>> and then in a 2nd run promote to a common size also computing the VF to do that.
>
> This sounds like a refactoring, not a functional change, right? Also I
> don't see a reason to analyze DF to compute vectypes if we promote it
> to a single vector size anyway. For booleans we have to do it because
> boolean vectors of the same size may have different number of
> elements. What is the reason to do it for other types?

For conversions and operators which support different sized operands

> Shouldn't it be a patch independent from comparison vectorization series?

As you like.

>>
>> Btw, I think you "mishandle" bool b = boolvar != 0;
>
> This should be handled fine. Statement will inherit a vectype of
> 'boolvar' definition. If it's invariant - then yes, invariant boolean
> statement case is not handled. But this is only because I supposed we
> just shouldn't have such statements in a loop. If we may have them,
> then using 'vector _Bool (VF)' type for that should be OK.
>
> Ilya
>
>>
>> Richard.
>>

  reply	other threads:[~2015-10-20 13:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 15:00 Ilya Enkovich
2015-10-13 13:37 ` Richard Biener
2015-10-14 11:21   ` Ilya Enkovich
2015-10-20 13:52     ` Richard Biener [this message]
2015-11-09 13:54       ` Ilya Enkovich
2015-11-09 14:26         ` Richard Biener

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='CAFiYyc3etYmOY=+cE0T_eof7Y-7rO6CmcgK6QPO8Ydvqrwbb=g@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=enkovich.gnu@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).