From: David Malcolm <dmalcolm@redhat.com>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Subject: Re: [PATCH 2/2] jit: add switch statements
Date: Thu, 25 Jun 2015 20:09:00 -0000 [thread overview]
Message-ID: <1435262104.13727.40.camel@surprise> (raw)
In-Reply-To: <558C5ACF.6090508@starynkevitch.net>
On Thu, 2015-06-25 at 21:47 +0200, Basile Starynkevitch wrote:
> On 06/25/2015 09:13 PM, David Malcolm wrote:
> > Some interpreters/VMs support a switch statement (for example the JVM
> > has opcodes "lookupswitch" and "tableswitch"). GCC has a set of
> > optimizations for efficiently handling switch statements, so it makes
> > sense to directly expose switch statements in the libgccjit API.
>
> Yes, I hope that feature will be incorporated quickly in gccjit. I don't
> have the power to approve that patch, but I hope it will be approved.
> > This patch implements a switch statement, but it isn't quite ready for
> > committing to trunk yet:
> >
> > * It relies on gcc/typed-splay-tree.h in the previous patch
> >
> > * It extends the libgccjit API. It's not clear to me yet how to
> > manage extensions of the libgccjit API: should I use symbol maps
> > and versioning, or bump the SONAME? I'm thinking of providing
> > precanned feature macros within libgccjit.h e.g:
> >
> > #define LIBGCCJIT_HAVE_SWITCH_STATEMENT
> >
> > for the benefit of client code that doesn't use configure
> > scripts.
>
>
> Perhaps just exposing the major and minor version of the GCC supporting
> that GCCJIT is enough (like it was done for plugins, e.g.
> GCCPLUGIN_VERSION etc)?
That approach rapidly gets messy if we backport anything; doing it by
feature seems saner.
next prev parent reply other threads:[~2015-06-25 20:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <558A846C.70003@starynkevitch.net>
2015-06-25 19:01 ` [PATCH 1/2] Add gcc/typed-splay-tree.h David Malcolm
2015-06-25 19:15 ` [PATCH 2/2] jit: add switch statements David Malcolm
2015-06-25 19:18 ` Jeff Law
2015-06-26 19:09 ` Managing ABI compatibility (was Re: [PATCH 2/2] jit: add switch statements) David Malcolm
2015-06-26 19:15 ` David Malcolm
2015-06-25 19:58 ` [PATCH 2/2] jit: add switch statements Basile Starynkevitch
2015-06-25 20:09 ` David Malcolm [this message]
2015-06-30 20:50 ` [PATCH, committed] " David Malcolm
2015-06-25 19:45 ` [PATCH 1/2] Add gcc/typed-splay-tree.h Jeff Law
2015-06-29 17:45 ` David Malcolm
2015-07-01 17:35 ` Jeff Law
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=1435262104.13727.40.camel@surprise \
--to=dmalcolm@redhat.com \
--cc=basile@starynkevitch.net \
--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).