public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* Four jit backports to gcc 5 branch
@ 2015-01-01  0:00 David Malcolm
  2015-01-01  0:00 ` Dibyendu Majumdar
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: jit; +Cc: gcc-patches

I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
directories in trunk since gcc 5 and backported the following 4 changes
from trunk to the gcc-5-branch:

gcc-5-branch's r225123:
  * trunk's r222863 (8120405bda9bf222228b004e09b23e74eda57ae1, addition
of test-benchmark.c):
  https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00500.html


gcc-5-branch's r225125:
  * trunk's r224531 (8154a3514d5fc8067a6928531d5f61cd768bd62c
along with trunk's r224535 (1828cd755cf5e4a34d5638f543a059f3562ad957,
"PR jit/66539: Add parentheses as needed to
gcc_jit_object_get_debug_string"):
  https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01158.html


gcc-5-branch's r225127:
  * trunk's r224536 (3052eeefc4607a7147fdc55af6d86845890eb281, "jit: Add
a test for compound assignment"):
  https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01164.html


gcc-5-branch's r225129:
  * trunk's r224565 (6689f47f53079d76bbb051d3b5da9018c2e0161a,
"jit: Add missing type-checking to gcc_jit_{l|r}value_access_field")
  https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01211.html


Note to self: I believe that covers everything on master up to
ec2e0095a3a5988b03a2706b5ffe0e807b238ba8 (on 2015-06-25) that might be
backportable.

Dave

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch)
  2015-01-01  0:00   ` Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch) David Malcolm
@ 2015-01-01  0:00     ` Ulrich Drepper
  2015-01-01  0:00       ` David Malcolm
  2015-01-01  0:00     ` Dibyendu Majumdar
  1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Drepper @ 2015-01-01  0:00 UTC (permalink / raw)
  To: David Malcolm; +Cc: Dibyendu Majumdar, jit, gcc-patches

On Mon, Jun 29, 2015 at 5:26 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> I'm looking at ways to manage libgccjit API/ABI as per this thread:
> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01982.html
> by transitioning to using symbol versioning, so that the linker can tag
> subsets of libgccjit symbols in both libgccjit and in client binaries.

You don't have to bump the SONAME to introduce symbol versioning.
glibc in the beginning didn't have symbol versioning and we wrote the
linker and dynamic linker support so that no SONAME change was
necessary.  The idea is that unversioned symbols are satisfied by the
oldest symbol version.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch)
  2015-01-01  0:00   ` Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch) David Malcolm
  2015-01-01  0:00     ` Ulrich Drepper
@ 2015-01-01  0:00     ` Dibyendu Majumdar
  1 sibling, 0 replies; 10+ messages in thread
From: Dibyendu Majumdar @ 2015-01-01  0:00 UTC (permalink / raw)
  To: David Malcolm; +Cc: jit, gcc-patches

On 29 June 2015 at 22:26, David Malcolm <dmalcolm@redhat.com> wrote:

>
> I'm working on that, I know that it's important to Ravi (the deadline
> for gcc-5.2 is Friday; 2015-07-03).

Thanks!

>
> There's no good way to track enums in binary metadata, so I'm currently
> thinking of this approach for the new options:
>
>  extern void
>  gcc_jit_context_set_bool_allow_unreachable_blocks (gcc_jit_context *ctxt,
>                                                     int bool_value);
>
> tagging it within the linker mapfile as being a new API.
>
>
> I'm looking at ways to manage libgccjit API/ABI as per this thread:
> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01982.html
> by transitioning to using symbol versioning, so that the linker can tag
> subsets of libgccjit symbols in both libgccjit and in client binaries.
>
> Adding symbol versioning will involve a SONAME bump (from libgccjit.so.0
> to libgccjit.so.1), thus requiring anyone using libgccjit to recompile
> for this one change (the transition to versioned symbols, that is);
> hopefully we never need to bump the SONAME again.
>
> Given that this is needed by Ravi I feel that this break is worth
> backporting to gcc 5.2 (I'd rather do this one-time ABI break for the
> benefit of specific users, than not do it out of concern for
> hypothetical ones).
>
> Hope this sounds sane.
>

If you are just adding some API then does it need to be versioned?
Apologies if I am misunderstanding the reason here.

A breaking change would be if you changed an existing API.

Regards
Dibyendu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch)
  2015-01-01  0:00     ` Ulrich Drepper
@ 2015-01-01  0:00       ` David Malcolm
  0 siblings, 0 replies; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Dibyendu Majumdar, jit, gcc-patches

