This attribute will allow users to annotate opaque c functions as not
decrementing any reference counts in the functions body or any function that is
called by the given function.
This will improve ARC optimization.
gottesmm on Jan 28 2016, 8:37 PM.Authored by
It's a bit strange to add an attribute that has absolutely no semantic effect whatsoever. Where is this attribute intended to be queried within the compiler? Are there additional functionality patches coming for this?
I think that my response via email did not hit phabriactor. So sorry for the delay.
Yes there is a forthcoming patch for CodeGen which will place an attribute on the relevant functions. The attribute will be queried in the middle end optimizer. The reason why there has been a bit of a delay is I realized I wanted to talk to a few more people about this attribute internally.
We may want to expand its use to essentially mean "no-arc", i.e. this is a c function that uses pure c-code.
There are other possibilities as well so stay tuned.
Okay, I would recommend the future patch include that middle end component as well. It gives better context for the attribute side of things.