This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC, PATCH] Disable -fprofile-use related optimizations if corresponding .gcda file not found.
- From: Nikolai Bozhenov <n dot bozhenov at samsung dot com>
- To: pinskia at gmail dot com, Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Vyacheslav Barinov <v dot barinov at samsung dot com>, Slava Garbuzov <v dot garbuzov at samsung dot com>
- Date: Thu, 08 Oct 2015 10:54:46 +0300
- Subject: Re: [RFC, PATCH] Disable -fprofile-use related optimizations if corresponding .gcda file not found.
- Authentication-results: sourceware.org; auth=none
- References: <5615442E dot 9090200 at partner dot samsung dot com> <CA+=Sn1mDTn9JdqoqXngjCktWEHwtuku3zP3+odZ4FnJVBM_cPA at mail dot gmail dot com> <56154822 dot 9070703 at partner dot samsung dot com> <89F13DBD-C58D-4F73-84AA-6F077B348B62 at gmail dot com>
On 10/07/2015 08:07 PM, pinskia@gmail.com wrote:
Yes. But I am saying some one could do -fprofile-use -frename-registers and expect rename registers to stay on even if there is no profile.
That's true, we shouldn't disable any options that were explicitly
requested by
the user.
Why not figure out how much to improve that instead. Rename register is just doing renaming of register usage and not undoing any scheduling at all (well it might cause some moves to be removed). I think you really should dig into deeper why it is causing a performance issue.
Yep, the better way is to fix all the problems in all the passes. We're
working on it but it may take a while. Meanwhile, we want to use PGO and we
need a way to avoid degradations caused by it. We want to fallback to the
usual compilation process for a source file if we don't like how it is
compiled with PGO. And what we want to do is to simply remove the
corresponding gcda file and have the compiler ignore the -fprofile-use
option
for the translation unit.
Anyway, I find current GCC's behavior to be confusing. Currently it silently
ignores missed profile data but triggers some opaque internal options which
affect further compilation. I think in case of a missed gcda file GCC should
either ignore -fprofile-use completely or issue a warning/error.
Thanks,
Nikolai