[LLVMdev] Accurate garbage collection support

Chris Lattner sabre at nondot.org
Tue May 25 12:01:01 PDT 2004


On Tue, 25 May 2004, Tobias Nurmiranta wrote:

>
> 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


> On Mon, 24 May 2004, Chris Lattner wrote:
> > 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
> >
> > --
> > http://llvm.cs.uiuc.edu/
> > http://www.nondot.org/~sabre/Projects/
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list