From: Basile Starynkevitch <basile@starynkevitch.net>
To: David Malcolm <dmalcolm@redhat.com>,
gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Subject: Re: [PATCH 2/2] jit: add switch statements
Date: Thu, 25 Jun 2015 19:58:00 -0000 [thread overview]
Message-ID: <558C5ACF.6090508@starynkevitch.net> (raw)
In-Reply-To: <1435259621-45194-2-git-send-email-dmalcolm@redhat.com>
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)?
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
next prev parent reply other threads:[~2015-06-25 19:47 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 ` Basile Starynkevitch [this message]
2015-06-25 20:09 ` [PATCH 2/2] jit: add switch statements David Malcolm
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=558C5ACF.6090508@starynkevitch.net \
--to=basile@starynkevitch.net \
--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).