On Mon, 2015-06-29 at 18:34 -0400, Ulrich Drepper wrote:
> On Mon, Jun 29, 2015 at 5:26 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> > I'm looking at ways to manage libgccjit API/ABI as per this thread:
> > https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01982.html
> > by transitioning to using symbol versioning, so that the linker can tag
> > subsets of libgccjit symbols in both libgccjit and in client binaries.
> 
> You don't have to bump the SONAME to introduce symbol versioning.
> glibc in the beginning didn't have symbol versioning and we wrote the
> linker and dynamic linker support so that no SONAME change was
> necessary.  The idea is that unversioned symbols are satisfied by the
> oldest symbol version.

Aha!  Thanks.  I won't bump the SONAME, in that case, I'll just add
symbol versioning, and each new symbol will go it a new tag.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Four jit backports to gcc 5 branch
  2015-01-01  0:00 ` Four jit backports to gcc 5 branch Basile Starynkevitch
@ 2015-01-01  0:00   ` David Malcolm
  2015-01-01  0:00     ` David Malcolm
  0 siblings, 1 reply; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: jit, gcc-patches

On Tue, 2015-06-30 at 08:43 +0200, Basile Starynkevitch wrote:
> On Mon, Jun 29, 2015 at 11:44:31AM -0400, David Malcolm wrote:
> > I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> > directories in trunk since gcc 5 and backported the following 4 changes
> > from trunk to the gcc-5-branch:
> > 
> 
> 
> I'll be delighted if switch statements ability would be backported to
> GCC 5.  (Its absence is IMHO a severe bug in GCCJIT, but perhaps GCC rules
> forbid backporting new features, even when they correct a huge
> deficiency and when the patch adding them is probably quite small).

I don't agree with your characterization of the severity of this, but I
do think we ought to fix it if possible.

I don't know of any rules about what is and what isn't suitable for
backporting.  The jit work as a whole is relatively new and has been
messaged as "experimental".

I'm the jit maintainer, and I believe the patch is reasonable to
backport: it doesn't break API or ABI (although it extends it), it has
docs and test coverage, and doesn't touch anything outside of the jit
(beyond adding the new header gcc/typed-splay-tree.h, which is only used
by the jit).  

Hence I intend to backport it to gcc-5-branch, but I've got to get it
into trunk first :)  (hopefully later today)

Dave

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Four jit backports to gcc 5 branch
  2015-01-01  0:00 Four jit backports to gcc 5 branch David Malcolm
  2015-01-01  0:00 ` Dibyendu Majumdar
@ 2015-01-01  0:00 ` Basile Starynkevitch
  2015-01-01  0:00   ` David Malcolm
  2015-01-01  0:00 ` Eight more " David Malcolm
  2 siblings, 1 reply; 10+ messages in thread
From: Basile Starynkevitch @ 2015-01-01  0:00 UTC (permalink / raw)
  To: David Malcolm; +Cc: jit, gcc-patches

On Mon, Jun 29, 2015 at 11:44:31AM -0400, David Malcolm wrote:
> I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> directories in trunk since gcc 5 and backported the following 4 changes
> from trunk to the gcc-5-branch:
> 


I'll be delighted if switch statements ability would be backported to
GCC 5.  (Its absence is IMHO a severe bug in GCCJIT, but perhaps GCC rules
forbid backporting new features, even when they correct a huge
deficiency and when the patch adding them is probably quite small).


Cheers.

--
Basile Starynkevitch             http://starynkevitch.net/Basile/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Four jit backports to gcc 5 branch
  2015-01-01  0:00 Four jit backports to gcc 5 branch David Malcolm
@ 2015-01-01  0:00 ` Dibyendu Majumdar
  2015-01-01  0:00   ` Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch) David Malcolm
  2015-01-01  0:00 ` Four jit backports to gcc 5 branch Basile Starynkevitch
  2015-01-01  0:00 ` Eight more " David Malcolm
  2 siblings, 1 reply; 10+ messages in thread
From: Dibyendu Majumdar @ 2015-01-01  0:00 UTC (permalink / raw)
  To: David Malcolm; +Cc: jit, gcc-patches

On 29 June 2015 at 16:44, David Malcolm <dmalcolm@redhat.com> wrote:
> I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> directories in trunk since gcc 5 and backported the following 4 changes
> from trunk to the gcc-5-branch:
>
> gcc-5-branch's r225123:
>   * trunk's r222863 (8120405bda9bf222228b004e09b23e74eda57ae1, addition
> of test-benchmark.c):
>   https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00500.html
>
>
> gcc-5-branch's r225125:
>   * trunk's r224531 (8154a3514d5fc8067a6928531d5f61cd768bd62c
> along with trunk's r224535 (1828cd755cf5e4a34d5638f543a059f3562ad957,
> "PR jit/66539: Add parentheses as needed to
> gcc_jit_object_get_debug_string"):
>   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01158.html
>
>
> gcc-5-branch's r225127:
>   * trunk's r224536 (3052eeefc4607a7147fdc55af6d86845890eb281, "jit: Add
> a test for compound assignment"):
>   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01164.html
>
>
> gcc-5-branch's r225129:
>   * trunk's r224565 (6689f47f53079d76bbb051d3b5da9018c2e0161a,
> "jit: Add missing type-checking to gcc_jit_{l|r}value_access_field")
>   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01211.html
>
>

Hi Dave - is this what will go into 5.2? If so, is the option to
disable "unreachable" block validation going to be available?

Thanks and Regards
Dibyendu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch)
  2015-01-01  0:00 ` Dibyendu Majumdar
