public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Roger Sayle <roger@nextmovesoftware.com>,
	'Jeff Law' <jeffreyalaw@gmail.com>
Cc: 'GCC Patches' <gcc-patches@gcc.gnu.org>,
	'Richard Biener' <richard.guenther@gmail.com>,
	Aldy Hernandez <aldyh@redhat.com>
Subject: Re: [PATCH] Ignore (possible) signed zeros in operands of FP comparisons.
Date: Fri, 18 Mar 2022 09:07:42 -0400	[thread overview]
Message-ID: <b4548fe3-462a-165f-b7f6-d99041217dfd@redhat.com> (raw)
In-Reply-To: <00dc01d83a9b$e50e2140$af2a63c0$@nextmovesoftware.com>

On 3/18/22 03:43, Roger Sayle wrote:
> Hi Jeff/Andrew,
>> If you're going to do more work in this space, you might want to reach out to
>> Aldy and Andrew to see if there's space for collaboration.
> One (clever?) suggestion that I do have for ranger would be to add support for
> an additional value_range_kind, VR_NONZEROBITS, which would be a variant of
> VR_RANGE (for unsigned types?) and require very few changes to the existing


I think were ahead of you here.. Tracking known zero and one bits within 
irange as an adjunct has been in plan for awhile, just priorities 
haven't allowed us to get to it until recently...

Theres a bunch of stuff already in the hopper for the next stage1 that 
Aldy has been working with... he can expound upon it, but we plan to use 
both masks and ranges together  as appropriate.


> code.  Just like VR_RANGE all values would lie in [MIN, MAX], so by default
> treating this value_range_kind identically to VR_RANGE there should be no
> visible changes, but the change in semantics is that MIN has the minimum bits
> set, and MAX, the maximum bits set [equivalent to the RVAL and RMASK pairs
> from CCP's bit_value_{bin,un}op].  Hence, the VR_NONZEROBITS range [2,7]
> would represent the possible values {2, 3, 6, 7} rather than {2, 3, 4, 5, 6, 7}.
> For a small number of bits, int_range can already handle this with multiple
> irange spans, but adding this representation would allow the unification of the
> bit-based propagation performed in tree-ssa-ccp with the range-value based
> propagation performed in EVRP/ranger, allowing the clever forwards/backwards
> functionality.
>
> As Andrew's recent (partial) review points out, tracking the effect of operations
> like BIT_XOR_EXPR on VR_RANGE is much more complicated than on the
> proposed VR_NONZEROBITS.
>
> Alas, I'm not the sort of contributor to make large infrastructure changes
> myself, but if the above functionality were in place, I/the compiler would
> be able to make use of it.
>

And this is exactly what we are hoping.. we provide the structure and 
someone who is better at the underlying detail interaction can flesh out 
whatever specifics they find interesting.


Andrew


  reply	other threads:[~2022-03-18 13:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 19:25 Roger Sayle
2022-03-15  7:29 ` Richard Biener
2022-03-15  8:03   ` Roger Sayle
2022-03-15 10:50     ` Richard Biener
2022-03-17 23:27     ` Jeff Law
2022-03-18  2:12       ` Andrew MacLeod
2022-03-18  7:43       ` Roger Sayle
2022-03-18 13:07         ` Andrew MacLeod [this message]
2022-03-18 18:07           ` Aldy Hernandez
2022-03-18 13:16       ` Andrew MacLeod
2022-03-18 16:01         ` Jeff Law
2022-03-18 18:33           ` Aldy Hernandez
2022-03-21 15:56             ` Aldy Hernandez
2022-03-26 18:52               ` Roger Sayle
2022-03-16  9:44   ` Richard Sandiford

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=b4548fe3-462a-165f-b7f6-d99041217dfd@redhat.com \
    --to=amacleod@redhat.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=roger@nextmovesoftware.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).