This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Enhance information recorded by -frecord-gcc-switches


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]