I recently added initial support for accurate GC to LLVM, as described in
this document:
http://llvm.cs.uiuc.edu/docs/GarbageCollection.html
I've started implementing a trivial copying collector as a testcase for
it, but it is not done yet. All code generators support identification of
roots on the stack though.
If you're interested in such things, I would really appreciate feedback on
the document, especially from front-end authors or garbage collection
implementor type-of-people.
Thanks,
-Chris
This is really nice, it supports my (somewhere-in-the-future) work with
llvm, garbage collection and persistent memories.
Can/Will one garbage collector be used for several different front-end
languages? If so, don't you have to put functionality to traverse objects
in the language implementation, since the internal representation depends
on what language that is compiled. One language's internal representation
for data could for example use a bit to define if a field is a pointer or
an immediate value.
Or does the collector know that it is Java code it's compiling, and
therefore know that it should look for java type-tags on objects?
Otherwise it was a nice document, please say when you've implemented the
trivial copying collector, which might answer my question. 
Regards, Tobias
By the way, it would be nice to have a small example in the documentation
how to compile code to use the GC. A small code example and the flags to
llvm to compile it.
Thanks, Tobias
This is really nice, it supports my (somewhere-in-the-future) work with
llvm, garbage collection and persistent memories.
Can/Will one garbage collector be used for several different front-end
languages?
Yes, exactly. The GC interfaces are completely language agnostic.
If so, don't you have to put functionality to traverse objects in the
language implementation, since the internal representation depends on
what language that is compiled. One language's internal representation
for data could for example use a bit to define if a field is a pointer
or an immediate value.
Exactly. There is (soon to be in CVS) a callback that the GC makes to
decode the language specific GC maps.
Or does the collector know that it is Java code it's compiling, and
therefore know that it should look for java type-tags on objects?
Java was just an example: we could also do scheme, CLR, *ML, etc.
Anything that is type-safe and needs a GC should be able to work.
Otherwise it was a nice document, please say when you've implemented the
trivial copying collector, which might answer my question. 
Will do. 
-Chris
By the way, it would be nice to have a small example in the documentation
how to compile code to use the GC. A small code example and the flags to
llvm to compile it.
Here's my first (simple) testcase:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040517/014552.html
The steps needed to compile and test it are a bit obscure right now,
because you have to explicitly link in the GC runtime. I expect that a
GC'd language front-end would probably just link the GC into its standard
runtime to make this nicer (or hide it in the compiler driver). In any
case, when I finish up the GC doc, I will include instructions on how to
do simple tests. 
-Chris