[PATCH] D15998: Implement __attribute__((gc_leaf_function)).

Philip Reames via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 17:17:59 PST 2016

reames added a comment.

Neither Sanjoy or I are qualified to review a clang patch.  You'll need to find clang reviewers.

Also, before this gets exposed through Clang, we really should formalize/document the attribute.   In practice, it implies the lack of a safepoint poll site inside the called function.  Annoyingly, it's not an inferable property since we don't represent the possible insertion of a poll in the IR.

Hm.  This makes me wonder... We've moved to a model of inserting safepoints (specifically for deopt info) early, and then rewriting late in our tree.  We're not even using the PlaceSafepoints pass any more.  It's been left mostly for other users.  Would it maybe make sense to fully retire PlaceSafepoints and migrate over to a scheme where safepoints sites are explicit from the beginning?  This would allow us to infer "gc-leaf" from FunctionAttrs...

(This high level discussion should probably move to llvm-dev.  I can start it if you'd like, otherwise post something and I'll reply.)


More information about the cfe-commits mailing list