This is the mail archive of the
mailing list for the GCC project.
Re: GCC/JIT and precise garbage collection support?
- From: Andrew Haley <aph at redhat dot com>
- To: Basile Starynkevitch <basile at starynkevitch dot net>, jit at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 10 Jul 2015 09:40:57 +0100
- Subject: Re: GCC/JIT and precise garbage collection support?
- Authentication-results: sourceware.org; auth=none
- References: <559EF2F1 dot 6000000 at starynkevitch dot net>
On 09/07/15 23:17, Basile Starynkevitch wrote:
> (this is triggered by a question on the Ocaml mailing list asking about
> SystemZ backend in Ocaml; SystemZ is today a backend for GCC & probably
> We might want to support better good garbage collection schemes in GCC,
> particularily in GCCJIT. This is a
> thing that LLVM is known to be weak at, and we might aim to do much
> better. If we did, good frontends for
> good functional languages (e.g. F#, Ocaml, Haskell) might in the future
> could profit.
> A good GC is very probably a precise (sometimes generational copying) GC
> with write barriers
> (read the http://gchandbook.org/ for more, or at least the wikipage
> about garbage collection). So a good GC is changing pointers.
> So we need to know where, and provide a mechanism for, pointer values
> are located in the call stack (of the GCCJIT generated code), and
> probably provide some write barrier machinery.
It's going to be very hard. All our experience with GCJ shows that a
true precise GC in GCC is going to require major surgery in many
places. The HotSpot optimizing compilers are written with GC as a
basic requirement and it touches many places.