This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AutoFDO profile toolchain is open-sourced
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Aditya K <hiraditya at msn dot com>
- Cc: Dehao Chen <dehao at google dot com>, Ilya Palachev <i dot palachev at samsung dot com>, Xinliang David Li <davidxl at google dot com>, Jan Hubicka <hubicka at ucw dot cz>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Vyacheslav Barinov <v dot barinov at samsung dot com>, Diego Novillo <dnovillo at google dot com>, Sebastian Pop <sebpop at gmail dot com>
- Date: Sat, 9 May 2015 16:33:02 +0200
- Subject: Re: AutoFDO profile toolchain is open-sourced
- Authentication-results: sourceware.org; auth=none
- References: <5523ED98 dot 8080007 at samsung dot com> <CAFk3UF8To5Qcz8NN5rUF3z6j8CCg_89A+62P=1U9YrtbZ5=mLg at mail dot gmail dot com> <20150410203927 dot GA18980 at atrey dot karlin dot mff dot cuni dot cz> <CAAkRFZ+2RK=-qKo4eCRmq0N1QjENm0tAe2PbX3xnC76UyuFrJA at mail dot gmail dot com> <CAAkRFZLMP3SvGZqCdyLbnZqfY6RUqwRJ3tpVRYKMA+ZCVt2u9A at mail dot gmail dot com> <20150410224327 dot GA87750 at kam dot mff dot cuni dot cz> <CAAkRFZJ4MPCqCMJ7z9WK50e3HPJWnmZHoiWU0m-e2b915GSU9g at mail dot gmail dot com> <554C7B20 dot 8020007 at samsung dot com> <CAO2gOZW2_0VJdHnwvH8pGM9aM9TD2p0ii0coMgR9JWTuHuCEqQ at mail dot gmail dot com> <BLU179-W382446C8EE644C5845A96DB6DE0 at phx dot gbl>
> > Yes, it will. But it's not well tuned at all. I will start tuning it
> > if I have free cycles. It would be great if opensource community can
> > also contribute to this tuning effort.
>
> If you could outline portions of code which needs tuning, rewriting, that will help get started in this effort.
Optimization passes in GCC are generally designed to work with any kind of edge profile they get.
There are only few cases where they do care about what profile is around.
At the moment we consider two types of profiles - static (guessed) and FDO. For
static one we shut down use of profile info for some heuristics - for example
we do not expect loop trip counts to be reliable in the profiles because they
are not. You can look for code checking profile_status_for_fn.
Auto-FDO does not have special value for profile_status_for_fn and it goes with
same code paths for FDO. Dehao has some patches for Auto-FDO tuning but my
impression is that he got mostly got around by just makng optimizer bit more
robust for nonsential profiles that is always good, since even FDO profiles can
get wrong. BTW, Dehao, do you think you can submit these changes for this
stage1?
I suppose in this case we have yet another kind of profile that is less reliable than
FDO and we need to start by simply benchmarking and looking for cases where this profile
gets worse and handle them one by one :)
Honza