I'm excited to read that rustc_codegen_gcc, the libgccjit-based backend for rustc can now bootstrap rustc: https://blog.antoyo.xyz/rustc_codegen_gcc-progress-report-10
I've been focusing on the analyzer, and so haven't been as on top of libgccjit patch review as I should have been. Sorry about that. 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. 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. Antoyo: your email of: https://gcc.gnu.org/pipermail/jit/2022q1/001475.html said: [..snip...] > 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. > > 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. > 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? If so, then it's probably best to wait. Jakub/Richi (as release managers): how would you feel about me pushing some of these libgccjit-specific patches into trunk deep in stage 4? 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. Looking at https://github.com/antoyo/libgccjit-patches I 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. So it looks like the patches in that repo may need refreshing. More detailed status: [PATCH] Add support for sized integer types, including 128-bit integers [PR95325] Most recent discussion is here: https://gcc.gnu.org/pipermail/jit/2021q2/001303.html My notes say that I'm waiting on an updated version of patch addressing the issues in that review. Was there one? [PATCH] libgccjit: Add support for bitcasts [PR104071] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104071 Most recent discussion seems to be https://gcc.gnu.org/pipermail/jit/2022q1/001475.html 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. [PATCH] libgccjit: Add support for register variables [PR104072] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104072 Review thread: https://gcc.gnu.org/pipermail/jit/2022q1/001466.html Latest patch seems to be: https://gcc.gnu.org/pipermail/jit/2022q1/001510.html 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. [PATCH] libgccjit: Add option to hide stderr logs [PR104073] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104073 Review thread: https://gcc.gnu.org/pipermail/jit/2022q1/001469.html Latest patch: https://gcc.gnu.org/pipermail/jit/2022q1/001480.html I approved https://gcc.gnu.org/pipermail/jit/2022q1/001483.html This looks ready to go, assuming release managers are happy. [PATCH] libgccjit: Add support for setting the alignment [PR104293] https://gcc.gnu.org/pipermail/jit/2022q1/001494.html I've just now posted a review of that patch; some minor changes needed. 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). Hope the above makes sense; sorry again for not getting to these patches sooner. Dave