[LLVMdev] Garbage collection questions
Sandro Magi
naasking at gmail.com
Mon Feb 27 07:55:36 PST 2006
Couple of questions:
1. void llvm_gc_write(void *V, void *ObjPtr, void **FieldPtr)
I haven't seen an adequate explanation of these, but I'm guessing:
void *V: value being written to the field
void *ObjPtr: current value of the field (ie. ObjPtr == *FieldPtr
upon entry to llvm_gc_write)
void **FieldPtr: address of the field being written
2. The current semispace collector includes some code which says it
should be in a code-generator library. If I were to write a collector,
should I also include this code for the time being? Or will this soon
be refactored into an external interface?
3. void %llvm.gcroot(<ty>** %ptrloc, <ty2>* %metadata)
I don't see an implementation of the llvm.gcroot intrinsic in the
semispace collector, so is it implemented elsewhere? Semispace has a
function with the same signature, but it's not in the public GC
interface ( http://llvm.cs.uiuc.edu/cvsweb/cvsweb.cgi/llvm/runtime/GC/GCInterface.h).
Or is this simply because the llvm_cg_walk_gcroots callback hasn't
been refactored as an external interface (as per #2 above)?
That's it for now. :-)
Sandro
More information about the llvm-dev
mailing list