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: Option handling and PR 37565


On Fri, 2009-05-29 at 09:38 -0700, Ian Lance Taylor wrote:
> Steve Ellcey <sje@cup.hp.com> writes:
> 
> > So instead of 
> > 	if (flag_var_tracking)
> > we would have
> > 	if (targetm.get_optimization_flag_value(OPT_fvar_tracking))
> 
> I don't particularly want to have to make an indirect function call
> every time we check a flag.  I don't see why we should check every time
> when we can determine the value once when the compiler starts.

But if we want to fully support things like the __optimize__ attribute
then we can't just check once when the compiler starts.  The flag could
be changed during compilation by the optimize attribute so at the very
least we need to override some values every time we see this attribute
(which is what we are not doing now).

> Also, we would still need a place to give backend warnings like
> 
> unwind tables currently require either a frame pointer or -maccumulate-outgoing-args for correctness

Warnings are an issue, but again we have the problem that we can't just
do warnings once at the beginning since values could be changed during
compilation.  Maybe the set function should also be overridable so that
it could issue warnings when a variable is set though that wouldn't help
with the above warning since it looks like it needs to be given when
something isn't set.  I am not sure I have an answer to this problem.

> So I guess I don't much like the idea.
> 
> Ian

Steve Ellcey
sje@cup.hp.com


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