This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Enhance information recorded by -frecord-gcc-switches
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 9 Jun 2017 11:03:07 +0200
- Subject: Re: RFA: Enhance information recorded by -frecord-gcc-switches
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 76BC68553E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 76BC68553E
- References: <8737baq1g2.fsf@redhat.com> <CAFiYyc0ay79w9dbxJAhLaai3XRC8-wvjj7UcZrYmpV2SraWvNw@mail.gmail.com> <425d0c06-9554-30cb-4ff4-4e68b0b155b3@redhat.com> <20170608151943.GY2154@tucnak> <d2aa47b8-077e-f05e-4327-ae878494b3bf@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 08, 2017 at 05:05:15PM +0100, Nick Clifton wrote:
> >> Regardless, the point of this patch is to record which options were enabled, via
> >> whatever route, in the binaries. This can be useful to users, or distributors,
> >> who want to check that, for example, a specific security option was enabled, or
> >> that a particular a particular optimization was run.
> >
> > And that again doesn't tell you whether the particular optimization pass was
> > run, just that some flag variable was zero or non-zero or had some other
> > value. The decisions in the compiler are more complex and keep changing
> > between compiler versions. For one particular compiler version, -O2 vs. -O1
> > if that is what was originally used to compile something is all you need,
> > that implies a particular behavior, set of options and their interactions.
> > For comparisons between different compiler versions, some of the options
> > are ignored, others are added, others change meaning, and expanding the list
> > of guarded options isn't really useful.
>
> OK -so we need some other way of recording what optimization passes were actually
> run. Fortunately I have something in mind.
>
> Patch withdrawn.
Then there is the question of what it means an optimization pass was
actually run? Some passes have all the checks in gate, but other passes
perform further early checks and bail out early in the execute method, or
the pass only operates on selected kind of statements that might be missing
from the IL in certain functions. So it really would be nice to see what
information the reporter is looking for and what they want to use it for.
Jakub