[LLVMdev] Interfacing llvm with a precise, relocating GC

Sanjoy Das sanjoy at azulsystems.com
Thu Oct 24 14:32:32 PDT 2013


Hello llvm-dev!

My colleages and I are currently evaluating llvm's suitability as a
JIT compiler interfacing with a precise, relocating garbage collector.
While we couldn't find code or writeups that deal with the issues
specific to this design goal, it is entirely possible that we may have
missed something; we would appreciate references to relevant code or
writeups that people on this list may be aware of.

As an example, one issue that makes this non-trivial is that llvm (as
far as we know) is free to manufacture pointers to locations _inside_
objects, something referred to as a "derived pointer" in some places.
Since these pointers need to be updated in sync with the objects they
point into, a relocating GC needs to be aware of them; and the runtime
needs to be able to read off which registers and stack slots hold such
pointers at every safepoint.  We've looked into llvm's existing GC
support, and the mechanism it provides does not seem to help in this
use case.

This email is deliberately terse, but we are more than happy to get
into details about the approaches we've considered as the discussion
progresses.  Pointers to existing work related to this or similar
issues is especially welcome.

Thanks!

-- Sanjoy




More information about the llvm-dev mailing list