This is the mail archive of the
mailing list for the GCC project.
Re: basic-block and profile-based optimizing (was Re: New attribute"infrequent"?)
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: basic-block and profile-based optimizing (was Re: New attribute"infrequent"?)
- From: Scott A Crosby <crosby at qwes dot math dot cmu dot edu>
- Date: Fri, 31 Aug 2001 13:25:08 -0400 (EDT)
- cc: David Edelsohn <dje at watson dot ibm dot com>, Jan Hubicka <jh at suse dot cz>, <gcc at gcc dot gnu dot org>, <pfk at fuchs dot offl dot uni-jena dot de>
On Fri, 31 Aug 2001, Andreas Jaeger wrote:
> David Edelsohn <firstname.lastname@example.org> writes:
> >>>>>> Andreas Jaeger writes:
> I forgot the following (Honza stated it in one of his first emails) -
> and this is IMO the key issue:
> If GCC notices that a function is infrequently used, e.g. only used for
> error handling, and normally not used, a call to this function can be
> placed out of line, a branch to a block that contains such a call can
> be predicted as not taken. But how does an application get the
> information that a function of the library is infrequently used?
This doesn't really matter, because the application itself presumabely
will be going through profile-based optimization.. Thus, when profiling
the application, we'll notice that the function call is seldom taken, and
thus we'll code it out-of-line at that time.
I don't think that adding such an attribute-mechanism to a library
interface is all that necessary, nor will it be worth the work and
In addition, this may be a pessimization.. If an infrequently called
library function is invoked from an application function, we only want to
code it out-of-line if the application function has a lot of invocations,
which we won't know till profile-based feedback. Otherwise, doing it out
of line could just gives size and complexity.
No DVD movie will ever enter the public domain, nor will any CD. The last CD
and the last DVD will have moldered away decades before they leave copyright.
This is not encouraging the creation of knowledge in the public domain.