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: David Edelsohn <dje at watson dot ibm dot com>
- Date: Fri, 31 Aug 2001 13:05:47 -0400
- cc: Scott A Crosby <crosby at qwes dot math dot cmu dot edu>, Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org, pfk at fuchs dot offl dot uni-jena dot de
>>>>> Andreas Jaeger writes:
Andreas> But how does an application get the
Andreas> information that a function of the library is infrequently used?
Andreas> I don't see at the moment a way to get this information from one
Andreas> object, the library, to a totally different one, the application -
Andreas> especially when both are compiled and profiled by different developers
Andreas> on different systems.
I do not understand your concern. Why does the information need
to be communicated between objects?
I am suggesting compiling the library with profiling, not the
application. One runs a representative *real* application linked against
the profiled library. One uses profile-directed feedback to optimize the
library. The library (presumably shared library) is optimized exactly
once and included in whatever distribution and binary RPMs.
Will the optimization be best for all applications? No. But is
the current, non-profile directed optimization best for all applications?
Again, no. Will some of the profile-directed optimizations be generic and
useful for most, normal applications? Yes.
Let me reiterate that I am considering the case of system shared
libraries, not object archives local to an application.
P.S. I will not be able to receive email over the U.S. Labor Day
Holiday, so my participation in this converstaion will be cut off in a few
hours. Email sent to me may bounce over the weekend.