PGO enhancements in GCC

Jan Hubicka hubicka@ucw.cz
Wed Feb 25 12:06:00 GMT 2004


> Vincent Diepeveen <diep@xs4all.nl> writes:
> 
> > The code size of the program in question i refer to here is DIEP and it's
> > pretty big code size. It won't fit easily in L1 instruction cache of my K7
> > processors (2x dual K7). Using profile guided information and structure of
> > which function calls which it might be possible to reschedule the functions
> > within the software such that it has a bigger chance to hit the functions
> > already inside L1 instruction cache. Especially at P4 and future problem
> 
> Caroline Tice just posted a patch to do that yesterday on gcc-patches.
> It splits hot and cold code into separate sections. 
> See http://gcc.gnu.org/ml/gcc-patches/2004-02/msg02251.html
> 
> Maybe you could test her patch?

This is also partly done by -freorder-function pass.  It is less
aggresive than Caroline's code as it won't split the function and simply
separate the functions into three sections (cold/hot/normal).
If we were doing IPA it would be better to reorder functions in a way
minimizing average call distance but it is not doable within compiler
with current design (linker can be able to do so but it is not)

Honza
> 
> -Andi



More information about the Gcc mailing list