From: David Malcolm <dmalcolm@redhat.com>
To: Antoni Boucher <bouanto@zoho.com>,
gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Cc: Guillaume Gomez <guillaume1.gomez@gmail.com>
Subject: Re: [PATCH] libgccjit: Fix float vector comparison
Date: Thu, 01 Dec 2022 11:57:42 -0500 [thread overview]
Message-ID: <138f2f9ca9eeee76f3fc7532e32a535ac8884fe2.camel@redhat.com> (raw)
In-Reply-To: <5827fc95314506387b9b0e5c5da865eb28cf28e8.camel@zoho.com>
On Thu, 2022-12-01 at 10:33 -0500, Antoni Boucher wrote:
> On Thu, 2022-12-01 at 10:25 -0500, David Malcolm wrote:
> > On Thu, 2022-12-01 at 10:01 -0500, Antoni Boucher wrote:
> > > Thanks, David.
> > > Since we're not in phase 1 anymore, do we need an approval before
> > > I
> > > merge like last year or can I merge immediately?
> >
> > I think it counts as a bug fix and thus you can go ahead and merge
> > (assuming you've done the usual testing).
> >
> > > I also have many other patches (all in jit) that I need to
> > > prepare
> > > and
> > > post to this mailing list.
> > > What do you think?
> >
> > Given that you're one of the main users of libgccjit I think
> > there's
> > a
> > case for stretching the deadlines a bit here.
> >
> > Do you have a repo I can look at?
>
> Yes! The commits are in my fork:
> https://github.com/antoyo/gcc
>
> The only big one is the one adding support for target-dependent
> builtins:
> https://github.com/antoyo/gcc/commit/6d4313d4c02dd878f43917c978f299f5119330f0
>
> Regarding this one, there's the issue that since we record the
> builtins
> on the first context run, we only have access to the builtins from
> the
> second run.
> Do you have any idea how to fix this?
> Or do you consider this is acceptable?
This is implemented behind the new
gcc_jit_context_get_target_builtin_function entrypoint, right?
If so, perhaps that recording::context::get_target_builtin_function
could detect if it's the first time it's been called on this context,
and if so make a playback::context to do the detection? That way it
would be transparent to the user, and work first time.
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.
>
> I also have a WIP branch which adds support for try/catch:
> https://github.com/antoyo/gcc/commit/6219339fcacb079431596a0bc6cf8d430a1bd5a1
> I'm not sure if this one is going to be ready soon or not.
I see that the new entrypoints have e.g.:
/* Add a try/catch statement.
This is equivalent to this C++ code:
try {
try_block
}
catch {
catch_block
}
*/
void
gcc_jit_block_add_try_catch (gcc_jit_block *block,
gcc_jit_location *loc,
gcc_jit_block *try_block,
gcc_jit_block *catch_block);
but I'm not sure how this is meant to interact with the CFG-like model
used by the rest of the gcc_jit_block_* API. What happens at the end
of the blocks? Does the generated code use the C++ ABI for exception-
handling?
Dave
>
> Thanks.
>
> >
> > Dave
> >
> >
> > >
> > > On Thu, 2022-12-01 at 09:28 -0500, David Malcolm wrote:
> > > > On Sun, 2022-11-20 at 14:03 -0500, Antoni Boucher via Jit
> > > > wrote:
> > > > > Hi.
> > > > > This fixes bug 107770.
> > > > > Thanks for the review.
> > > >
> > > > Thanks, the patch looks good to me.
> > > >
> > > > Dave
> > > >
> > >
> >
>
next prev parent reply other threads:[~2022-12-01 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-20 19:03 Antoni Boucher
2022-11-30 19:58 ` Antoni Boucher
2022-12-01 14:28 ` David Malcolm
2022-12-01 15:01 ` Antoni Boucher
2022-12-01 15:25 ` David Malcolm
2022-12-01 15:33 ` Antoni Boucher
2022-12-01 16:57 ` David Malcolm [this message]
2022-12-02 14:29 ` Antoni Boucher
2023-01-12 16:29 ` Antoni Boucher
2022-12-03 3:10 ` Antoni Boucher
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=138f2f9ca9eeee76f3fc7532e32a535ac8884fe2.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=bouanto@zoho.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).