public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: Matthew Malcomson <matthew.malcomson@arm.com>,
	Richard Biener <rguenther@suse.de>,
	gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH] Reduce floating-point difficulties in timevar.cc
Date: Fri, 21 Jul 2023 23:11:03 +0800	[thread overview]
Message-ID: <f0c885d58f1dbc4ce70db79cb6a2502f60a28a56.camel@xry111.site> (raw)
In-Reply-To: <a28927b1-2517-5b87-f03a-657f28bd94fd@ispras.ru>

On Fri, 2023-07-21 at 16:58 +0300, Alexander Monakov wrote:
> 
> On Fri, 21 Jul 2023, Xi Ruoyao via Gcc-patches wrote:
> 
> > Perhaps -ffp-contract=on (not off) is enough to fix the issue (if you
> > are building GCC 14 snapshot).  The default is "fast" (if no -std=
> > option is used), which allows some contractions disallowed by the
> > standard.
> 
> Not fully, see below.
> 
> > But GCC is in C++ and I'm not sure if the C++ standard has the same
> > definition for allowed contractions as C.
> 
> It doesn't, but in GCC we should aim to provide the same semantics in C++
> as in C.
> 
> > > (Or is the severity of lack of support sufficiently different in the two 
> > > cases that this is fine -- i.e. not compile vs may trigger floating 
> > > point rounding inaccuracies?)
> > 
> > It's possible that the test itself is flaky.  Can you provide some
> > detail about how it fails?
> 
> See also PR 99903 for an earlier known issue which appears due to x87
> excess precision and so tweaking -ffp-contract wouldn't help:
> 
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99903

Does it affect AArch64 too?

> Now that multiple platforms are hitting this, can we _please_ get rid
> of the questionable attempt to compute time in a floating-point variable
> and just use an uint64_t storing nanoseconds?

To me this is the correct thing to do.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-07-21 15:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 12:11 Matthew Malcomson
2023-07-21 12:47 ` Richard Biener
2023-07-21 13:11   ` Matthew Malcomson
2023-07-21 13:41     ` Richard Biener
2023-07-21 13:45     ` Xi Ruoyao
2023-07-21 13:58       ` Alexander Monakov
2023-07-21 15:11         ` Xi Ruoyao [this message]
2023-07-21 15:56           ` Alexander Monakov
2023-07-21 15:24       ` Matthew Malcomson
2023-08-03 13:38   ` [PATCH] mid-end: Use integral time intervals " Matthew Malcomson
2023-08-03 14:09     ` David Malcolm
2023-08-03 14:54       ` Matthew Malcomson
2023-08-03 15:34         ` David Malcolm
2023-08-04  6:44     ` Richard Biener
2023-08-04  9:41       ` Matthew Malcomson
2023-08-04 10:18         ` Richard Biener
2023-07-21 12:49 ` [PATCH] Reduce floating-point difficulties " Xi Ruoyao
2023-07-21 17:41 ` Andrew Pinski

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=f0c885d58f1dbc4ce70db79cb6a2502f60a28a56.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=amonakov@ispras.ru \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=matthew.malcomson@arm.com \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.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).