@ 2015-01-01  0:00   ` David Malcolm
  2015-01-01  0:00     ` Ulrich Drepper
  2015-01-01  0:00     ` Dibyendu Majumdar
  0 siblings, 2 replies; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: Dibyendu Majumdar; +Cc: jit, gcc-patches

On Mon, 2015-06-29 at 21:57 +0100, Dibyendu Majumdar wrote:
> On 29 June 2015 at 16:44, David Malcolm <dmalcolm@redhat.com> wrote:
> > I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> > directories in trunk since gcc 5 and backported the following 4 changes
> > from trunk to the gcc-5-branch:
> >
> > gcc-5-branch's r225123:
> >   * trunk's r222863 (8120405bda9bf222228b004e09b23e74eda57ae1, addition
> > of test-benchmark.c):
> >   https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00500.html
> >
> >
> > gcc-5-branch's r225125:
> >   * trunk's r224531 (8154a3514d5fc8067a6928531d5f61cd768bd62c
> > along with trunk's r224535 (1828cd755cf5e4a34d5638f543a059f3562ad957,
> > "PR jit/66539: Add parentheses as needed to
> > gcc_jit_object_get_debug_string"):
> >   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01158.html
> >
> >
> > gcc-5-branch's r225127:
> >   * trunk's r224536 (3052eeefc4607a7147fdc55af6d86845890eb281, "jit: Add
> > a test for compound assignment"):
> >   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01164.html
> >
> >
> > gcc-5-branch's r225129:
> >   * trunk's r224565 (6689f47f53079d76bbb051d3b5da9018c2e0161a,
> > "jit: Add missing type-checking to gcc_jit_{l|r}value_access_field")
> >   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01211.html
> >
> >
> 
> Hi Dave - is this what will go into 5.2?

No, it's just the things that I've backported so far.

> If so, is the option to
> disable "unreachable" block validation going to be available?

I'm working on that, I know that it's important to Ravi (the deadline
for gcc-5.2 is Friday; 2015-07-03).

There's no good way to track enums in binary metadata, so I'm currently
thinking of this approach for the new options:

 extern void
 gcc_jit_context_set_bool_allow_unreachable_blocks (gcc_jit_context *ctxt,
                                                    int bool_value);

tagging it within the linker mapfile as being a new API.


I'm looking at ways to manage libgccjit API/ABI as per this thread:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01982.html
by transitioning to using symbol versioning, so that the linker can tag
subsets of libgccjit symbols in both libgccjit and in client binaries.

Adding symbol versioning will involve a SONAME bump (from libgccjit.so.0
to libgccjit.so.1), thus requiring anyone using libgccjit to recompile
for this one change (the transition to versioned symbols, that is);
hopefully we never need to bump the SONAME again.

Given that this is needed by Ravi I feel that this break is worth
backporting to gcc 5.2 (I'd rather do this one-time ABI break for the
benefit of specific users, than not do it out of concern for
hypothetical ones).

Hope this sounds sane.

As mentioned in that other thread, I'm wondering if linker experts could
advise on the sanity of using a feature-based naming scheme for symbol
map tags, rather than pure numbers?
e.g.
  LIBGCCJIT_ABI_INITIAL
  LIBGCCJIT_ABI_WITH_SWITCH_STATEMENTS
  LIGCCCJIT_ABI_WITH_BOOL_OPTION_ERROR_ON_UNREACHABLE_BLOCKS
etc (how long can they be, and is there a cost? can they include lower
case?)

Dave

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Four jit backports to gcc 5 branch
  2015-01-01  0:00   ` David Malcolm
