public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>, Jeff Law <law@redhat.com>
Cc: GCC <gcc@gcc.gnu.org>, Aldy Hernandez <aldyh@redhat.com>
Subject: Re: On-Demand range technology [3/5] - The Prototype
Date: Fri, 31 May 2019 15:36:00 -0000	[thread overview]
Message-ID: <aed70fd3-790f-413b-36cf-b817ff49b948@redhat.com> (raw)
In-Reply-To: <CAFiYyc3OG_i3XmqhKu03x+4MD0UFYDd+CvsaGpnyhzA3LZ4BuQ@mail.gmail.com>

On 5/29/19 9:11 AM, Richard Biener wrote:
> On Tue, May 28, 2019 at 4:41 PM Jeff Law <law@redhat.com> wrote:
>>
>>>> This aspect of symbolics would be handled by a relational/equivalence
>>>> processing engine that would be follow on work.  Using the same basic
>>>> model as ranges, each tree code is taught to understand the relation
>>>> between its operands, and then we can answer equivalency and relational
>>>> accurately as well.  It would be available for any pass to use
>>>> independent of ranges. I will expound upon that a bit in the future
>>>> directions section.
>>> While I agree that symbolic ranges are a complication and that most
>>> cases it currently handles are not "value-range" things I do not agree
>>> with the idea that we can simply remove handling them and deal
>>> with the fallout in some later point in the future.  Eric may also be
>>> able to show you "real" symbolic value-range magic.
>>>
>>> Note that symbolic ranges are already restricted to PLUS_EXPR
>>> and MINUS_EXPR (and NEGATE_EXPR I think).  There are
>>> also "symbolic" (non-integer constant) ranges like [&a, &a].
>>> I've never seen [&a, &MEM[&a + 4]] but we wouldn't reject those
>>> I think.
>>>
>>> You may have noticed that EVRP does not use symbolic ranges.
> Btw, I probably misremembered this part - it is equivalences that
> EVRP doesn't use.  equivalences are the "other half" of relations
> besides symbolic ranges.
>
I do get confused by this assertion...   From the EVRP dumps :

Intersecting
   int [b_6(D), b_6(D)]  EQUIVALENCES: { a_5(D) b_6(D) } (2 elements)
and
   VARYING
to
   int [b_6(D), b_6(D)]  EQUIVALENCES: { a_5(D) b_6(D) } (2 elements)
Intersecting
   int [a_5(D), a_5(D)]  EQUIVALENCES: { a_5(D) b_6(D) } (2 elements)
and
   VARYING

and

pushing new range for c_7(D): int [b_6(D), b_6(D)]  EQUIVALENCES: { 
b_6(D) c_7(D) } (2 elements)
Visiting stmt if (a_5(D) == c_7(D))


it certainly does seem to have symbolics in the range..   ( [b_6, b_6]  
) and it does use equivalencies... presumably thats why its in the 
range, to help track them..  regardless, thats is how it gets cases we 
dont right now like
   if (a == b && b == c)
      if (a == c)

It may not have symbolic expressions like [0, b_6 + 1] as end points 
like VRP does, or maybe it doesn't resolve them to anything other than 
varying, but it does appear to have symbolics?  Perhaps it resolves them 
immediately, but it does appear to use some partial bits of the symbolic 
machinery.

We'd like to make this consistent everywhere and track the equivalencies 
outside of the range via a separate mechanism.


>>> As already said I'd like to see VRP go but obstackles are
>>> symbolic ranges and jump-threading (with Jeff promising
>>> to handle the jump-threading part in the past).
>> Right.  FWIW, one of the follow-on items to this work is Aldy's
>> improvements to backwards jump threading which utilizes the ranger
>> framework -- the primary purpose of that work is to eliminate the need
>> for jump threading in VRP.
> But without relations it won't catch most of the cases...
>
> Richard.
its catching what it quite a few new things....  and the 
relations/equivalencies are coming...  I haven't heard of any issues 
regarding equivalencies, but Aldy's  the one that been working with it, 
so he can speak to it better.

Andrew


      reply	other threads:[~2019-05-31 15:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  1:29 Andrew MacLeod
2019-05-23 13:10 ` Richard Biener
2019-05-23 22:27   ` Eric Botcazou
2019-05-24  8:03     ` Toon Moene
2019-05-24  9:36     ` Richard Biener
2019-05-24 15:52       ` Andrew MacLeod
2019-05-24 15:50   ` Andrew MacLeod
2019-05-28 14:41   ` Jeff Law
2019-05-28 18:06     ` Aldy Hernandez
2019-05-29 13:11     ` Richard Biener
2019-05-31 15:36       ` Andrew MacLeod [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=aed70fd3-790f-413b-36cf-b817ff49b948@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=richard.guenther@gmail.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).