public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Antoni Boucher <bouanto@zoho.com>
To: David Malcolm <dmalcolm@redhat.com>,
	jit@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libgccjit: Make new_array_type take unsigned long
Date: Thu, 27 Jun 2024 17:53:24 -0400	[thread overview]
Message-ID: <a398971d-9e63-4d33-b3f1-40d1570167fe@zoho.com> (raw)
In-Reply-To: <8d6aef3dac729d75ace67d369ef059a21958b3f6.camel@redhat.com>

Thanks for the review.
I'm a bit concerned about using unsigned long.
Would it be OK if I change the type to uint64_t?
I could rename the function to gcc_jit_context_new_array_type_u64.
Regards.

Le 2024-06-26 à 11 h 34, David Malcolm a écrit :
> On Fri, 2024-02-23 at 09:55 -0500, Antoni Boucher wrote:
>> I had forgotten to add the doc since there is now a new API.
>> Here it is.
> 
> Sorry for the delay; the updated patch looks good to me (but may need
> usual ABI tag changes when pushing).
> 
> Thanks
> Dave
> 
> 
>>
>> On Wed, 2024-02-21 at 19:45 -0500, Antoni Boucher wrote:
>>> Thanks for the review.
>>>
>>> Here's the updated patch.
>>>
>>> On Thu, 2023-12-07 at 20:04 -0500, David Malcolm wrote:
>>>> On Thu, 2023-12-07 at 17:29 -0500, Antoni Boucher wrote:
>>>>> Hi.
>>>>> This patches update gcc_jit_context_new_array_type to take the
>>>>> size
>>>>> as
>>>>> an unsigned long instead of a int, to allow creating bigger
>>>>> array
>>>>> types.
>>>>>
>>>>> I haven't written the ChangeLog yet because I wasn't sure it's
>>>>> allowed
>>>>> to change the type of a function like that.
>>>>> If it isn't, what would you suggest?
>>>>
>>>> We've kept ABI compatibility all the way back to the version in
>>>> GCC
>>>> 5,
>>>> so it seems a shame to break ABI.
>>>>
>>>> How about a new API entrypoint:
>>>>    gcc_jit_context_new_array_type_unsigned_long
>>>> whilst keeping the old one.
>>>>
>>>> Then everything internally can use "unsigned long"; we just keep
>>>> the
>>>> old entrypoint accepting int (which internally promotes the arg
>>>> to
>>>> unsigned long, if positive, sharing all the implementation).
>>>>
>>>> Alternatively, I think there may be a way to do this with symbol
>>>> versioning:
>>>>    https://gcc.gnu.org/wiki/SymbolVersioning
>>>> see e.g. Section 3.7 of Ulrich Drepper's "How To Write Shared
>>>> Libraries", but I'm a bit wary of cross-platform compatibility
>>>> with
>>>> that.
>>>>
>>>> Dave
>>>>
>>>>
>>>
>>
> 

      reply	other threads:[~2024-06-27 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 22:29 Antoni Boucher
2023-12-08  1:04 ` David Malcolm
2024-02-22  0:45   ` Antoni Boucher
2024-02-23 14:55     ` Antoni Boucher
2024-06-26 15:34       ` David Malcolm
2024-06-27 21:53         ` Antoni Boucher [this message]

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=a398971d-9e63-4d33-b3f1-40d1570167fe@zoho.com \
    --to=bouanto@zoho.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.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).