This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PGO enhancements in GCC
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Andi Kleen <ak at suse dot de>
- Cc: Vincent Diepeveen <diep at xs4all dot nl>, ctice at apple dot com,gcc at gcc dot gnu dot org
- Date: Wed, 25 Feb 2004 11:36:47 +0100
- Subject: Re: PGO enhancements in GCC
- References: <3.0.32.20040224024236.01319628@pop.xs4all.nl.suse.lists.egcs> <p73ishv5v2q.fsf@verdi.suse.de>
> 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