[patch] Implement -fcallgraph-info option
Joseph S. Myers
joseph@codesourcery.com
Fri Oct 29 15:57:00 GMT 2010
On Fri, 29 Oct 2010, Eric Botcazou wrote:
> > Please use Variable declarations in common.opt for new option variables,
> > so they go in the gcc_options structure, instead of manual declarations in
> > flags.h and toplev.c.
>
> flag_stack_usage_info isn't associated with any option though. As for the
> other one, where should I put the defines then?
The defines can stay in flags.h.
The aim is for common_handle_option (and all target option handlers) to
cease to set any global state. Everything it sets should end up either
being set through the opts pointer passed to the function, or being set in
subsequent code after the main option handling. If a variable is closely
related to option state, and could reasonably exist in both the driver and
the core compilers, then it's appropriate for it to go in the gcc_options
structure using a Variable declaration, whether or not it directly
describes the state of a single option. I think that applies to
flag_stack_usage_info.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list