public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	P Jeevitha <jeevitha@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, "Kewen.Lin" <linkw@linux.ibm.com>
Subject: Re: [PATCH] rs6000: Fix issue in specifying PTImode as an attribute [PR106895]
Date: Mon, 18 Mar 2024 12:35:09 -0500	[thread overview]
Message-ID: <a47f6028-f61b-4f15-9968-a4b02181f2a5@linux.ibm.com> (raw)
In-Reply-To: <20240318143609.GX19790@gate.crashing.org>

On 3/18/24 9:36 AM, Segher Boessenkool wrote:
> Hi!
> 
> On Fri, Feb 23, 2024 at 03:04:13PM +0530, jeevitha wrote:
>> PTImode attribute assists in generating even/odd register pairs on 128 bits.
> 
> It is a mode, not an attribute.  Attributes are on declarations, while
> modes are on a much more fundamental level (every value has a mode, in
> GCC!)
> 
>> When the user specifies PTImode as an attribute, it breaks because there is no
>> internal type to handle this mode . We have created a tree node with dummy type
>> to handle PTImode.
> 
> You are talking about the mode attribute.  Aha.

Correct.



>> We are not documenting this dummy type since users are not
>> allowed to use this type externally.
> 
> Not sure what this is meant to mean?  What does "allowed to" mean, even?
> We do not forbid people from doing anything (we can discourage them
> though).  Or dso you mean something just doesn't work?

The use case is the Linux kernel will use the mode attribute as shown in
the test case.  The type she created was needed for the code to "work"
internally, but we don't want to advertise it to users, so that's why we're
not documenting it.  Yes, pesky users who go digging through the GCC source
could find it and use it, but we don't want to encourage them. :-)


>> 	PR target/106895
>> 	* config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add fields
>> 	to hold PTImode type.
> 
> An enum does not have fields.  What do you actually mean?

Yeah, as per your follow-on comment, I think a simple "Add RS6000_BTI_INTPTI."
should suffice.


Peter


  reply	other threads:[~2024-03-18 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9ea38d87-180f-46b5-a723-45061680980f@linux.vnet.ibm.com>
2024-02-23  9:34 ` jeevitha
2024-03-07 15:27   ` [PING^1][PATCH] " jeevitha
2024-03-21 12:51     ` [PATCH v2] " jeevitha
2024-04-17  9:14       ` [PING^1][PATCH " jeevitha
2024-05-21  4:58         ` [PING^2][PATCH " jeevitha
2024-03-18 14:36   ` [PATCH] " Segher Boessenkool
2024-03-18 17:35     ` Peter Bergner [this message]
2023-07-20  4:35 jeevitha
2023-08-09  8:48 ` Kewen.Lin
2023-08-24 17:35 ` Michael Meissner
2023-08-25  2:19   ` Peter Bergner
2023-08-26  8:37     ` Michael Meissner

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=a47f6028-f61b-4f15-9968-a4b02181f2a5@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeevitha@linux.ibm.com \
    --cc=linkw@linux.ibm.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).