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: Add --print-optimizers option


Hi Mark,

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
-moptimize-me-harder=N options.)

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
computed.

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.


Cheers
  Nick



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