[cfe-dev] garbage collection tags and LLVM intrinsic support

Arlen Cox arlencox at gmail.com
Tue Nov 17 08:43:43 PST 2009


I've been searching around and haven't found anything about this, so
hopefully it's not a redundant question.

I'm developing a language that targets LLVM, but my runtime is
developed in C.  Since a number of runtime functions are dependent on
the garbage collector that I've implemented in my runtime, I'd like to
have the LLVM IR generated by clang to have the gc tags on certain
functions:
define void @fun() gc "shadow-stack" ...

Is there any way to do this?  I'm hoping to not have to manually
modify the IR because I need to be able to have the IR for multiple
architectures.

Additionally, I'd like to manually tag certain pointers for garbage
collection using the llvm.gcroot intrinsic.  Is this accessible from
clang?

Thanks,
Arlen



More information about the cfe-dev mailing list