From: Aldy Hernandez <aldyh@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
Joseph Myers <joseph@codesourcery.com>,
GCC patches <gcc-patches@gcc.gnu.org>,
Andrew MacLeod <amacleod@redhat.com>
Subject: Re: [PATCH] [range-ops] Implement sqrt.
Date: Fri, 18 Nov 2022 12:57:03 +0100 [thread overview]
Message-ID: <CAGm3qMViqD8oF+XHe+5rK7e+GxGaoEKW8beKKZAnNrQHWZrFjw@mail.gmail.com> (raw)
In-Reply-To: <80f2ee68-8ec9-b3d8-82ea-88a1f12421e7@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2530 bytes --]
I wonder if instead of disabling ranger altogether, we could disable code
changes (constant propagation, jump threading and simplify_using_ranges)?
Or does that sound like too much hassle?
It seems that some passes (instruction selection?) could benefit from
global ranges being available even if no propagation was done.
Just a thought. I don't have strong opinions here.
Aldy
On Fri, Nov 18, 2022, 12:20 Aldy Hernandez <aldyh@redhat.com> wrote:
>
>
> On 11/18/22 11:44, Jakub Jelinek wrote:
> > On Fri, Nov 18, 2022 at 11:37:42AM +0100, Aldy Hernandez wrote:
> >>> Practically strictly
> >>> preserving IEEE exceptions is only important for a very small
> audience, and
> >>> for that even INEXACT will matter (but we still have -ftrapping-math
> >>> by default).
> >>> For that audience likely all constant / range propagation is futile
> and thus the
> >>> easiest thing might be to simply cut that off completely?
> >>>
> >>> I'd say what ranger does is reasonable with -ftrapping-math given the
> current
> >>> practice of handling this option. There's no point in trying to
> preserve the
> >>> (by accident) "better" handling without ranger. Instead as Joseph
> says somebody
> >>> would need to sit down, split -ftrapping-math, adjust the default and
> thorougly
> >>> document things (also with -fnon-call-exceptions which magically makes
> >>> IEEE flag raising operations possibly throw exceptions). As there's
> currently
> >>> no code motion barriers for FP code with respect to exception flag
> inspection
> >>> any dead code we preserve is likely going to be unhelpful.
> >>>
> >>> So for now simply amend the documentation as to what -ftrapping-math
> >>> currently means with respect to range/constant propagation?
> >>
> >> So something like "Even in the presence of -ftrapping-math, VRP may fold
> >> operations that may cause exceptions For example, an addition that is
> >> guaranteed to produce a NAN, may be replaced with a NAN, thus eliding
> the
> >> addition. This may cause any exception that may have been generated by
> the
> >> addition to not appear in the final program."
> >>
> >> ??
> >
> > If we just adjust user expectations for -ftrapping-math, shouldn't we
> > introduce another option that will make sure we never optimize away
> floating
> > point operations which can trap (and probably just disable frange for
> that
> > mode)?
>
> That seems like a big hammer, but sure. We could change
> frange::supports_p() to return false for flag_severely_limiting_option :).
>
> Aldy
>
next prev parent reply other threads:[~2022-11-18 11:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 20:05 Aldy Hernandez
2022-11-13 20:39 ` Jakub Jelinek
2022-11-14 7:45 ` Aldy Hernandez
2022-11-14 14:30 ` Jeff Law
2022-11-14 14:35 ` Jakub Jelinek
2022-11-14 14:48 ` Jeff Law
2022-11-14 15:01 ` Aldy Hernandez
2022-11-14 21:55 ` Joseph Myers
2022-11-16 20:32 ` Jakub Jelinek
2022-11-17 16:40 ` Aldy Hernandez
2022-11-17 16:48 ` Aldy Hernandez
2022-11-17 17:42 ` Aldy Hernandez
2022-11-17 18:59 ` Joseph Myers
2022-11-17 19:37 ` Jakub Jelinek
2022-11-17 20:43 ` Joseph Myers
2022-11-18 8:39 ` Richard Biener
2022-11-18 10:37 ` Aldy Hernandez
2022-11-18 10:44 ` Jakub Jelinek
2022-11-18 11:20 ` Aldy Hernandez
2022-11-18 11:57 ` Aldy Hernandez [this message]
2022-11-18 12:14 ` 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=CAGm3qMViqD8oF+XHe+5rK7e+GxGaoEKW8beKKZAnNrQHWZrFjw@mail.gmail.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=joseph@codesourcery.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).