[LLVMdev] Beginner GCRoot Questions

Hayden Livingston halivingston at gmail.com
Wed Feb 18 17:49:04 PST 2015


Hello,

I've spent some time with the LLVM documentation and am beginning to grasp
a few things, but I sometimes need very literal statements to actually
understand things.

My first question is about StackMaps:

Is it true that llvm_gc_root_chain is an API? I've been trying to
understand how exactly one accesses this structure and no where in the
documentation does it mention this is a public variable that will be
present in the final executable (in those or such explicit words).
Secondly, if this is true, does it then mean that this variable is only
accessible to C/C++ land? In turn I'll have some sort of main.cpp that will
then be linked with llc output?

My second question is about GCRoot intrinsic and ShadowStack?

I've read up about intrinsics and it seems if I call
LLVMAddFunction("llvm.*") .. it will be treated in special way by the code
generator?

If I set my GC to Shadowstack and mark all object pointers as GCroots, will
this be 100% correct? Or do I need to myself in my code gen phase spill
registers? Or does ShadowStack essentially do that for me?

I guess my question here is F.SetGC("shadow-stack") + gcroot is enough for
a precise GC or do I need to do more work in my frontend to do things so
that processor register stored pointers are identified.

HA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150218/cd719a6b/attachment.html>


More information about the llvm-dev mailing list