This is the mail archive of the gcc@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: RFC: #pragma optimization_level


On Apr 1, 2005 11:23 PM, E. Weddington <ericw@evcohs.com> wrote:
> Richard Guenther wrote:
> 
> >But the question is, do we want all this sort of #pragmas?  It would
> >surely better to improve the compilers decisions on applying certain
> >optimizations.  As usual, in most of the cases the compiler will be
> >smarter than the user trying to override it (and hereby maybe only
> >working around bugs in a particular compiler release).  All opposition
> >that applied to stuff like attribute((leafify)) (hi Gaby!) applies here, too.
> >So what is your opinion to all this babysitting-the-compiler?
> >
> 
> Is your objection to a grain finer than the function level? Or is it to
> the whole concept of having pragmas change the optimization level per
> function?

It would be a general objection - I thought we're trying to minimize the
knobs the user can turn, both for simplicity and maintainance reasons.
And I cannot, offhand, think of an example where improving the compiler
could not do better than allowing the user specifying optimization options
(or parameters -- anyone for changing --param values per function?  This
would make attribute((leafify)) unnecessary, as I could bump inlining
limits for the to-be-leafified functions).

Giving fine-grained control to the user should be done only if it is for
correctness, not for him to feel better and maybe make one version of
the compiler generate slightly better code for him.

Richard.


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