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: basic-block and profile-based optimizing (was Re: New attribute "infrequent"?)


>>>>> 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.

David

	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.


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