This is the mail archive of the
mailing list for the GCC project.
Re: RFA: Add --print-optimizers option
- From: Nick Clifton <nickc at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 Dec 2006 09:10:05 +0000
- Subject: Re: RFA: Add --print-optimizers option
- References: <firstname.lastname@example.org> <456DCEB6.email@example.com> <456FFC42.firstname.lastname@example.org> <email@example.com>
Thanks for explaining. Unfortunately, this does mean a human has to
label the options; you presumably only want to try those which are
compatible with your current ABI.
Right. Plus you also only want those options that actually work, (some
might still be in development or interact badly with other options). In
fact there are all kinds of reasons why the selection of optimization
options can never be fully automatic. The --print-optimizers switch
just helps to make the process less manual.
Do you also want to display permitted values for switches, or are you
just looking at on/off flags? (I'm thinking of -mcpu=<foo> options, or
Ideally for switches which take a small number of different values the
allowed numbers or strings would be displayed so that they could be
parsed automatically. For switches which take a large range of values
(eg the --param switches) a range indicator might work. (I have not
actually developed code to do this yet. I was hoping to start with
simple binary optimization switches and work up from there).
I think that it would be very helpful to integrate this with --help.
That output already lists all the options; we could start by having it
also list the actual values in use, whether specified by the user or
OK, that makes sense. Unfortunately I am about to go on vacation, but I
will have a go at this when I get back.
Then, perhaps for your purposes, all that would be required would be to
group the --help output with optimization options in a block distinct
from other things. That seems like it would help all users (including
the case you mentioned of users wanting to know what -O2 turns on), and
it would also be readily digestable for Acovea.
OK, that would be fine by me.