On Thu, Mar 19, 2020 at 09:56:00AM +0100, Martin Liška wrote:
> I'm planning to work on the problematic options in next stage1 and this
> patch will help me to catch another violations.
> 
> Ready to be installed in next stage1?

Isn't that costly even for the !flag_checking case?
struct gcc_options is over 5KB now.
So even just that
  gcc_options saved_global_options = global_options;
is a fair amount of work.
Can't you instead:
  gcc_options saved_global_options;
  if (flag_checking)
    saved_global_options = global_options;
?
Or for the opt_stack case have a pointer to the options and XNEW/XDELETE
it instead of having it directly in opt_stack?
I mean, optimize for the !flag_checking case...

        Jakub

Reply via email to