This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: expected_retval attribute proposal
- To: jh at suse dot cz
- Subject: Re: expected_retval attribute proposal
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 10 May 2000 19:15:54 +0200
- CC: egcs at egcs dot cygnus dot com, libc-hacker at sourceware dot cygnus dot com
- References: <20000510110344.A17721@atrey.karlin.mff.cuni.cz>
> 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