i386: Don't use ix86_tune_ctrl_string in parse_mtune_ctrl_str
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jan 2020 12:43:34 +0000 (04:43 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jan 2020 12:43:53 +0000 (04:43 -0800)
commit1e964774aec65472d7a0741d7faa6a884295fc81
treeb54dbcfecf7aea5236863494e0780e7f0dc259ef
parent928605936939d4364b5019b2bdda63612fbc4fdb
i386: Don't use ix86_tune_ctrl_string in parse_mtune_ctrl_str

There are

static void
parse_mtune_ctrl_str (bool dump)
{
  if (!ix86_tune_ctrl_string)
    return;

parse_mtune_ctrl_str is only called from set_ix86_tune_features, which
is only called from ix86_function_specific_restore and
ix86_option_override_internal.  parse_mtune_ctrl_str shouldn't use
ix86_tune_ctrl_string which is defined with global_options.  Instead,
opts should be passed to parse_mtune_ctrl_str.

PR target/91399
* config/i386/i386-options.c (set_ix86_tune_features): Add an
argument of a pointer to struct gcc_options and pass it to
parse_mtune_ctrl_str.
(ix86_function_specific_restore): Pass opts to
set_ix86_tune_features.
(ix86_option_override_internal): Likewise.
(parse_mtune_ctrl_str): Add an argument of a pointer to struct
gcc_options and use it for x_ix86_tune_ctrl_string.
gcc/ChangeLog
gcc/config/i386/i386-options.c