This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Option handling and PR 37565
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: sje at cup dot hp dot com, gcc at gcc dot gnu dot org
- Date: Fri, 29 May 2009 18:08:39 +0100
- Subject: Re: RFC: Option handling and PR 37565
- References: <200905291602.n4TG2N913001@lucas.cup.hp.com> <m34ov3kgp2.fsf@google.com>
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.
The PR is about the interaction between backend optimisation overrides and
"pragma GCC optimize" and the __optimize__ attribute. Since these change as
compilation proceeds, the backend's choices at compiler startup may need to be
revisited.
However I also feel it's a bit of a top-heavy solution. What's wrong with
the simple ONCE/ALWAYS split proposed by HJ in comment #8?
cheers,
DaveK
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37565#c8