public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Allow copying of symbolic ranges to an irange.
Date: Wed, 16 Sep 2020 14:43:43 -0400	[thread overview]
Message-ID: <443670c9-ea0d-5950-d851-7f82081164cb@redhat.com> (raw)
In-Reply-To: <74d5d365-9efd-2c54-9087-917084108f44@redhat.com>

On 9/16/20 12:25 PM, Aldy Hernandez wrote:
>
>
> >>  // Swap min/max if they are out of order.  Return TRUE if further
> > these seems OK, but can't there be anti-ranges with symbolics  too? ie
> > ~[a_12, a_12]
> > The code for that just does:
> >
> >   else if (src.kind () == VR_ANTI_RANGE)
> >      set (src.min (), src.max (), VR_ANTI_RANGE);
> >
> > That should just go to varying I guess?
>
> Ah, you're right.  I've tweaked the patch and have added a 
> corresponding test.
>
> >
> > The conversion to legacy anti-range code also seems a little suspect in
> > some cases...
> >
> > Finally, we theoretically shouldn't be accessing 'min()' and 'max()'
> > fields in a multirange, which also looks like might happen in the final
> > else clause.
> >
> > I wonder if it might be less complex to simply have 2 routines, like
> > copy_to_legacy()  and copy_from_legacy()  instead of trying to handle
> > then together?  I do find it seems to require more thinking than it
> > should to follow the cases :-)
>
> Sigh, yes.  That code is too clever for its own good.  I'll work on it 
> as a follow-up.
>
> OK pending tests?
>
OK.  but do follow it up.

Andrew


      reply	other threads:[~2020-09-16 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 15:57 Aldy Hernandez
2020-09-15 19:59 ` Andrew MacLeod
2020-09-16 16:25   ` Aldy Hernandez
2020-09-16 18:43     ` 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=443670c9-ea0d-5950-d851-7f82081164cb@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.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).