Arity of the callee at each GC safe point


In my backend I need to know the arity of the callee at each safe point
and export it in the .s file. This is needed for properly creating stack
descriptors for the calls. I could easily implement that in the frontend
for direct function calls but not for indirect calls (through register).

Is there a way to do that with the current infrastructure? For example,
I tried adding some metadata to each call but LLVM does not guarantee
that they will exist during the ASM printing phase.

Would it be ok if I modified the GCPoint struct in order to store that
information there? Does this make sense?