From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender4-pp-o90.zoho.com (sender4-pp-o90.zoho.com [136.143.188.90]) by sourceware.org (Postfix) with ESMTPS id 121723858D28; Fri, 8 Apr 2022 20:38:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 121723858D28 ARC-Seal: i=1; a=rsa-sha256; t=1649450280; cv=none; d=zohomail.com; s=zohoarc; b=NKNkCYO/YL6TjQcvMnYvPPTm4/6nhAEU5PaHu0XZx9wWJUqGqtd5fFZFMtgzpg8jNpryRDhcecdz+zJLtj19z7iFojHJHSDoTza30YmZHGHXGUa2I8sgR2jVu7kzTJpsB7LaSfdJQaReBhE+0tW1mCn1TVo0PW5ENGA+s53HOPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649450280; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=oEOxfsvwdf1NMXWrKy6//YmQmZl/1yuxuYu/GIh/EtI=; b=Dt83SoXLChsR8sndpYbXJUVnaOlTV0tM4IaEcbGTG2ZYV1Co4yUkKk1GFNZVbEl/2up40xJprwDNnXYDO0L5Ndjpv4zGRPhkBJVacJVkFzoQzefZ42bGgL+UWj/1/fylkN8CxRThF7dSwdUtzMlUtDRRuxNR2aW5C8OY0Vp00L0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= Received: from [192.168.1.174] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1649450278367522.1597003543578; Fri, 8 Apr 2022 13:37:58 -0700 (PDT) Message-ID: <9fd67350bbfa7b8a5acf16c9c6fa1f57757d6ca9.camel@zoho.com> Subject: Re: rustc_codegen_gcc and libgccjit for GCC 12 ? From: Antoni Boucher To: David Malcolm , gcc-patches@gcc.gnu.org, jit@gcc.gnu.org, Richard Biener , jakub@redhat.com Date: Fri, 08 Apr 2022 16:37:55 -0400 In-Reply-To: <4e768a1ee7492627c88a06c4c3d168d7dca95840.camel@redhat.com> References: <4e768a1ee7492627c88a06c4c3d168d7dca95840.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 08 Apr 2022 20:38:11 -0000 On Fri, 2022-04-08 at 15:36 -0400, David Malcolm wrote: > I'm excited to read that rustc_codegen_gcc, the libgccjit-based > backend > for rustc can now bootstrap rustc: > =C2=A0 https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-10 >=20 > I've been focusing on the analyzer, and so haven't been as on top of > libgccjit patch review as I should have been.=C2=A0 Sorry about that. >=20 > rustc_codegen_gcc currently recommends that people build their own > libgccjit, as it contains a number of patches that aren't in gcc > trunk > yet. >=20 > We're deep in "stage 4" of gcc 12, but libgccjit is a relatively > self- > contained part of the project, so I'm wondering if it makes sense to > try to get all/some of these patches into gcc 12. >=20 > Antoyo: your email of: > =C2=A0 https://gcc.gnu.org/pipermail/jit/2022q1/001475.html > said: >=20 > [..snip...] >=20 > > Ok, if the 4 patches currently being reviewed (and listed here: > > https://github.com/antoyo/libgccjit-patches) were included in gcc > > 12, > > I'd be able to build rustc_codegen_gcc with an unpatched gcc. > >=20 > > It is to be noted however, that I'll need more patches for future > > work. > > Off the top of my head, I'll at least need a patch for the inline > > attribute, try/catch and target-specific builtins. > > The last 2 features will probably take some time to implement, so > > I'll > > let you judge if you think it's worth merging the 4 patches > > currently > > being reviewed for gcc 12. > >=20 >=20 > Are users of rustc_codegen_gcc still likely to need to build their > own > libgccjit even if we got all of the following into gcc 12?=C2=A0 If so, > then > it's probably best to wait. >=20 I was talking to Josh Triplett (co-load of the Rust language team) about this and the idea was that if we could have a feature-gated rustc_codegen_gcc that works with gcc 12, we could start doing the infrastructure work in rustup to start distributing rustc + libgccjit.so to users, as an early preview. So, yes if users want to experiment with the latest changes of rustc_codegen_gcc, they will have to build libgccjit from source. The benefit of having those patches in gcc 12 would mostly be to start this infrastructure work. >=20 > Jakub/Richi (as release managers): how would you feel about me > pushing > some of these libgccjit-specific patches into trunk deep in stage 4?=C2= =A0 > I > believe the risk is low, though I should note that I'm going on > vacation on 18th through 22nd April and won't have access to my > computer that week. >=20 >=20 > Looking at https://github.com/antoyo/libgccjit-patches=C2=A0I see 5 > patches. > That said, all but the last one refer to .c source files and so > predate > the big .c to .cc migration of the gcc source tree.=C2=A0 So it looks lik= e > the patches in that repo may need refreshing. I updated them just now. >=20 > More detailed status: >=20 > [PATCH] Add support for sized integer types, including 128-bit > integers > [PR95325] > =C2=A0 Most recent discussion is here: > =C2=A0=C2=A0=C2=A0 https://gcc.gnu.org/pipermail/jit/2021q2/001303.html > =C2=A0 My notes say that I'm waiting on an updated version of patch > addressing the issues in that review.=C2=A0 Was there one? Yes, there was one and I just sent it again on the mailing list. >=20 >=20 > [PATCH] libgccjit: Add support for bitcasts [PR104071] > =C2=A0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104071 > =C2=A0 Most recent discussion seems to be > =C2=A0=C2=A0=C2=A0 https://gcc.gnu.org/pipermail/jit/2022q1/001475.html > =C2=A0 I've just now posted a review of that version; LGTM with some nits= , > though it adds a trivial tree_cc_finalize which I'm strictly speaking > not a maintainer of. >=20 >=20 > [PATCH] libgccjit: Add support for register variables [PR104072] > =C2=A0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104072 > =C2=A0 Review thread: https://gcc.gnu.org/pipermail/jit/2022q1/001466.htm= l > =C2=A0 Latest patch seems to be: > =C2=A0=C2=A0=C2=A0 https://gcc.gnu.org/pipermail/jit/2022q1/001510.html > =C2=A0 My recollection is that the jit parts of the patch look OK, but > this > adds a (trivial) new reginfo_cc_finalize which would thus need > approval > from an RTL maintainer. >=20 >=20 > [PATCH] libgccjit: Add option to hide stderr logs [PR104073] > =C2=A0 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104073 > =C2=A0 Review thread: https://gcc.gnu.org/pipermail/jit/2022q1/001469.htm= l > =C2=A0 Latest patch: https://gcc.gnu.org/pipermail/jit/2022q1/001480.html > =C2=A0 I approved https://gcc.gnu.org/pipermail/jit/2022q1/001483.html > =C2=A0 This looks ready to go, assuming release managers are happy. >=20 >=20 > [PATCH] libgccjit: Add support for setting the alignment [PR104293] > =C2=A0 https://gcc.gnu.org/pipermail/jit/2022q1/001494.html > =C2=A0 I've just now posted a review of that patch; some minor changes > needed. >=20 > So I think I'm waiting on an updated version of the sized-integer- > types > patch, and some nit-fixes for the other patches (but am disappearing > on > vacation on 18th - 22nd). I'll update the patches to address your review over the weekend. Thanks! >=20 >=20 > Hope the above makes sense; sorry again for not getting to these > patches sooner. >=20 > Dave >=20 >=20