From: Richard Biener <richard.guenther@gmail.com>
To: Joseph Myers <josmyers@redhat.com>
Cc: "Kewen.Lin" <linkw@linux.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>,
Richard Sandiford <richard.sandiford@arm.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
Peter Bergner <bergner@linux.ibm.com>,
Michael Meissner <meissner@linux.ibm.com>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993]
Date: Fri, 10 May 2024 08:31:00 +0200 [thread overview]
Message-ID: <CAFiYyc34SP1_HRCN+4B+L0yAkaUz8AZKsqM=0Ksvtkqp5spFVA@mail.gmail.com> (raw)
In-Reply-To: <678c653f-b635-c3df-8a7b-8783a638e76e@redhat.com>
On Thu, May 9, 2024 at 9:12 PM Joseph Myers <josmyers@redhat.com> wrote:
>
> On Wed, 8 May 2024, Kewen.Lin wrote:
>
> > to widen IFmode to TFmode. To make build_common_tree_nodes
> > be able to find the correct mode for long double type node,
> > it introduces one hook mode_for_longdouble to offer target
> > a way to specify the mode used for long double type node.
>
> I don't really like layering a hook on top of the old target macro as a
> way to address a deficiency in the design of that target macro (floating
> types should have their mode, not a poorly defined precision value,
> specified directly by the target).
Seconded.
> A better hook design might be something like mode_for_floating_type (enum
> tree_index), where the argument is TI_FLOAT_TYPE, TI_DOUBLE_TYPE or
> TI_LONG_DOUBLE_TYPE, replacing all definitions and uses of
> FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE and LONG_DOUBLE_TYPE_SIZE with the
> single new hook and appropriate definitions for each target (with a
> default definition that uses SFmode for float and DFmode for double and
> long double, which would be suitable for many targets).
In fact replacing all of X_TYPE_SIZE with a single hook might be worthwhile
though this removes the "convenient" defaulting, requiring each target to
enumerate all standard C ABI type modes. But that might be also a good thing.
The most pragmatic solution would be to do
s/LONG_DOUBLE_TYPE_SIZE/LONG_DOUBLE_TYPE_MODE/
Richard.
> --
> Joseph S. Myers
> josmyers@redhat.com
>
next prev parent reply other threads:[~2024-05-10 6:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 5:21 Kewen.Lin
2024-05-08 5:27 ` [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993] Kewen.Lin
2024-05-08 7:40 ` Mikael Morin
2024-05-08 22:01 ` [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993]g Steve Kargl
2024-05-09 5:37 ` Kewen.Lin
2024-05-09 16:47 ` Steve Kargl
2024-05-08 5:32 ` [PATCH 3/4] ranger: Revert the workaround introduced in PR112788 [PR112993] Kewen.Lin
2024-05-08 14:06 ` Aldy Hernandez
2024-05-08 5:36 ` [PATCH 4/4] tree: Remove KFmode workaround [PR112993] Kewen.Lin
2024-05-09 19:12 ` [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993] Joseph Myers
2024-05-10 6:31 ` Richard Biener [this message]
2024-05-13 1:39 ` Kewen.Lin
2024-05-13 7:11 ` Richard Biener
2024-05-13 13:18 ` Joseph Myers
2024-05-24 10:19 ` [RFC/PATCH] Replace {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE with new hook Kewen.Lin
2024-05-24 12:23 ` Richard Biener
2024-05-29 3:27 ` Kewen.Lin
2024-05-30 18:10 ` Joseph Myers
2024-05-28 21:06 ` Joseph Myers
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='CAFiYyc34SP1_HRCN+4B+L0yAkaUz8AZKsqM=0Ksvtkqp5spFVA@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=josmyers@redhat.com \
--cc=linkw@linux.ibm.com \
--cc=meissner@linux.ibm.com \
--cc=richard.sandiford@arm.com \
--cc=segher@kernel.crashing.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).