diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-29 14:49:14 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-29 14:49:14 +0000 |
commit | 5ae82d58486a4ee6a9a7d5ca5fef2b43c2d53eb4 (patch) | |
tree | 7baf17d9e07b39bfc1d357b60f65c55dc3c60d43 /gcc/opth-gen.awk | |
parent | fb12d30aa5e7ad2bf5d462f38826634236cfed55 (diff) | |
download | gcc-5ae82d58486a4ee6a9a7d5ca5fef2b43c2d53eb4.tar.gz |
gcc:
* optc-gen.awk: Generate global_options initializer instead of
individual variables. Add x_ prefix to names of structure
members.
* opth-gen.awk: Generate gcc_options structure. Add x_ prefix to
names of structure members.
* doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Document.
* doc/tm.texi: Regenerate.
* alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
* c-parser.c (disable_extension_diagnostics,
restore_extension_diagnostics): Update names of cpp_options
members.
* combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* common.opt (fcompare-debug-second): Don't use Var.
* config/alpha/alpha.h (target_flags): Remove.
* config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/bfin/bfin.h (target_flags): Remove.
* config/cris/cris.h (target_flags): Remove.
* config/i386/i386-c.c (ix86_pragma_target_parse): Update names of
cl_target_option members.
* config/i386/i386.c (ix86_force_align_arg_pointer): Remove.
(ix86_function_specific_print, ix86_valid_target_attribute_tree,
ix86_can_inline_p): Update names of cl_target_option members.
* config/i386/i386.h (ix86_isa_flags): Remove.
* config/lm32/lm32.h (target_flags): Remove.
* config/mcore/mcore.h (mcore_stack_increment): Remove.
* config/mcore/mcore.md (addsi3): Remove extern declaration of
flag_omit_frame_pointer.
* config/mep/mep.h (target_flags): Remove.
* config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/mmix/mmix.h (target_flags): Remove.
* config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic,
flag_expensive_optimizations): Remove.
* config/s390/s390.h (flag_pic): Remove.
* config/score/score-conv.h (target_flags): Remove.
* config/sh/sh.h (sh_fixed_range_str): Remove.
* config/spu/spu.h (target_flags, spu_fixed_range_string): Remove.
* dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* diagnostic.c (diagnostic_initialize): Update names of
diagnostic_context members.
* diagnostic.h (diagnostic_context): Rename inhibit_warnings and
warn_system_headers.
(diagnostic_report_warnings_p): Update for new names.
* dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and
HARD_FRAME_POINTER_IS_ARG_POINTER.
* flags.h (flag_compare_debug): Declare.
* ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* opts.c (flag_compare_debug): Define.
(common_handle_option): Update names of diagnostic_context
members. Handle -fcompare-debug-second.
(fast_math_flags_struct_set_p): Update names of cl_optimization
members.
* reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use.
* sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
gcc/c-family:
* c-common.c (c_cpp_error): Update names of diagnostic_context
members.
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
cl_optimization members.
* c-opts.c (warning_as_error_callback, c_common_handle_option,
sanitize_cpp_opts, finish_options): Update names of cpp_options
members.
gcc/fortran:
* cpp.c (cpp_define_builtins): Update names of gfc_option_t
members.
(gfc_cpp_post_options): Update names of cpp_options members.
(cb_cpp_error): Update names of diagnostic_context members.
* f95-lang.c (gfc_init_builtin_functions): Update names of
gfc_option_t members.
* gfortran.h (gfc_option_t): Rename warn_conversion and
flag_openmp.
* intrinsic.c (gfc_convert_type_warn): Update names of
gfc_option_t members.
* options.c (gfc_init_options, gfc_post_options, set_Wall,
gfc_handle_option): Update names of gfc_option_t members.
* parse.c (next_free, next_fixed): Update names of gfc_option_t
members.
* scanner.c (pedantic): Remove extern declaration.
(skip_free_comments, skip_fixed_comments, include_line): Update
names of gfc_option_t members.
* trans-decl.c (gfc_generate_function_code): Update names of
gfc_option_t members.
gcc/java:
* java-tree.h (flag_filelist_file, flag_assert, flag_jni,
flag_force_classes_archive_check, flag_redundant, flag_newer,
flag_use_divide_subroutine, flag_use_atomic_builtins,
flag_use_boehm_gc, flag_hash_synchronization,
flag_check_references, flag_optimize_sci, flag_indirect_classes,
flag_indirect_dispatch, flag_store_check,
flag_reduced_reflection): Remove.
* jcf-dump.c (flag_newer): Remove.
* jcf.h (quiet_flag): Remove.
* parse.h (quiet_flag): Remove.
libcpp:
* include/cpplib.h (cpp_options): Rename warn_deprecated,
warn_traditional, warn_long_long and pedantic.
* directives.c (directive_diagnostics, _cpp_handle_directive):
Update names of cpp_options members.
* expr.c (cpp_classify_number, eval_token): Update names of
cpp_options members.
* init.c (cpp_create_reader, post_options): Update names of
cpp_options members.
* internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
cpp_options members.
* macro.c (parse_params): Update names of cpp_options members.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164723 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opth-gen.awk')
-rw-r--r-- | gcc/opth-gen.awk | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk index 423328ddfdb..c15babdb6db 100644 --- a/gcc/opth-gen.awk +++ b/gcc/opth-gen.awk @@ -75,10 +75,25 @@ print "" have_save = 0; +print "#ifndef GENERATOR_FILE" +print "struct gcc_options\n{" +print "#endif" + for (i = 0; i < n_extra_vars; i++) { var = extra_vars[i] sub(" *=.*", "", var) - print "extern " var ";" + orig_var = var + name = var + type = var + sub("^.*[ *]", "", name) + sub(" *" name "$", "", type) + var_seen[name] = 1 + print "#ifdef GENERATOR_FILE" + print "extern " orig_var ";" + print "#else" + print " " type " x_" name ";" + print "#define " name " global_options.x_" name + print "#endif" } for (i = 0; i < n_opts; i++) { @@ -93,8 +108,17 @@ for (i = 0; i < n_opts; i++) { continue; var_seen[name] = 1; + print "#ifdef GENERATOR_FILE" print "extern " var_type(flags[i]) name ";" + print "#else" + print " " var_type(flags[i]) "x_" name ";" + print "#define " name " global_options.x_" name + print "#endif" } +print "#ifndef GENERATOR_FILE" +print "};" +print "extern struct gcc_options global_options;" +print "#endif" print "" # All of the optimization switches gathered together so they can be saved and restored. @@ -114,8 +138,8 @@ n_opt_char = 2; n_opt_short = 0; n_opt_int = 0; n_opt_other = 0; -var_opt_char[0] = "unsigned char optimize"; -var_opt_char[1] = "unsigned char optimize_size"; +var_opt_char[0] = "unsigned char x_optimize"; +var_opt_char[1] = "unsigned char x_optimize_size"; for (i = 0; i < n_opts; i++) { if (flag_set_p("Optimization", flags[i])) { @@ -129,16 +153,16 @@ for (i = 0; i < n_opts; i++) { var_opt_seen[name]++; otype = var_type_struct(flags[i]); if (otype ~ "^((un)?signed +)?int *$") - var_opt_int[n_opt_int++] = otype name; + var_opt_int[n_opt_int++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?short *$") - var_opt_short[n_opt_short++] = otype name; + var_opt_short[n_opt_short++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?char *$") - var_opt_char[n_opt_char++] = otype name; + var_opt_char[n_opt_char++] = otype "x_" name; else - var_opt_other[n_opt_other++] = otype name; + var_opt_other[n_opt_other++] = otype "x_" name; } } @@ -198,20 +222,20 @@ if (have_save) { var_save_seen[name]++; otype = var_type_struct(flags[i]) if (otype ~ "^((un)?signed +)?int *$") - var_target_int[n_target_int++] = otype name; + var_target_int[n_target_int++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?short *$") - var_target_short[n_target_short++] = otype name; + var_target_short[n_target_short++] = otype "x_" name; else if (otype ~ "^((un)?signed +)?char *$") - var_target_char[n_target_char++] = otype name; + var_target_char[n_target_char++] = otype "x_" name; else - var_target_other[n_target_other++] = otype name; + var_target_other[n_target_other++] = otype "x_" name; } } } else { - var_target_int[n_target_int++] = "int target_flags"; + var_target_int[n_target_int++] = "int x_target_flags"; } for (i = 0; i < n_target_other; i++) { |