From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by sourceware.org (Postfix) with ESMTP id ACC5C38A1031 for ; Sat, 21 Mar 2020 01:32:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ACC5C38A1031 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-SjXe0d3NMVyjrG5UYj-_qQ-1; Fri, 20 Mar 2020 21:32:08 -0400 X-MC-Unique: SjXe0d3NMVyjrG5UYj-_qQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 407AC800D4E; Sat, 21 Mar 2020 01:32:07 +0000 (UTC) Received: from ovpn-113-200.phx2.redhat.com (ovpn-113-200.phx2.redhat.com [10.3.113.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E94C5C297; Sat, 21 Mar 2020 01:32:05 +0000 (UTC) Message-ID: <330ed10fb3e66abdbc5d30fdf2ba2fd3c3b30cf6.camel@redhat.com> Subject: Re: [PATCH V3][gcc] libgccjit: introduce version entry points From: David Malcolm To: Andrea Corallo , gcc-patches@gcc.gnu.org Cc: "jit@gcc.gnu.org" , nd , jakub@redhat.com, Richard Biener Date: Fri, 20 Mar 2020 21:32:05 -0400 In-Reply-To: References: User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-27.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2020 01:32:14 -0000 On Wed, 2020-03-18 at 23:51 +0100, Andrea Corallo wrote: > Hi all, > > Updated version of the patch mainly addressing comments on the > concurrency issues. > > I came to the conclusions that the caching should be done in the > function that we decide to be thread safe. However I haven't touched > parse_basever in any direction in the hope of having this still in > stage4. As result I've mostly applied the mutex solution. > > 'make check-jit' runs clean > > Bests > > Andrea > > gcc/jit/ChangeLog > 2020-??-?? Andrea Corallo > David Malcolm > > * 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 > > * jit.dg/test-version.c: New testcase. > * jit.dg/all-non-failing-tests.h: Add test-version.c. > diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h b/gcc/testsuite/jit.dg/all-non-failing-tests.h > index 0272e6f846f..cba4ac51cc9 100644 > --- a/gcc/testsuite/jit.dg/all-non-failing-tests.h > +++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h > @@ -8,6 +8,13 @@ > hooks provided by each test case. */ > #define COMBINED_TEST > > +/* test-version.c */ > +#define create_code create_code_version > +#define verify_code verify_code_version > +#include "test-version.c" > +#undef create_code > +#undef verify_code > + > /* test-accessing-bitfield.c */ > #define create_code create_code_accessing_bitfield > #define verify_code verify_code_accessing_bitfield Please add the new test to the header in its alphabetical location, i.e. between: /* test-vector-types.cc: We don't use this, since it's C++. */ and /* test-volatile.c */ An entry also needs to be added to the "testcases" array at the end of the header (again, in the alphabetical-sorted location). OK by me with that change (assuming you re-test the patch), but given we're in stage 4, it's probably worth double-checking with a release manager. I've CCed Jakub and Richi. Dave