This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: expected_retval attribute proposal


> Ideas?  If this turns out to be acceptable hack, I will implement the gcc
> part. (well and glibc part to if neccesary...)

I wouldn't stop you from implementing this idea, but I'd like to see
some use cases first. I.e. which of the glibc functions should have an
expected_retval, and which one? Analysing the gcc source code, or the
X11 source code (by means of grep), in how many cases are those
functions used, and in how many of those cases are the return values
relevant for branch prediction? (i.e. how many calls of those
functions appear in if-statements)

My feeling is that this could likely add a lot of machinery for little
gain.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]