This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC/JIT and precise garbage collection support?


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 
> GCCJIT)
> 
> 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 
> profit of GCC technology. And even a Javascript engine based on GCCJIT 
> 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.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]