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: [PATCH, committed] Add ability to set the optimization options and on ix86 target options on a function specific basis


2008/7/23 Michael Meissner <gnu@the-meissners.org>:
> I committed the following patch to revision 138075 on the mainline to add
> function specific optimization/target option support.  I did not move the
> optimization and target options data structures from being trees containing the
> structure to the structure itself that Steven Bosscher suggested, because it
> got complicated with regard to garbage collection and hashing.  I might look at
> it later, but I wanted to get the main patches checked in.

I am sorry I comment on this so late but I just found out about the
current syntax. If my comments have already been answered, feel free
to point me to some thread where I can read the rationale for the
design decisions.

* Why don't make a 1-to-1 mapping between the command-line option and
the argument to option("") ?

It seems pretty cumbersome to have to strip the -m for each option.

Moreover, if we extend the current code to handle -Ox -f* -W* and
whatever we wish to handle (--param?), things get worse.

* In relation to the previous. Why separate options with commas
instead of spaces? In other words, why not make the argument of
option("") behave as the command-line. That is,  the commandline "gcc
-march=i686 -mfpmath=sse,387" has a 1-to-1 mapping to
option("-march=i686 -mfpmath=sse,387"). Also, you don't need to work
around commas.

Cheers,

Manuel


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