[LLVMdev] ocaml+llvm
Carl Friedrich Bolz
cfbolz at gmx.de
Mon Aug 13 13:58:48 PDT 2007
Hi Chris,
Chris Lattner wrote:
> I don't think you want to try to have the LLVM code generator build this
> table. The table is a contract between the specific codegen you're using
> and the GC runtime you're using. This contract is specific to the current
> ocaml code generator.
>
> In the LLVM world, you should use the first-class support we already have
> for accurate GC: http://llvm.org/docs/GarbageCollection.html
I was wondering recently: are there actually any projects that are using
these facilities? Preferably ones that I could take a look at?
> Based on this, you annotate the variables with llvm.gcroot intrinsics, and
> then walk the stack with the llvm_cg_walk_gcroots function. Note that
> these are not well tested and probably have holes in them, but these are
> the interfaces we want to use :)
How is this function actually implemented? Is there special
stack-walking code emitted or does LLVM keep an extra stack of roots?
Cheers,
Carl Friedrich Bolz
More information about the llvm-dev
mailing list