[PATCH] Make warn_inline Optimization option.

Jan Hubicka hubicka@ucw.cz
Wed Jan 8 11:08:00 GMT 2020


> Hmm, indeed.  Well, I belive we use the 'Optimization' flag for other purposes
> than only triggering LTO streaming and option save/restore, so we need another
> flag that only triggers save/restore then (and also allow us to avoid
> dropping the
> flag at lto-option streaming time where we currently drop all warning options).

jan@skylake:~/trunk/gcc> grep Optimization *.awk
optc-save-gen.awk:      if (flag_set_p("(Optimization|PerFunction)", flags[i])) {
optc-save-gen.awk:      if (flag_set_p("(Optimization|PerFunction)", flags[i])) {
optc-save-gen.awk:              var_opt_hash[n_opt_val] = flag_set_p("Optimization", flags[i]);
opt-functions.awk:        test_flag("(Optimization|PerFunction)", flags, " | CL_OPTIMIZATION")
opth-gen.awk:   if (flag_set_p("(Optimization|PerFunction)", flags[i]))
{
jan@skylake:~/trunk/gcc> grep PerFunction *.opt
Common Report Var(flag_var_tracking) Init(2) PerFunction
Common Report Var(flag_var_tracking_assignments) Init(2) PerFunction
Common Report Var(flag_var_tracking_assignments_toggle) PerFunction
Common Report Var(flag_var_tracking_uninit) PerFunction

So I suppose we want PerFunction to be used for warnings and params
and stuff that is not an optimization like -fasynchronous-unwind-tables.

Indeed Optimizations adds CL_OPTIMIZATION which seems to make options to
appear in section "The following options control optimization" which is
not precisely accurate either, since we think we still have
optimizations that are not per function (-fsemantic-interposition could
count as such, tought I guess definition of what is "optimization" is
bit shady)

Honza
> 
> Richard.
> 
> > honza
> >
> > >
> > > Richard.
> > >
> > > > Honza



More information about the Gcc-patches mailing list