On Mon, Sep 06, 2021 at 06:58:37PM +0800, Hongtao Liu wrote:
> > process_options would mean it affects only the command line and not
> > __attribute__((optimize ("O2", "ftree-vectorize")))
> > etc.
> > So, shouldn't it be instead done in default_options_optimization, somewhere
> It seems default_options_optimization is before read_comline_options
> which means it can't handle cmdline option -O2 -ftree-vectorize.
> 
>   default_options_optimization (opts, opts_set,
>                                 decoded_options, decoded_options_count,
>                                 loc, lang_mask, &handlers, dc);
> 
>   read_cmdline_options (opts, opts_set,
>                         decoded_options, decoded_options_count,
>                         loc, lang_mask,
>                         &handlers, dc);

So what about finish_options then?
default_options_optimization has only a single caller that then calls
read_cmdline_options and then finish_options.

        Jakub

Reply via email to