diff options
author | Joseph Myers <joseph@codesourcery.com> | 2010-09-17 15:14:49 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2010-09-17 15:14:49 +0100 |
commit | e90afde6fe471ff16c06e00709fe51421d073724 (patch) | |
tree | b975a487ff46cf6a7b61b28aaa2fde8f9ec2cd09 /gcc/optc-gen.awk | |
parent | 2d5581f1b2a140e1ca0bf4d3256457939fc3e6a3 (diff) | |
download | gcc-e90afde6fe471ff16c06e00709fe51421d073724.zip gcc-e90afde6fe471ff16c06e00709fe51421d073724.tar.gz gcc-e90afde6fe471ff16c06e00709fe51421d073724.tar.bz2 |
options.texi (Variable): Document.
* doc/options.texi (Variable): Document.
* optc-gen.awk, opth-gen.awk: Handle Variable records. Don't
generate target_flags declarations explicitly. Don't define
VarExists variables for the driver.
* common.opt (target_flags): New Variable record.
(flag_dump_unnumbered, flag_dump_unnumbered_links,
flag_var_tracking, flag_var_tracking_assignments,
flag_var_tracking_assignments_toggle): Don't mark variables with
VarExists.
* config/i386/i386.c (ix86_isa_flags): Don't define here.
* config/i386/i386.opt (ix86_isa_flags): Define here.
* config/mcore/mcore.c (mcore_stack_increment): Don't define here.
* config/mcore/mcore.opt (mcore_stack_increment): Don't mark with
VarExists.
* flags.h (flag_dump_unnumbered, flag_var_tracking): Remove.
* print-rtl.c (flag_dump_unnumbered, flag_dump_unnumbered_links):
Only define for generator programs.
* rtlanal.c (target_flags): Remove.
* toplev.c (flag_var_tracking, flag_var_tracking_assignments,
flag_var_tracking_assignments_toggle): Remove.
From-SVN: r164370
Diffstat (limited to 'gcc/optc-gen.awk')
-rw-r--r-- | gcc/optc-gen.awk | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index bee780c..4a146dd 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -30,6 +30,7 @@ BEGIN { n_opts = 0 n_langs = 0 n_target_save = 0 + n_extra_vars = 0 quote = "\042" comma = "," FS=SUBSEP @@ -48,6 +49,10 @@ BEGIN { target_save_decl[n_target_save] = $2 n_target_save++ } + else if ($1 == "Variable") { + extra_vars[n_extra_vars] = $2 + n_extra_vars++ + } else { name = opt_args("Mask", $1) if (name == "") { @@ -72,7 +77,6 @@ print "#include " quote "opts.h" quote print "#include " quote "intl.h" quote print "" print "#ifdef GCC_DRIVER" -print "int target_flags;" print "int target_flags_explicit;" print "#else" print "#include " quote "flags.h" quote @@ -81,6 +85,9 @@ print "#endif /* GCC_DRIVER */" print "" have_save = 0; +for (i = 0; i < n_extra_vars; i++) { + print extra_vars[i] ";" +} for (i = 0; i < n_opts; i++) { if (flag_set_p("Save", flags[i])) have_save = 1; @@ -90,11 +97,7 @@ for (i = 0; i < n_opts; i++) { continue; if (flag_set_p("VarExists", flags[i])) { - # Need it for the gcc driver. - if (name in var_seen) - continue; - init = "" - gcc_driver = 1 + continue; } else { init = opt_args("Init", flags[i]) @@ -102,16 +105,11 @@ for (i = 0; i < n_opts; i++) { init = " = " init; else if (name in var_seen) continue; - gcc_driver = 0 } - if (gcc_driver == 1) - print "#ifdef GCC_DRIVER" print "/* Set by -" opts[i] "." print " " help[i] " */" print var_type(flags[i]) name init ";" - if (gcc_driver == 1) - print "#endif /* GCC_DRIVER */" print "" var_seen[name] = 1; |