Hi,
I am looking to utilize LLVM as the backend in an existing compiler for a garbage collected language, and have a question regarding the current and future support for precise GC in LLVM.
It appears that gc.root is being phased out, with with breaking changes such as this: http://reviews.llvm.org/D7004
Does this mean that gc.statepoint is ready for primetime (or will be for 3.7’s release)? Also, will gc.root still be supported in 3.7 or later?
My gut tells me to use statepoints, but after seeing a bunch of TODOs in its implementation in trunk (along with the docs still describing it as experimental), I’m unsure which intrinsics I should be using.
thanks.
Does this mean that gc.statepoint is ready for primetime (or will be
for 3.7's release)? Also, will gc.root still be supported in 3.7 or
later?
We are actively using and developing on top of gc.statepoint, and in
all likelihood that will remain true during and after 3.7's release.
I don't think there are any specific plans to drop support for
gc.roots in 3.7 though.
My gut tells me to use statepoints, but after seeing a bunch of TODOs
in its implementation in trunk (along with the docs still describing
it as experimental), I'm unsure which intrinsics I should be using.
As far as I can tell, none of the TODOs are fundamental. They should
mostly be incremental improvements that may or may not make sense to
implement as we get gc.statepoint production ready. If you have
specific concerns (or patches!) feel free to send them our way.
-- Sanjoy
Can I ask which language? I’m always happy to see more languages with GC being built on top of LLVM. gc.root will be supported through 3.7, and likely through 3.8. While I have made some changes to gc.root, I have tried very hard to avoid breaking any use case that I know of. I can’t honestly tell you that either gc.root or gc.statepoint is production ready. Out of the two, I believe gc.statepoint is likely to be more stable. More importantly, there are folks (myself included) who are likely to respond to gc.statepoint bugs in a fairly prompt manner. While I will try to look at gc.root bugs, I have to admit these are going to be low priority for me. There is no one else in the community actively involved in maintaining gc.root either. Personally, I would suggest you build on top of gc.statepoint. In particular, start by looking at the PlaceSafepoints and RewriteStatepointsForGC utility passes. My strong suggestion would be that whichever you pick, make sure you’re setup to track tip of tree development on a semi regular basis. You will find at least a couple of issues along the way and you really want to be able to pick up fixes easily. If you have specific TODOs which are concerning, please point them out. Some may just be stale, others might be minor issues. I can give context if you list the specific ones that concern you. The experimental part isn’t going away for quite a while. I suspect we need to see a merger of patchpoints and statepoints before we’re really ready to remove the experimental label. Experimental here means “no backwards compatibility guarantees”, not “unstable”. p.s. If you’d like to talk through a tentative design and get a feel for where we are in terms of GC support, I’m happy to chat on the phone for a bit. Send me an email off list and we’ll setup a call. Philip