This is the mail archive of the 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: New attribute "infrequent"?

In article <> you write:
>> Date: Mon, 27 Aug 2001 18:47:06 +0200
>> From: Jan Hubicka <>
>> To: Ulrich Drepper <>
>> Actually for enabling -Os, the attribute "infrequent" looks like
>> better choice to me:
>If 80% of the code is executed 10% of the time, does it make any sense
>to have people mark up the 80% of the code as infrequent?  Or put
>another way, would it not make more sense to have the mark the
>frequent code instead?

I agree 100%.

Almost always, the programmer knows which parts of his programs are
really performance-critical.  Having him/her mark _those_ parts (as
opposed to the bulk of his program) makes much more sense than trying to
say "this should be optimized for size" all over the place. 

Obviously, things like profile-driven feedback compilation can add its
own information, so that the compiler can do part of this on its own.
Again, with profiling, it's usually much more productive to find the
(few) hotspots than try to mark the places that aren't active.


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