[LLVMdev] Getting started with GC

Tom Brown tdbrown at uiuc.edu
Thu Oct 28 15:35:28 PDT 2004


We have a few questions about the current state of GC.

We decided to start (and finish?) our work by finishing SemiSpace.
process_pointer is meant to move objects from CurSpace to OtherSpace.
How can it find pointers to a moved object? How does it know the size
of each object? Assuming we are writing a GC that will only work from
llvm assembly our best option seems to be forcing the assembly code to
follow a convention that identifies pointers. The SemiSpace code could
keep a map from each allocated pointer to its size, similar to how I
think malloc works.

http://llvm.cs.uiuc.edu/docs/GarbageCollection.html (Which seems to be
the inverse of out-of-date, whatever that is)
Says that there is strong dependency between the frontend and GC
implementations. For example, it seems as though the frontend and GC
need to agree on a structure for the Meta data and they may call each
other during allocation and garbage collection. I imagine it would be
good to decouple the frontend and GC as much as possible or one may
need to be reimplemented when the other is changed.
Do you have any intentions for the use of Meta in SemiSpace?

We could trample around and make something work but it seems as
though you have built most of the support structure for GC. We are
trying to follow that plan.


Tom

-- 
28 70 20 71 2C 65 29 61 9C B1 36 3D D4 69 CE 62 4A 22 8B 0E DC 3E
mailto:tdbrown at uiuc.edu
http://thecap.org/




More information about the llvm-dev mailing list