This is the mail archive of the
mailing list for the GCC project.
RE: AutoFDO profile toolchain is open-sourced
- From: Aditya K <hiraditya at msn dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- 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>, "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: Tue, 12 May 2015 12:37:19 +0000
- 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>,<20150509143302 dot GA26213 at kam dot mff dot cuni dot cz>
Recently we found an ICE while compiling a program with auto-fdo (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972).
The ICE was caused because SSA is not in a valid state when the early inliner is run. The fix was to update_ssa before running the early inliner (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972#c4).
However, it remains to be found out which pass caused the SSA to be in that state, maybe fixing the problem there would be more appropriate.
> Date: Sat, 9 May 2015 16:33:02 +0200
> From: firstname.lastname@example.org
> To: email@example.com
> CC: firstname.lastname@example.org; email@example.com; firstname.lastname@example.org; email@example.com; firstname.lastname@example.org; email@example.com; firstname.lastname@example.org; email@example.com
> Subject: Re: AutoFDO profile toolchain is open-sourced
>>> 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
> 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 :)