[LLVMdev] GC questions.

Tobias Nurmiranta spyck at lysator.liu.se
Wed Jul 21 04:31:26 PDT 2004


Hi, I'm thinking out loud, please give me some feedback.

Regarding llvm.gcread and llvm.gcwrite, wouldn't it be nicer if they are
implemented as:

 llvm.gcread(sbyte** object, uint offset)
 llvm.gcwrite(sbyte* data, sbyte** object, uint offset)

Where you also have the offset into the object. In this way the GC would
know where the header of the object we are reading/writing to is. Also it
would mean less traffic to the pointers on the stack, and in some
languages you only want to allow pointers to the header of the objects,
which makes object traversal easier.

Btw, could you give some hints on where the GC functionality is
handled in the source tree (llvm.gcroot, gcread, gcwrite).

,	Tobias




More information about the llvm-dev mailing list