public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrea Corallo <andrea.corallo@arm.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	 "jit@gcc.gnu.org" <jit@gcc.gnu.org>,  nd <nd@arm.com>
Subject: Re: [PATCH][gcc] libgccjit: introduce version entry points
Date: Wed, 01 Jan 2020 00:00:00 -0000	[thread overview]
Message-ID: <87r1y529ew.fsf@arm.com> (raw)
In-Reply-To: <e8d7ce1feaada9ec28886d4870da37e0a3a7c15a.camel@redhat.com>	(David Malcolm's message of "Thu, 05 Mar 2020 21:34:53 -0500")

David Malcolm <dmalcolm@redhat.com> writes:

> On Thu, 2020-01-16 at 11:11 +0000, Andrea Corallo wrote:
>> Hi, second version of the patch here cleaning up an unnecessary
>> change.
>>
>> Does not introduce regressions with make check-jit.
>>
>> Andrea
>>
>> gcc/jit/ChangeLog
>> 2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>
>>
>> 	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
>> 	plus add version paragraph.
>> 	* libgccjit++.h (namespace gccjit::version): Add new namespace.
>> 	* libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
>> 	(gcc_jit_version_patchlevel): New functions.
>> 	* libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
>> 	(gcc_jit_version_major, gcc_jit_version_minor)
>> 	(gcc_jit_version_patchlevel): New functions.
>> 	* libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
>>
>> gcc/testsuite/ChangeLog
>> 2020-??-??  Andrea Corallo  <andrea.corallo@arm.com>
>>
>> 	* jit.dg/test-version.c: New testcase.
>
> [...]
>
> Thanks for the patch; sorry for the delay in reviewing this.
>
> Out of interest, do you have a specific use for this, or is it more
> speculative?

Hi Dave,

The use case is where client code wants to check specifically at
run-time for the version.  This to warn for a known to be buggy version
or to take any other decision that depends on the libgccjit version.
One could decide to layout the generated code differently depending on
the compiler version.

For these cases the granularity we have with with macros defining for
the ABI may be not sufficient.

As you say this is speculative now given that will become helpful only
in the future.

Thanks for reviewing both patches.  I'll re-spin them this weekend.

  Andrea

  parent reply	other threads:[~2020-03-06  8:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01  0:00 Andrea Corallo
2020-01-01  0:00 ` David Malcolm
2020-01-01  0:00   ` David Malcolm
2020-03-08 14:08     ` Andrea Corallo
2020-01-01  0:00   ` Andrea Corallo [this message]
2020-01-01  0:00   ` Florian Weimer
2020-03-18 22:51 ` [PATCH V3][gcc] " Andrea Corallo
2020-03-21  1:32   ` David Malcolm
2020-03-23 13:03     ` Richard Biener
2020-03-29 20:31     ` Andrea Corallo
2020-03-30 16:09       ` David Malcolm
2020-03-31  1:13         ` David Malcolm
2020-03-31  8:03           ` Andrea Corallo
2020-03-31 12:05       ` [PATCH V4][gcc] " Andrea Corallo
2020-03-31 17:33         ` David Malcolm
2020-03-31 19:00           ` Andrea Corallo
  -- strict thread matches above, loose matches on Subject: below --
2020-01-01  0:00 [PATCH][gcc] " Andrea Corallo

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=87r1y529ew.fsf@arm.com \
    --to=andrea.corallo@arm.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    --cc=nd@arm.com \
    /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).