From: Antoni Boucher <bouanto@zoho.com>
To: Guillaume Gomez <guillaume1.gomez@gmail.com>
Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org,
David Malcolm <dmalcolm@redhat.com>
Subject: Re: [PATCH] Add support for function attributes and variable attributes
Date: Thu, 23 Nov 2023 16:59:17 -0500 [thread overview]
Message-ID: <77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com> (raw)
In-Reply-To: <CAAOQCfS14BuO=9KDEL-kZ1yoxF+NPsZ1JatOF6jOHSraDV9bfw@mail.gmail.com>
David: I found back the comment you made. Here it is:
I see you have patches to add function and variable attributes; I
wonder if this would be cleaner internally if there was a
recording::attribute class, rather than the std::pair currently in
use
(some attributes have int arguments rather than string, others have
multiple args).
I also wondered if a "gcc_jit_attribute" type could be exposed to
the
user, e.g.:
attr1 = gcc_jit_context_new_attribute (ctxt, "noreturn");
attr2 = gcc_jit_context_new_attribute_with_string (ctxt, "alias",
"__foo");
gcc_jit_function_add_attribute (ctxt, attr1);
gcc_jit_function_add_attribute (ctxt, attr2);
or somesuch? But I think the API you currently have is OK.
On Thu, 2023-11-23 at 22:52 +0100, Guillaume Gomez wrote:
> Ping David. :)
>
> Le mer. 15 nov. 2023 à 17:56, Antoni Boucher <bouanto@zoho.com> a
> écrit :
> >
> > David: another thing I remember you mentioned when you reviewed an
> > earlier version of this patch is the usage of `std::pair`.
> > I can't find where you said that, but I remember you mentioned that
> > we
> > should use a struct instead.
> > Can you please elaborate again?
> > Thanks.
> >
> > On Wed, 2023-11-15 at 17:53 +0100, Guillaume Gomez wrote:
> > > Hi,
> > >
> > > This patch adds the (incomplete) support for function and
> > > variable
> > > attributes. The added attributes are the ones we're using in
> > > rustc_codegen_gcc but all the groundwork is done to add more (and
> > > we
> > > will very likely add more as we didn't add all the ones we use in
> > > rustc_codegen_gcc yet).
> > >
> > > The only big question with this patch is about `inline`. We
> > > currently
> > > handle it as an attribute because it is more convenient for us
> > > but is
> > > it ok or should we create a separate function to mark a function
> > > as
> > > inlined?
> > >
> > > Thanks in advance for the review.
> >
next prev parent reply other threads:[~2023-11-23 21:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 16:53 Guillaume Gomez
2023-11-15 16:56 ` Antoni Boucher
2023-11-23 21:52 ` Guillaume Gomez
2023-11-23 21:59 ` Antoni Boucher [this message]
2023-11-30 9:55 ` Guillaume Gomez
2023-12-07 17:13 ` Antoni Boucher
2023-12-09 11:12 ` Guillaume Gomez
2023-12-18 22:27 ` Guillaume Gomez
2024-01-03 13:37 ` Guillaume Gomez
2024-01-09 19:59 ` David Malcolm
2024-01-11 0:00 ` Guillaume Gomez
2024-01-11 18:46 ` David Malcolm
2024-01-11 21:40 ` Guillaume Gomez
2024-01-11 22:38 ` David Malcolm
2024-01-12 10:09 ` Guillaume Gomez
2024-01-12 13:47 ` Guillaume Gomez
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=77bb82eeebe99921773538e56b6c8baba12634a7.camel@zoho.com \
--to=bouanto@zoho.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=guillaume1.gomez@gmail.com \
--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).