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: New attribute "infrequent"?





On Mon, 27 Aug 2001, Jan Hubicka wrote:
  We can add an attribute (probably called "infrequent") to the functions.  Such
  attribute exhibits a hint, that given function is definitly outside performance
  cirtical code, so gcc can:
  
  1) optimize it for size
  2) use for branch prediction purposes
  3) propagate the information to other functions allways calling infrequent
  4) once procedure splitting is implemented (if at all), it can move whole
     function to infrequently executed section.

I would think we get most of the benefit already by recognizing "noreturn" 
functions and all calls leading to those. Marking functions "infrequent" is 
a much more fuzzy notion, and has therefore the risk of being counter-productive,
especially as functions may be used in an entirely different way by different
programs. The distributed cost of maintaining such attributes all over the place
seems to be way higher than the benefit of such an optimization.

  -Geert


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