@ 2015-01-01  0:00     ` David Malcolm
  0 siblings, 0 replies; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: jit, gcc-patches

On Tue, 2015-06-30 at 09:01 -0400, David Malcolm wrote:
> On Tue, 2015-06-30 at 08:43 +0200, Basile Starynkevitch wrote:
> > On Mon, Jun 29, 2015 at 11:44:31AM -0400, David Malcolm wrote:
> > > I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
> > > directories in trunk since gcc 5 and backported the following 4 changes
> > > from trunk to the gcc-5-branch:
> > > 
> > 
> > 
> > I'll be delighted if switch statements ability would be backported to
> > GCC 5.  (Its absence is IMHO a severe bug in GCCJIT, but perhaps GCC rules
> > forbid backporting new features, even when they correct a huge
> > deficiency and when the patch adding them is probably quite small).
> 
> I don't agree with your characterization of the severity of this, but I
> do think we ought to fix it if possible.
> 
> I don't know of any rules about what is and what isn't suitable for
> backporting.  The jit work as a whole is relatively new and has been
> messaged as "experimental".
> 
> I'm the jit maintainer, and I believe the patch is reasonable to
> backport: it doesn't break API or ABI (although it extends it), it has
> docs and test coverage, and doesn't touch anything outside of the jit
> (beyond adding the new header gcc/typed-splay-tree.h, which is only used
> by the jit).  
> 
> Hence I intend to backport it to gcc-5-branch, but I've got to get it
> into trunk first :)  (hopefully later today)

Switch statements for the jit are now in gcc-5-branch, as of r225255.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Eight more jit backports to gcc 5 branch
  2015-01-01  0:00 Four jit backports to gcc 5 branch David Malcolm
  2015-01-01  0:00 ` Dibyendu Majumdar
  2015-01-01  0:00 ` Four jit backports to gcc 5 branch Basile Starynkevitch
@ 2015-01-01  0:00 ` David Malcolm
  2 siblings, 0 replies; 10+ messages in thread
From: David Malcolm @ 2015-01-01  0:00 UTC (permalink / raw)
  To: jit; +Cc: gcc-patches

I've gone over the changes to the gcc/jit and gcc/testsuite/jit.dg
directories in trunk since the last backports to gcc 5 [1] and
backported the following 8 changes from trunk to the gcc-5-branch:

gcc-5-branch's r225251:
  * trunk's r225203 (9bd7a189c372465fb757ecd67336379779f4ea60,
"jit: fix some .rst issues in docs")
    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02248.html

gcc-5-branch's r225252:
  * trunk's r225204 (cc36aead6a4e5017477c9c0836672317128ed6b3,
"fixes to gcc_jit_context_dump_reproducer_to_file")
    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02249.html

gcc-5-branch's r225253:
  * trunk's r225205 (adb2df5592cdf8e70aa44c0f3c447da1d0134f4c,
"PR jit/66628: add gcc_jit_context_add_command_line_option")
    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02250.html

gcc-5-branch's r225254:
  * trunk's r225206 (04feb56e6acd497d0add042232afd7940ef61adb,
"PR jit/66546: Add gcc_jit_context_set_bool_allow_unreachable_blocks")
    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02251.html

gcc-5-branch's r225255:
  * trunk's r225207 (a24ef8d231d1015c5a4ee68050ed78f5582342fe,
"jit: add switch statements")
    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02256.html

gcc-5-branch's r225256:
  * trunk's r225245 (1fa42b0566972abc668f3aa88e5534092af99c2c,
"jit: clarify (lack of) lifetime requirements on input const char *")
    https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00043.html

gcc-5-branch's r225257:
  * trunk's r225246 (eb2d3e4a67c699257e42280e6bf800b8a92ffad7,
"jit: document union types")
    https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00045.html

gcc-5-branch's r225258:
  * trunk's r225248 (f410e1f5b44007c6cf6609df0afc16e7dcfeabd2,
"PR jit/66700: set TREE_ADDRESSABLE when building an ADDR_EXPR")
    https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00046.html

"make check-jit" on gcc-5-branch went from 8014 to 8289 passes.

In particular, note that this adds symbol versioning to libgccjit.so on
the branch to track (so far) the changes made on trunk, adding some API
entrypoints needed by users (for PR jit/66546 and PR jit/66700).

Dave

[1] ec2e0095a3a5988b03a2706b5ffe0e807b238ba8 (on 2015-06-25)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-07-01 14:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01  0:00 Four jit backports to gcc 5 branch David Malcolm
2015-01-01  0:00 ` Dibyendu Majumdar
2015-01-01  0:00   ` Thinking about libgccjit SONAME bump for gcc 5.2 (was Re: Four jit backports to gcc 5 branch) David Malcolm
2015-01-01  0:00     ` Ulrich Drepper
2015-01-01  0:00       ` David Malcolm
2015-01-01  0:00     ` Dibyendu Majumdar
2015-01-01  0:00 ` Four jit backports to gcc 5 branch Basile Starynkevitch
2015-01-01  0:00   ` David Malcolm
2015-01-01  0:00     ` David Malcolm
2015-01-01  0:00 ` Eight more " David Malcolm

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).