]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Come up with OPTION_SET_P macro.
authorMartin Liska <mliska@suse.cz>
Fri, 8 Oct 2021 07:48:58 +0000 (09:48 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 8 Oct 2021 11:27:49 +0000 (13:27 +0200)
gcc/ada/ChangeLog:

* gcc-interface/misc.c (gnat_post_options): Use new macro
OPTION_SET_P.
(gnat_init_gcc_eh): Likewise.
(gnat_init_gcc_fp): Likewise.

gcc/c-family/ChangeLog:

* c-opts.c (c_common_post_options): Use new macro
OPTION_SET_P.

gcc/ChangeLog:

* config/alpha/alpha.c (alpha_option_override): Use new macro
OPTION_SET_P.
* config/arc/arc.c (arc_override_options): Likewise.
* config/arm/arm.c (arm_option_override): Likewise.
* config/bfin/bfin.c (bfin_load_pic_reg): Likewise.
* config/c6x/c6x.c (c6x_option_override): Likewise.
* config/csky/csky.c: Likewise.
* config/darwin.c (darwin_override_options): Likewise.
* config/frv/frv.c (frv_option_override): Likewise.
* config/i386/djgpp.h: Likewise.
* config/i386/i386.c (ix86_stack_protect_guard): Likewise.
(ix86_max_noce_ifcvt_seq_cost): Likewise.
* config/ia64/ia64.c (ia64_option_override): Likewise.
(ia64_override_options_after_change): Likewise.
* config/m32c/m32c.c (m32c_option_override): Likewise.
* config/m32r/m32r.c (m32r_init): Likewise.
* config/m68k/m68k.c (m68k_option_override): Likewise.
* config/microblaze/microblaze.c (microblaze_option_override): Likewise.
* config/mips/mips.c (mips_option_override): Likewise.
* config/nios2/nios2.c (nios2_option_override): Likewise.
* config/nvptx/nvptx.c (nvptx_option_override): Likewise.
* config/pa/pa.c (pa_option_override): Likewise.
* config/riscv/riscv.c (riscv_option_override): Likewise.
* config/rs6000/aix71.h: Likewise.
* config/rs6000/aix72.h: Likewise.
* config/rs6000/aix73.h: Likewise.
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Likewise.
(rs6000_override_options_after_change): Likewise.
(rs6000_linux64_override_options): Likewise.
(glibc_supports_ieee_128bit): Likewise.
(rs6000_option_override_internal): Likewise.
(rs6000_file_start): Likewise.
(rs6000_darwin_file_start): Likewise.
* config/rs6000/rtems.h: Likewise.
* config/rs6000/sysv4.h: Likewise.
* config/rs6000/vxworks.h (SUB3TARGET_OVERRIDE_OPTIONS): Likewise.
* config/s390/s390.c (s390_option_override): Likewise.
* config/sh/linux.h: Likewise.
* config/sh/netbsd-elf.h (while): Likewise.
* config/sh/sh.c (sh_option_override): Likewise.
* config/sol2.c (solaris_override_options): Likewise.
* config/sparc/sparc.c (sparc_option_override): Likewise.
* config/tilegx/tilegx.c (tilegx_option_override): Likewise.
* config/visium/visium.c (visium_option_override): Likewise.
* config/vxworks.c (vxworks_override_options): Likewise.
* lto-opts.c (lto_write_options): Likewise.
* omp-expand.c (expand_omp_simd): Likewise.
* omp-general.c (omp_max_vf): Likewise.
* omp-offload.c (oacc_xform_loop): Likewise.
* opts.h (OPTION_SET_P): Likewise.
* targhooks.c (default_max_noce_ifcvt_seq_cost): Likewise.
* toplev.c (process_options): Likewise.
* tree-predcom.c: Likewise.
* tree-sra.c (analyze_all_variable_accesses): Likewise.

gcc/cp/ChangeLog:

* constexpr.c (maybe_warn_about_constant_value): Use new macro
OPTION_SET_P.
* decl.c (redeclaration_error_message): Likewise.
(cxx_init_decl_processing): Likewise.

gcc/d/ChangeLog:

* d-lang.cc (d_post_options): Use new macro
OPTION_SET_P.

gcc/fortran/ChangeLog:

* options.c (gfc_post_options): Use new macro
OPTION_SET_P.

gcc/objc/ChangeLog:

* objc-next-runtime-abi-01.c: Use new macro
OPTION_SET_P.
* objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Likewise.

53 files changed:
gcc/ada/gcc-interface/misc.c
gcc/c-family/c-opts.c
gcc/config/alpha/alpha.c
gcc/config/arc/arc.c
gcc/config/arm/arm.c
gcc/config/bfin/bfin.c
gcc/config/c6x/c6x.c
gcc/config/csky/csky.c
gcc/config/darwin.c
gcc/config/frv/frv.c
gcc/config/i386/djgpp.h
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/m32c/m32c.c
gcc/config/m32r/m32r.c
gcc/config/m68k/m68k.c
gcc/config/microblaze/microblaze.c
gcc/config/mips/mips.c
gcc/config/nios2/nios2.c
gcc/config/nvptx/nvptx.c
gcc/config/pa/pa.c
gcc/config/riscv/riscv.c
gcc/config/rs6000/aix71.h
gcc/config/rs6000/aix72.h
gcc/config/rs6000/aix73.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rtems.h
gcc/config/rs6000/sysv4.h
gcc/config/rs6000/vxworks.h
gcc/config/s390/s390.c
gcc/config/sh/linux.h
gcc/config/sh/netbsd-elf.h
gcc/config/sh/sh.c
gcc/config/sol2.c
gcc/config/sparc/sparc.c
gcc/config/tilegx/tilegx.c
gcc/config/visium/visium.c
gcc/config/vxworks.c
gcc/cp/constexpr.c
gcc/cp/decl.c
gcc/d/d-lang.cc
gcc/fortran/options.c
gcc/lto-opts.c
gcc/objc/objc-next-runtime-abi-01.c
gcc/objc/objc-next-runtime-abi-02.c
gcc/omp-expand.c
gcc/omp-general.c
gcc/omp-offload.c
gcc/opts.h
gcc/targhooks.c
gcc/toplev.c
gcc/tree-predcom.c
gcc/tree-sra.c

index 96199bd4b63e3dced59e01ebc6dfb5507ac3ddfa..d0735708670a55ec5bc4e976bbf432c69b29d73b 100644 (file)
@@ -271,7 +271,7 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
   warn_stringop_overflow = 0;
 
   /* No caret by default for Ada.  */
-  if (!global_options_set.x_flag_diagnostics_show_caret)
+  if (!OPTION_SET_P (flag_diagnostics_show_caret))
     global_dc->show_caret = false;
 
   /* Warn only if STABS is not the default: we don't want to emit a warning if
@@ -422,12 +422,12 @@ gnat_init_gcc_eh (void)
   flag_delete_dead_exceptions = 1;
   if (Suppress_Checks)
     {
-      if (!global_options_set.x_flag_non_call_exceptions)
+      if (!OPTION_SET_P (flag_non_call_exceptions))
        flag_non_call_exceptions = Machine_Overflows_On_Target && GNAT_Mode;
     }
   else
     {
-      if (!global_options_set.x_flag_non_call_exceptions)
+      if (!OPTION_SET_P (flag_non_call_exceptions))
         flag_non_call_exceptions = 1;
       flag_aggressive_loop_optimizations = 0;
       warn_aggressive_loop_optimizations = 0;
@@ -445,14 +445,14 @@ gnat_init_gcc_fp (void)
      S'Signed_Zeros is true, but don't override the user if not.  */
   if (Signed_Zeros_On_Target)
     flag_signed_zeros = 1;
-  else if (!global_options_set.x_flag_signed_zeros)
+  else if (!OPTION_SET_P (flag_signed_zeros))
     flag_signed_zeros = 0;
 
   /* Assume that FP operations can trap if S'Machine_Overflow is true,
      but don't override the user if not.  */
   if (Machine_Overflows_On_Target)
     flag_trapping_math = 1;
-  else if (!global_options_set.x_flag_trapping_math)
+  else if (!OPTION_SET_P (flag_trapping_math))
     flag_trapping_math = 0;
 }
 
index 3eaab5e15308f4602ff7b8cf16edf5a74c3f5f4f..0225cba7a4bfbc0b67dc87738a8cdadeff0f8855 100644 (file)
@@ -831,7 +831,7 @@ c_common_post_options (const char **pfilename)
      for -ffp-contract=off).  */
   if (flag_iso
       && !c_dialect_cxx ()
-      && (global_options_set.x_flag_fp_contract_mode
+      && (OPTION_SET_P (flag_fp_contract_mode)
          == (enum fp_contract_mode) 0)
       && flag_unsafe_math_optimizations == 0)
     flag_fp_contract_mode = FP_CONTRACT_OFF;
@@ -842,7 +842,7 @@ c_common_post_options (const char **pfilename)
      the set specified in ISO C99/C11.  */
   if (!flag_iso
       && !c_dialect_cxx ()
-      && (global_options_set.x_flag_permitted_flt_eval_methods
+      && (OPTION_SET_P (flag_permitted_flt_eval_methods)
          == PERMITTED_FLT_EVAL_METHODS_DEFAULT))
     flag_permitted_flt_eval_methods = PERMITTED_FLT_EVAL_METHODS_TS_18661;
   else
@@ -1040,7 +1040,7 @@ c_common_post_options (const char **pfilename)
 
       /* Unless -f{,no-}ext-numeric-literals has been used explicitly,
         for -std=c++{11,14,17,20,23} default to -fno-ext-numeric-literals.  */
-      if (flag_iso && !global_options_set.x_flag_ext_numeric_literals)
+      if (flag_iso && !OPTION_SET_P (flag_ext_numeric_literals))
        cpp_opts->ext_numeric_literals = 0;
     }
   else if (warn_narrowing == -1)
index c702e683c319e1fc77c6a4ac043305096c08c5ab..fced7ceefe23ceb37deda1e1d5162be5ac29475c 100644 (file)
@@ -575,7 +575,7 @@ alpha_option_override (void)
   }
 
   /* Default the definition of "small data" to 8 bytes.  */
-  if (!global_options_set.x_g_switch_value)
+  if (!OPTION_SET_P (g_switch_value))
     g_switch_value = 8;
 
   /* Infer TARGET_SMALL_DATA from -fpic/-fPIC.  */
index 92797db96b79b01315ff2f8e8699ea1f5ff03659..8244f37bf03dce3b70fe513a2a6e194d7d8304ff 100644 (file)
@@ -1441,7 +1441,7 @@ arc_override_options (void)
     target_flags |= MASK_NO_SDATA_SET;
 
   /* Check for small data option */
-  if (!global_options_set.x_g_switch_value && !TARGET_NO_SDATA_SET)
+  if (!OPTION_SET_P (g_switch_value) && !TARGET_NO_SDATA_SET)
     g_switch_value = TARGET_LL64 ? 8 : 4;
 
   /* A7 has an issue with delay slots.  */
@@ -1455,7 +1455,7 @@ arc_override_options (void)
     target_flags &= ~MASK_MILLICODE_THUNK_SET;
 
   /* Set unaligned to all HS cpus.  */
-  if (!global_options_set.x_unaligned_access && TARGET_HS)
+  if (!OPTION_SET_P (unaligned_access) && TARGET_HS)
     unaligned_access = 1;
 
   /* These need to be done at start up.  It's convenient to do them here.  */
index 6c6e77fab666f4aeff023b1f949e3ca0a3545658..471128fc86a8454782584914163b89624ad46cf2 100644 (file)
@@ -71,6 +71,7 @@
 #include "gimple.h"
 #include "selftest.h"
 #include "tree-vectorizer.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -3468,7 +3469,7 @@ arm_option_override (void)
 
   arm_active_target.isa = sbitmap_alloc (isa_num_bits);
 
-  if (!global_options_set.x_arm_fpu_index)
+  if (!OPTION_SET_P (arm_fpu_index))
     {
       bool ok;
       int fpu_index;
@@ -3528,7 +3529,7 @@ arm_option_override (void)
     flag_schedule_insns = flag_schedule_insns_after_reload = 0;
 
   /* Override the default structure alignment for AAPCS ABI.  */
-  if (!global_options_set.x_arm_structure_size_boundary)
+  if (!OPTION_SET_P (arm_structure_size_boundary))
     {
       if (TARGET_AAPCS_BASED)
        arm_structure_size_boundary = 8;
@@ -3553,12 +3554,12 @@ arm_option_override (void)
 
   if (TARGET_VXWORKS_RTP)
     {
-      if (!global_options_set.x_arm_pic_data_is_text_relative)
+      if (!OPTION_SET_P (arm_pic_data_is_text_relative))
        arm_pic_data_is_text_relative = 0;
     }
   else if (flag_pic
           && !arm_pic_data_is_text_relative
-          && !(global_options_set.x_target_flags & MASK_SINGLE_PIC_BASE))
+          && !(OPTION_SET_P (target_flags) & MASK_SINGLE_PIC_BASE))
     /* When text & data segments don't have a fixed displacement, the
        intended use is with a single, read only, pic base register.
        Unless the user explicitly requested not to do that, set
index 698dd879934b935fca0246ed1e61fda8ecce4c90..3287e495dd37a8e9c1760e60f621286b73078518 100644 (file)
@@ -53,6 +53,7 @@
 #include "hw-doloop.h"
 #include "dumpfile.h"
 #include "builtins.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -1046,7 +1047,7 @@ bfin_load_pic_reg (rtx dest)
   if (local_info_node && local_info_node->local)
     return pic_offset_table_rtx;
       
-  if (global_options_set.x_bfin_library_id)
+  if (OPTION_SET_P (bfin_library_id))
     addr = plus_constant (Pmode, pic_offset_table_rtx,
                           -4 - bfin_library_id * 4);
   else
@@ -2369,7 +2370,7 @@ bfin_option_override (void)
 #endif
 
   /* Library identification */
-  if (global_options_set.x_bfin_library_id && ! TARGET_ID_SHARED_LIBRARY)
+  if (OPTION_SET_P (bfin_library_id) && ! TARGET_ID_SHARED_LIBRARY)
     error ("%<-mshared-library-id=%> specified without "
           "%<-mid-shared-library%>");
 
index ce4949516cfab28cadb058af2f137b2fdea2bc5c..4854371ee130a68b121c2ace4293cf03a3e38717 100644 (file)
@@ -60,6 +60,7 @@
 #include "dumpfile.h"
 #include "builtins.h"
 #include "flags.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -221,7 +222,7 @@ c6x_option_override (void)
 {
   unsigned i;
 
-  if (global_options_set.x_c6x_arch_option)
+  if (OPTION_SET_P (c6x_arch_option))
     {
       c6x_arch = all_isas[c6x_arch_option].type;
       c6x_insn_mask &= ~C6X_INSNS_ALL_CPU_BITS;
index e55821fe2ee3e3ccf262d604ad96963d7b9ded82..487288b32920f80e70955ebb156a5149cc5872a9 100644 (file)
@@ -67,6 +67,7 @@
 #include "pass_manager.h"
 #include "tree-pass.h"
 #include "context.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -2757,15 +2758,15 @@ csky_option_override (void)
 #ifdef ENABLE_TPF_DEBUG
   /* Don't emit DWARF4 unless specifically selected.  The TPF
      debuggers do not yet support DWARF 3/4.  */
-  if (!global_options_set.x_dwarf_strict)
+  if (!OPTION_SET_P (dwarf_strict))
     dwarf_strict = 1;
-  if (!global_options_set.x_dwarf_version)
+  if (!OPTION_SET_P (dwarf_version))
     dwarf_version = 3;
 #endif
 
   /* Don't run the scheduler before reload by default,
      since it tends to increase register pressure.  */
-  if (!global_options_set.x_flag_schedule_insns)
+  if (!OPTION_SET_P (flag_schedule_insns))
     flag_schedule_insns = 0;
 
   csky_add_gc_roots ();
index 781742fe46f8d5365c39f92929c4f43f8b53c14e..28dc55d9b1c8b126ad886020a24176809a6b1a4f 100644 (file)
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "intl.h"
 #include "optabs.h"
 #include "flags.h"
+#include "opts.h"
 
 /* Fix and Continue.
 
@@ -3282,7 +3283,7 @@ darwin_override_options (void)
     }
 
   /* Unless set, force ABI=2 for NeXT and m64, 0 otherwise.  */
-  if (!global_options_set.x_flag_objc_abi)
+  if (!OPTION_SET_P (flag_objc_abi))
     global_options.x_flag_objc_abi
        = (!flag_next_runtime)
                ? 0
@@ -3290,7 +3291,7 @@ darwin_override_options (void)
                                : (generating_for_darwin_version >= 9) ? 1
                                                                       : 0);
 
-  if (global_options_set.x_flag_objc_abi && flag_next_runtime)
+  if (OPTION_SET_P (flag_objc_abi) && flag_next_runtime)
     {
       if (TARGET_64BIT && global_options.x_flag_objc_abi != 2)
        /* The Objective-C family ABI 2 is the only valid version NeXT/m64.  */
@@ -3307,23 +3308,23 @@ darwin_override_options (void)
 
   /* Don't emit DWARF3/4 unless specifically selected.  This is a
      workaround for tool bugs.  */
-  if (!global_options_set.x_dwarf_strict)
+  if (!OPTION_SET_P (dwarf_strict))
     dwarf_strict = 1;
-  if (!global_options_set.x_dwarf_version)
+  if (!OPTION_SET_P (dwarf_version))
     dwarf_version = 2;
 
-  if (global_options_set.x_dwarf_split_debug_info)
+  if (OPTION_SET_P (dwarf_split_debug_info))
     {
       inform (input_location,
              "%<-gsplit-dwarf%> is not supported on this platform, ignored");
       dwarf_split_debug_info = 0;
-      global_options_set.x_dwarf_split_debug_info = 0;
+      OPTION_SET_P (dwarf_split_debug_info) = 0;
     }
 
   /* Do not allow unwind tables to be generated by default for m32.
      fnon-call-exceptions will override this, regardless of what we do.  */
   if (generating_for_darwin_version < 10
-      && !global_options_set.x_flag_asynchronous_unwind_tables
+      && !OPTION_SET_P (flag_asynchronous_unwind_tables)
       && !TARGET_64BIT)
     global_options.x_flag_asynchronous_unwind_tables = 0;
 
@@ -3334,15 +3335,15 @@ darwin_override_options (void)
       will be generated".  If the User specifically sets flags... we assume
       (s)he knows why...  */
    if (generating_for_darwin_version < 9
-       && global_options_set.x_flag_reorder_blocks_and_partition
+       && OPTION_SET_P (flag_reorder_blocks_and_partition)
        && ((global_options.x_flag_exceptions           /* User, c++, java */
-           && !global_options_set.x_flag_exceptions)   /* User specified... */
+           && !OPTION_SET_P (flag_exceptions))         /* User specified... */
           || (global_options.x_flag_unwind_tables
-              && !global_options_set.x_flag_unwind_tables)
+              && !OPTION_SET_P (flag_unwind_tables))
           || (global_options.x_flag_non_call_exceptions
-              && !global_options_set.x_flag_non_call_exceptions)
+              && !OPTION_SET_P (flag_non_call_exceptions))
           || (global_options.x_flag_asynchronous_unwind_tables
-              && !global_options_set.x_flag_asynchronous_unwind_tables)))
+              && !OPTION_SET_P (flag_asynchronous_unwind_tables))))
     {
       inform (input_location,
              "%<-freorder-blocks-and-partition%> does not work with "
@@ -3353,12 +3354,12 @@ darwin_override_options (void)
 
     /* FIXME: flag_objc_sjlj_exceptions is no longer needed since there is only
        one valid choice of exception scheme for each runtime.  */
-    if (!global_options_set.x_flag_objc_sjlj_exceptions)
+    if (!OPTION_SET_P (flag_objc_sjlj_exceptions))
       global_options.x_flag_objc_sjlj_exceptions =
                                flag_next_runtime && !TARGET_64BIT;
 
     /* FIXME: and this could be eliminated then too.  */
-    if (!global_options_set.x_flag_exceptions
+    if (!OPTION_SET_P (flag_exceptions)
        && flag_objc_exceptions
        && TARGET_64BIT)
       flag_exceptions = 1;
@@ -3414,7 +3415,7 @@ darwin_override_options (void)
      Linkers that don't need stubs, don't need the EH symbol markers either.
   */
 
-  if (!global_options_set.x_darwin_symbol_stubs)
+  if (!OPTION_SET_P (darwin_symbol_stubs))
     {
       if (darwin_target_linker)
        {
index a7f7f086d170cf5da80bcc9547725129030304d7..02cd07c09bcfdc25befb9e729651c1cc8732700a 100644 (file)
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ifcvt.h"
 #include "rtl-iter.h"
 #include "calls.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -664,7 +665,7 @@ frv_option_override (void)
       if (!flag_pic)           /* -fPIC */
        flag_pic = 2;
 
-      if (!global_options_set.x_g_switch_value)        /* -G0 */
+      if (!OPTION_SET_P (g_switch_value))      /* -G0 */
        {
          g_switch_value = 0;
        }
@@ -757,7 +758,7 @@ frv_option_override (void)
     }
 
   /* Check for small data option */
-  if (!global_options_set.x_g_switch_value && !TARGET_LIBPIC)
+  if (!OPTION_SET_P (g_switch_value) && !TARGET_LIBPIC)
     g_switch_value = SDATA_DEFAULT_SIZE;
 
   /* There is no single unaligned SI op for PIC code.  Sometimes we
index 9decff7e56c520b2244312cb8256711b2edec85f..f1afad91c9943db3d48e218ed31fd29c4b12205c 100644 (file)
@@ -147,7 +147,7 @@ along with GCC; see the file COPYING3.  If not see
                                                                         \
         /* Don't emit DWARF3/4 unless specifically selected. */         \
         /* DWARF3/4 currently does not work for DJGPP.  */              \
-        if (!global_options_set.x_dwarf_version)                        \
+        if (!OPTION_SET_P (dwarf_version))                        \
             dwarf_version = 2;                                          \
                                                                         \
         }                                                               \
index 7bc1b0507569c06edd187a56ef40373a32390a75..fb656094e9ef9bd42912201c30c27431624cb275 100644 (file)
@@ -22280,7 +22280,7 @@ ix86_stack_protect_guard (void)
       tree type = build_qualified_type (type_node, qual);
       tree t;
 
-      if (global_options_set.x_ix86_stack_protector_guard_symbol_str)
+      if (OPTION_SET_P (ix86_stack_protector_guard_symbol_str))
        {
          t = ix86_tls_stack_chk_guard_decl;
 
@@ -22794,12 +22794,12 @@ ix86_max_noce_ifcvt_seq_cost (edge e)
   bool predictable_p = predictable_edge_p (e);
   if (predictable_p)
     {
-      if (global_options_set.x_param_max_rtl_if_conversion_predictable_cost)
+      if (OPTION_SET_P (param_max_rtl_if_conversion_predictable_cost))
        return param_max_rtl_if_conversion_predictable_cost;
     }
   else
     {
-      if (global_options_set.x_param_max_rtl_if_conversion_unpredictable_cost)
+      if (OPTION_SET_P (param_max_rtl_if_conversion_unpredictable_cost))
        return param_max_rtl_if_conversion_unpredictable_cost;
     }
 
index 632b9df1761635aa0d3e1a31c3c1fbdbbbfd706e..39a0e0791b791665ae1573ff2f24677bd4a3c871 100644 (file)
@@ -6098,7 +6098,7 @@ ia64_option_override (void)
     flag_ira_loop_pressure = 1;
 
 
-  ia64_section_threshold = (global_options_set.x_g_switch_value
+  ia64_section_threshold = (OPTION_SET_P (g_switch_value)
                            ? g_switch_value
                            : IA64_DEFAULT_GVALUE);
 
@@ -6120,8 +6120,8 @@ static void
 ia64_override_options_after_change (void)
 {
   if (optimize >= 3
-      && !global_options_set.x_flag_selective_scheduling
-      && !global_options_set.x_flag_selective_scheduling2)
+      && !OPTION_SET_P (flag_selective_scheduling)
+      && !OPTION_SET_P (flag_selective_scheduling2))
     {
       flag_selective_scheduling2 = 1;
       flag_sel_sched_pipelining = 1;
index d22bdd79c71d44fc6ec9cedb703eeafa6f029813..f99e2b0a4859a80006963177ab16e02c404e8e27 100644 (file)
@@ -48,6 +48,7 @@
 #include "expr.h"
 #include "tm-constrs.h"
 #include "builtins.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -412,7 +413,7 @@ static void
 m32c_option_override (void)
 {
   /* We limit memregs to 0..16, and provide a default.  */
-  if (global_options_set.x_target_memregs)
+  if (OPTION_SET_P (target_memregs))
     {
       if (target_memregs < 0 || target_memregs > 16)
        error ("invalid target memregs value %<%d%>", target_memregs);
index 1aaba94bb5c53a3bdddb72f632d2c0175f2f1a2e..d644f6bda73e4d0c7f1693a6352d1710e331607e 100644 (file)
@@ -45,6 +45,7 @@
 #include "expr.h"
 #include "tm-constrs.h"
 #include "builtins.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -244,7 +245,7 @@ m32r_init (void)
   m32r_punct_chars['@'] = 1; /* ??? no longer used */
 
   /* Provide default value if not specified.  */
-  if (!global_options_set.x_g_switch_value)
+  if (!OPTION_SET_P (g_switch_value))
     g_switch_value = SDATA_DEFAULT_SIZE;
 }
 
index 0248eb719a886398ccad35a3fad44fdfef7a2cad..d1105e7a1377b7e319fcdd9454c839cb695d06aa 100644 (file)
@@ -500,13 +500,13 @@ m68k_option_override (void)
   const struct m68k_target_selection *entry;
   unsigned long target_mask;
 
-  if (global_options_set.x_m68k_arch_option)
+  if (OPTION_SET_P (m68k_arch_option))
     m68k_arch_entry = &all_isas[m68k_arch_option];
 
-  if (global_options_set.x_m68k_cpu_option)
+  if (OPTION_SET_P (m68k_cpu_option))
     m68k_cpu_entry = &all_devices[(int) m68k_cpu_option];
 
-  if (global_options_set.x_m68k_tune_option)
+  if (OPTION_SET_P (m68k_tune_option))
     m68k_tune_entry = &all_microarchs[(int) m68k_tune_option];
 
   /* User can choose:
index 6e8f367c80ac83c33a90793a803dae1bf5599f3c..4813f7a7921414eb7304e36b0b4c64fafddbd431 100644 (file)
@@ -51,6 +51,7 @@
 #include "cfgloop.h"
 #include "insn-addr.h"
 #include "cfgrtl.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -1741,7 +1742,7 @@ microblaze_option_override (void)
   machine_mode mode;
   int ver;
 
-  microblaze_section_threshold = (global_options_set.x_g_switch_value
+  microblaze_section_threshold = (OPTION_SET_P (g_switch_value)
                                  ? g_switch_value
                                  : MICROBLAZE_DEFAULT_GVALUE);
 
index ade5d7041f0d810ec3523d58cc2c60d0c9930a07..807bf1a78d4ff84e4daac3ab566d5863a6b271ce 100644 (file)
@@ -66,6 +66,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "builtins.h"
 #include "rtl-iter.h"
 #include "flags.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -19883,7 +19884,7 @@ mips_option_override (void)
 {
   int i, start, regno, mode;
 
-  if (global_options_set.x_mips_isa_option)
+  if (OPTION_SET_P (mips_isa_option))
     mips_isa_option_info = &mips_cpu_info_table[mips_isa_option];
 
 #ifdef SUBTARGET_OVERRIDE_OPTIONS
@@ -19915,7 +19916,7 @@ mips_option_override (void)
     TARGET_INTERLINK_COMPRESSED = 1;
 
   /* Set the small data limit.  */
-  mips_small_data_threshold = (global_options_set.x_g_switch_value
+  mips_small_data_threshold = (OPTION_SET_P (g_switch_value)
                               ? g_switch_value
                               : MIPS_DEFAULT_GVALUE);
 
@@ -19923,7 +19924,7 @@ mips_option_override (void)
      Similar code was added to GAS 2.14 (see tc-mips.c:md_after_parse_args()).
      The GAS and GCC code should be kept in sync as much as possible.  */
 
-  if (global_options_set.x_mips_arch_option)
+  if (OPTION_SET_P (mips_arch_option))
     mips_set_architecture (mips_cpu_info_from_opt (mips_arch_option));
 
   if (mips_isa_option_info != 0)
@@ -19945,7 +19946,7 @@ mips_option_override (void)
           mips_arch_info->name);
 
   /* Optimize for mips_arch, unless -mtune selects a different processor.  */
-  if (global_options_set.x_mips_tune_option)
+  if (OPTION_SET_P (mips_tune_option))
     mips_set_tune (mips_cpu_info_from_opt (mips_tune_option));
 
   if (mips_tune_info == 0)
index 26d43331f3327f40c43def845320507b7049965d..7a613e4c13e5444fc4bc2d5883835aa9723e48c3 100644 (file)
@@ -52,6 +52,7 @@
 #include "builtins.h"
 #include "tree-pass.h"
 #include "xregex.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -1363,7 +1364,7 @@ nios2_option_override (void)
   init_machine_status = &nios2_init_machine_status;
 
   nios2_section_threshold
-    = (global_options_set.x_g_switch_value
+    = (OPTION_SET_P (g_switch_value)
        ? g_switch_value : NIOS2_DEFAULT_GVALUE);
 
   if (nios2_gpopt_option == gpopt_unspecified)
index 4e4909e8c5fbe60545b24a0b793e34e72c92cd6f..951252e598a2bb5733f45dd7b75a9857ee250d5b 100644 (file)
@@ -215,7 +215,7 @@ nvptx_option_override (void)
   /* Set toplevel_reorder, unless explicitly disabled.  We need
      reordering so that we emit necessary assembler decls of
      undeclared variables. */
-  if (!global_options_set.x_flag_toplevel_reorder)
+  if (!OPTION_SET_P (flag_toplevel_reorder))
     flag_toplevel_reorder = 1;
 
   debug_nonbind_markers_p = 0;
@@ -223,7 +223,7 @@ nvptx_option_override (void)
   /* Set flag_no_common, unless explicitly disabled.  We fake common
      using .weak, and that's not entirely accurate, so avoid it
      unless forced.  */
-  if (!global_options_set.x_flag_no_common)
+  if (!OPTION_SET_P (flag_no_common))
     flag_no_common = 1;
 
   /* The patch area requires nops, which we don't have.  */
index 69ba5bd035cbbdad2db99e94daff393ccf218dd4..d13021ad94aa862f03f636237aef806d9f03b40e 100644 (file)
@@ -545,9 +545,9 @@ pa_option_override (void)
     {
       /* DWARF5 is not supported by gdb.  Don't emit DWARF5 unless
         specifically selected.  */
-      if (!global_options_set.x_dwarf_strict)
+      if (!OPTION_SET_P (dwarf_strict))
        dwarf_strict = 1;
-      if (!global_options_set.x_dwarf_version)
+      if (!OPTION_SET_P (dwarf_version))
        dwarf_version = 4;
     }
 
index 576960bb37cb5ef406b7c07d6f7ffca5248e2ee5..126572c624371e5896bb8c323c48dff0e417f53f 100644 (file)
@@ -56,6 +56,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "builtins.h"
 #include "predict.h"
 #include "tree-pass.h"
+#include "opts.h"
 
 /* True if X is an UNSPEC wrapper around a SYMBOL_REF or LABEL_REF.  */
 #define UNSPEC_ADDRESS_P(X)                                    \
@@ -4839,7 +4840,7 @@ riscv_option_override (void)
 #endif
 
   if (riscv_stack_protector_guard == SSP_GLOBAL
-      && global_options_set.x_riscv_stack_protector_guard_offset_str)
+      && OPTION_SET_P (riscv_stack_protector_guard_offset_str))
     {
       error ("incompatible options %<-mstack-protector-guard=global%> and "
             "%<-mstack-protector-guard-offset=%s%>",
@@ -4847,15 +4848,15 @@ riscv_option_override (void)
     }
 
   if (riscv_stack_protector_guard == SSP_TLS
-      && !(global_options_set.x_riscv_stack_protector_guard_offset_str
-          && global_options_set.x_riscv_stack_protector_guard_reg_str))
+      && !(OPTION_SET_P (riscv_stack_protector_guard_offset_str)
+          && OPTION_SET_P (riscv_stack_protector_guard_reg_str)))
     {
       error ("both %<-mstack-protector-guard-offset%> and "
             "%<-mstack-protector-guard-reg%> must be used "
             "with %<-mstack-protector-guard=sysreg%>");
     }
 
-  if (global_options_set.x_riscv_stack_protector_guard_reg_str)
+  if (OPTION_SET_P (riscv_stack_protector_guard_reg_str))
     {
       const char *str = riscv_stack_protector_guard_reg_str;
       int reg = decode_reg_name (str);
@@ -4867,7 +4868,7 @@ riscv_option_override (void)
       riscv_stack_protector_guard_reg = reg;
     }
 
-  if (global_options_set.x_riscv_stack_protector_guard_offset_str)
+  if (OPTION_SET_P (riscv_stack_protector_guard_offset_str))
     {
       char *end;
       const char *str = riscv_stack_protector_guard_offset_str;
index 1bc1560c4969be35129ed664dd0ce05f83113687..ddd204dd862e5806922bc3852c03c1a22a9cb1f7 100644 (file)
@@ -33,7 +33,7 @@ do {                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
     {                                                                  \
       rs6000_long_double_type_size = 64;                               \
-      if (global_options_set.x_rs6000_long_double_type_size)           \
+      if (OPTION_SET_P (rs6000_long_double_type_size))         \
        warning (0, "soft-float and long-double-128 are incompatible"); \
     }                                                                  \
   if (TARGET_POWERPC64 && ! TARGET_64BIT)                              \
@@ -43,7 +43,7 @@ do {                                                                  \
   if ((rs6000_isa_flags_explicit                                       \
        & OPTION_MASK_MINIMAL_TOC) != 0)                                        \
     {                                                                  \
-      if (global_options_set.x_rs6000_current_cmodel                   \
+      if (OPTION_SET_P (rs6000_current_cmodel)                 \
          && rs6000_current_cmodel != CMODEL_SMALL)                     \
        error ("%<-mcmodel%> incompatible with other toc options");     \
       SET_CMODEL (CMODEL_SMALL);                                       \
@@ -63,7 +63,7 @@ do {                                                                  \
       /* aix/ppc doesn't support -mvsx and -maltivec with Go */                \
       rs6000_isa_flags &= ~(OPTION_MASK_VSX | OPTION_MASK_ALTIVEC);    \
     }                                                                  \
-  if (!global_options_set.x_dwarf_version)                             \
+  if (!OPTION_SET_P (dwarf_version))                           \
     /* AIX only supports DWARF 4.  */                                  \
     dwarf_version = 4;                                                 \
 } while (0)
index cca64f14f3a6d991229ece6002ff2ee3ecf00a24..f0e375cb984d7cb45cf99eaa90e8649e619f8886 100644 (file)
@@ -33,7 +33,7 @@ do {                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
     {                                                                  \
       rs6000_long_double_type_size = 64;                               \
-      if (global_options_set.x_rs6000_long_double_type_size)           \
+      if (OPTION_SET_P (rs6000_long_double_type_size))         \
        warning (0, "soft-float and long-double-128 are incompatible"); \
     }                                                                  \
   if (TARGET_POWERPC64 && ! TARGET_64BIT)                              \
@@ -43,7 +43,7 @@ do {                                                                  \
   if ((rs6000_isa_flags_explicit                                       \
        & OPTION_MASK_MINIMAL_TOC) != 0)                                        \
     {                                                                  \
-      if (global_options_set.x_rs6000_current_cmodel                   \
+      if (OPTION_SET_P (rs6000_current_cmodel)                 \
          && rs6000_current_cmodel != CMODEL_SMALL)                     \
        error ("%<-mcmodel%> incompatible with other toc options");     \
       SET_CMODEL (CMODEL_SMALL);                                       \
@@ -63,7 +63,7 @@ do {                                                                  \
       /* aix/ppc doesn't support -mvsx and -maltivec with Go */                \
       rs6000_isa_flags &= ~(OPTION_MASK_VSX | OPTION_MASK_ALTIVEC);    \
     }                                                                  \
-  if (!global_options_set.x_dwarf_version)                             \
+  if (!OPTION_SET_P (dwarf_version))                           \
     /* AIX only supports DWARF 4.  */                                  \
     dwarf_version = 4;                                                 \
 } while (0)
index f0ca1a55e5d84a9dc1519dad5ef0b3f53f3837f1..2c92cc3db0dd6dc267e171374b62970706fcb457 100644 (file)
@@ -33,7 +33,7 @@ do {                                                                  \
   if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128)                     \
     {                                                                  \
       rs6000_long_double_type_size = 64;                               \
-      if (global_options_set.x_rs6000_long_double_type_size)           \
+      if (OPTION_SET_P (rs6000_long_double_type_size))         \
        warning (0, "soft-float and long-double-128 are incompatible"); \
     }                                                                  \
   if (TARGET_POWERPC64 && ! TARGET_64BIT)                              \
@@ -43,7 +43,7 @@ do {                                                                  \
   if ((rs6000_isa_flags_explicit                                       \
        & OPTION_MASK_MINIMAL_TOC) != 0)                                        \
     {                                                                  \
-      if (global_options_set.x_rs6000_current_cmodel                   \
+      if (OPTION_SET_P (rs6000_current_cmodel)                 \
          && rs6000_current_cmodel != CMODEL_SMALL)                     \
        error ("%<-mcmodel%> incompatible with other toc options");     \
       SET_CMODEL (CMODEL_SMALL);                                       \
@@ -63,7 +63,7 @@ do {                                                                  \
       /* aix/ppc doesn't support -mvsx and -maltivec with Go */                \
       rs6000_isa_flags &= ~(OPTION_MASK_VSX | OPTION_MASK_ALTIVEC);    \
     }                                                                  \
-  if (!global_options_set.x_dwarf_version)                             \
+  if (!OPTION_SET_P (dwarf_version))                           \
     /* AIX only supports DWARF 4.  */                                  \
     dwarf_version = 4;                                                 \
 } while (0)
index ad860728169d76fd4f63f7f44352606982643120..acba4d9f26c823d6241975883b1321fe01f2970e 100644 (file)
@@ -3392,7 +3392,7 @@ darwin_rs6000_override_options (void)
       && !flag_apple_kext
       && strverscmp (darwin_macosx_version_min, "10.5") >= 0
       && ! (rs6000_isa_flags_explicit & OPTION_MASK_ALTIVEC)
-      && ! global_options_set.x_rs6000_cpu_index)
+      && ! OPTION_SET_P (rs6000_cpu_index))
     {
       rs6000_isa_flags |= OPTION_MASK_ALTIVEC;
     }
@@ -3471,18 +3471,18 @@ rs6000_override_options_after_change (void)
 {
   /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
      turns -frename-registers on.  */
-  if ((global_options_set.x_flag_unroll_loops && flag_unroll_loops)
-       || (global_options_set.x_flag_unroll_all_loops
+  if ((OPTION_SET_P (flag_unroll_loops) && flag_unroll_loops)
+       || (OPTION_SET_P (flag_unroll_all_loops)
           && flag_unroll_all_loops))
     {
-      if (!global_options_set.x_unroll_only_small_loops)
+      if (!OPTION_SET_P (unroll_only_small_loops))
        unroll_only_small_loops = 0;
-      if (!global_options_set.x_flag_rename_registers)
+      if (!OPTION_SET_P (flag_rename_registers))
        flag_rename_registers = 1;
-      if (!global_options_set.x_flag_cunroll_grow_size)
+      if (!OPTION_SET_P (flag_cunroll_grow_size))
        flag_cunroll_grow_size = 1;
     }
-  else if (!global_options_set.x_flag_cunroll_grow_size)
+  else if (!OPTION_SET_P (flag_cunroll_grow_size))
     flag_cunroll_grow_size = flag_peel_loops || optimize >= 3;
 }
 
@@ -3490,7 +3490,7 @@ rs6000_override_options_after_change (void)
 static void
 rs6000_linux64_override_options ()
 {
-  if (!global_options_set.x_rs6000_alignment_flags)
+  if (!OPTION_SET_P (rs6000_alignment_flags))
     rs6000_alignment_flags = MASK_ALIGN_NATURAL;
   if (rs6000_isa_flags & OPTION_MASK_64BIT)
     {
@@ -3526,11 +3526,11 @@ rs6000_linux64_override_options ()
          rs6000_isa_flags |= OPTION_MASK_POWERPC64;
          error ("%<-m64%> requires a PowerPC64 cpu");
        }
-      if (!global_options_set.x_rs6000_current_cmodel)
+      if (!OPTION_SET_P (rs6000_current_cmodel))
        SET_CMODEL (CMODEL_MEDIUM);
       if ((rs6000_isa_flags_explicit & OPTION_MASK_MINIMAL_TOC) != 0)
        {
-         if (global_options_set.x_rs6000_current_cmodel
+         if (OPTION_SET_P (rs6000_current_cmodel)
              && rs6000_current_cmodel != CMODEL_SMALL)
            error ("%<-mcmodel incompatible with other toc options%>");
          if (TARGET_MINIMAL_TOC)
@@ -3545,14 +3545,14 @@ rs6000_linux64_override_options ()
        }
       if (rs6000_current_cmodel != CMODEL_SMALL)
        {
-         if (!global_options_set.x_TARGET_NO_FP_IN_TOC)
+         if (!OPTION_SET_P (TARGET_NO_FP_IN_TOC))
            TARGET_NO_FP_IN_TOC = rs6000_current_cmodel == CMODEL_MEDIUM;
-         if (!global_options_set.x_TARGET_NO_SUM_IN_TOC)
+         if (!OPTION_SET_P (TARGET_NO_SUM_IN_TOC))
            TARGET_NO_SUM_IN_TOC = 0;
        }
       if (TARGET_PLTSEQ && DEFAULT_ABI != ABI_ELFv2)
        {
-         if (global_options_set.x_rs6000_pltseq)
+         if (OPTION_SET_P (rs6000_pltseq))
            warning (0, "%qs unsupported for this ABI",
                     "-mpltseq");
          rs6000_pltseq = false;
@@ -3567,7 +3567,7 @@ rs6000_linux64_override_options ()
          profile_kernel = 0;
          error (INVALID_32BIT, "profile-kernel");
        }
-      if (global_options_set.x_rs6000_current_cmodel)
+      if (OPTION_SET_P (rs6000_current_cmodel))
        {
          SET_CMODEL (CMODEL_SMALL);
          error (INVALID_32BIT, "cmodel");
@@ -3627,7 +3627,7 @@ glibc_supports_ieee_128bit (void)
      includes OPTION_TARGET_CPU_DEFAULT, representing the name of the
      default CPU specified at build configure time, TARGET_DEFAULT,
      representing the default set of option flags for the default
-     target, and global_options_set.x_rs6000_isa_flags, representing
+     target, and OPTION_SET_P (rs6000_isa_flags), representing
      which options were requested on the command line.
 
    Upon return from this function:
@@ -3676,13 +3676,13 @@ rs6000_option_override_internal (bool global_init_p)
 
   /* Remember the explicit arguments.  */
   if (global_init_p)
-    rs6000_isa_flags_explicit = global_options_set.x_rs6000_isa_flags;
+    rs6000_isa_flags_explicit = OPTION_SET_P (rs6000_isa_flags);
 
   /* On 64-bit Darwin, power alignment is ABI-incompatible with some C
      library functions, so warn about it. The flag may be useful for
      performance studies from time to time though, so don't disable it
      entirely.  */
-  if (global_options_set.x_rs6000_alignment_flags
+  if (OPTION_SET_P (rs6000_alignment_flags)
       && rs6000_alignment_flags == MASK_ALIGN_POWER
       && DEFAULT_ABI == ABI_DARWIN
       && TARGET_64BIT)
@@ -3695,20 +3695,20 @@ rs6000_option_override_internal (bool global_init_p)
      with enough (>= 32) registers.  It is an expensive optimization.
      So it is on only for peak performance.  */
   if (optimize >= 3 && global_init_p
-      && !global_options_set.x_flag_ira_loop_pressure)
+      && !OPTION_SET_P (flag_ira_loop_pressure))
     flag_ira_loop_pressure = 1;
 
   /* -fsanitize=address needs to turn on -fasynchronous-unwind-tables in order
      for tracebacks to be complete but not if any -fasynchronous-unwind-tables
      options were already specified.  */
   if (flag_sanitize & SANITIZE_USER_ADDRESS
-      && !global_options_set.x_flag_asynchronous_unwind_tables)
+      && !OPTION_SET_P (flag_asynchronous_unwind_tables))
     flag_asynchronous_unwind_tables = 1;
 
   /* -fvariable-expansion-in-unroller is a win for POWER whenever the
      loop unroller is active.  It is only checked during unrolling, so
      we can just set it on by default.  */
-  if (!global_options_set.x_flag_variable_expansion_in_unroller)
+  if (!OPTION_SET_P (flag_variable_expansion_in_unroller))
     flag_variable_expansion_in_unroller = 1;
 
   /* Set the pointer size.  */
@@ -3905,7 +3905,7 @@ rs6000_option_override_internal (bool global_init_p)
 
 #ifdef XCOFF_DEBUGGING_INFO
   /* For AIX default to 64-bit DWARF.  */
-  if (!global_options_set.x_dwarf_offset_size)
+  if (!OPTION_SET_P (dwarf_offset_size))
     dwarf_offset_size = POINTER_SIZE_UNITS;
 #endif
 
@@ -4129,7 +4129,7 @@ rs6000_option_override_internal (bool global_init_p)
   else if (TARGET_ALLOW_MOVMISALIGN && !TARGET_VSX)
     {
       if (TARGET_ALLOW_MOVMISALIGN > 0
-         && global_options_set.x_TARGET_ALLOW_MOVMISALIGN)
+         && OPTION_SET_P (TARGET_ALLOW_MOVMISALIGN))
        error ("%qs requires %qs", "-mallow-movmisalign", "-mvsx");
 
       TARGET_ALLOW_MOVMISALIGN = 0;
@@ -4184,7 +4184,7 @@ rs6000_option_override_internal (bool global_init_p)
                                  : FLOAT_PRECISION_TFmode);
 
   /* Set long double size before the IEEE 128-bit tests.  */
-  if (!global_options_set.x_rs6000_long_double_type_size)
+  if (!OPTION_SET_P (rs6000_long_double_type_size))
     {
       if (main_target_opt != NULL
          && (main_target_opt->x_rs6000_long_double_type_size
@@ -4197,7 +4197,7 @@ rs6000_option_override_internal (bool global_init_p)
     ; /* The option value can be seen when cl_target_option_restore is called.  */
   else if (rs6000_long_double_type_size == 128)
     rs6000_long_double_type_size = FLOAT_PRECISION_TFmode;
-  else if (global_options_set.x_rs6000_ieeequad)
+  else if (OPTION_SET_P (rs6000_ieeequad))
     {
       if (global_options.x_rs6000_ieeequad)
        error ("%qs requires %qs", "-mabi=ieeelongdouble", "-mlong-double-128");
@@ -4210,7 +4210,7 @@ rs6000_option_override_internal (bool global_init_p)
      explicitly redefine TARGET_IEEEQUAD and TARGET_IEEEQUAD_DEFAULT to 0, so
      those systems will not pick up this default.  Warn if the user changes the
      default unless -Wno-psabi.  */
-  if (!global_options_set.x_rs6000_ieeequad)
+  if (!OPTION_SET_P (rs6000_ieeequad))
     rs6000_ieeequad = TARGET_IEEEQUAD_DEFAULT;
 
   else
@@ -4395,7 +4395,7 @@ rs6000_option_override_internal (bool global_init_p)
   /* Enable Altivec ABI for AIX -maltivec.  */
   if (TARGET_XCOFF
       && (TARGET_ALTIVEC || TARGET_VSX)
-      && !global_options_set.x_rs6000_altivec_abi)
+      && !OPTION_SET_P (rs6000_altivec_abi))
     {
       if (main_target_opt != NULL && !main_target_opt->x_rs6000_altivec_abi)
        error ("target attribute or pragma changes AltiVec ABI");
@@ -4408,7 +4408,7 @@ rs6000_option_override_internal (bool global_init_p)
      be explicitly overridden in either case.  */
   if (TARGET_ELF)
     {
-      if (!global_options_set.x_rs6000_altivec_abi
+      if (!OPTION_SET_P (rs6000_altivec_abi)
          && (TARGET_64BIT || TARGET_ALTIVEC || TARGET_VSX))
        {
          if (main_target_opt != NULL &&
@@ -4438,7 +4438,7 @@ rs6000_option_override_internal (bool global_init_p)
   /* Place FP constants in the constant pool instead of TOC
      if section anchors enabled.  */
   if (flag_section_anchors
-      && !global_options_set.x_TARGET_NO_FP_IN_TOC)
+      && !OPTION_SET_P (TARGET_NO_FP_IN_TOC))
     TARGET_NO_FP_IN_TOC = 1;
 
   if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET)
@@ -4595,7 +4595,7 @@ rs6000_option_override_internal (bool global_init_p)
     }
 
   /* Handle stack protector */
-  if (!global_options_set.x_rs6000_stack_protector_guard)
+  if (!OPTION_SET_P (rs6000_stack_protector_guard))
 #ifdef TARGET_THREAD_SSP_OFFSET
     rs6000_stack_protector_guard = SSP_TLS;
 #else
@@ -4607,7 +4607,7 @@ rs6000_option_override_internal (bool global_init_p)
   rs6000_stack_protector_guard_reg = TARGET_64BIT ? 13 : 2;
 #endif
 
-  if (global_options_set.x_rs6000_stack_protector_guard_offset_str)
+  if (OPTION_SET_P (rs6000_stack_protector_guard_offset_str))
     {
       char *endp;
       const char *str = rs6000_stack_protector_guard_offset_str;
@@ -4626,7 +4626,7 @@ rs6000_option_override_internal (bool global_init_p)
       rs6000_stack_protector_guard_offset = offset;
     }
 
-  if (global_options_set.x_rs6000_stack_protector_guard_reg_str)
+  if (OPTION_SET_P (rs6000_stack_protector_guard_reg_str))
     {
       const char *str = rs6000_stack_protector_guard_reg_str;
       int reg = decode_reg_name (str);
@@ -4654,7 +4654,7 @@ rs6000_option_override_internal (bool global_init_p)
       /* Set aix_struct_return last, after the ABI is determined.
         If -maix-struct-return or -msvr4-struct-return was explicitly
         used, don't override with the ABI default.  */
-      if (!global_options_set.x_aix_struct_return)
+      if (!OPTION_SET_P (aix_struct_return))
        aix_struct_return = (DEFAULT_ABI != ABI_V4 || DRAFT_V4_STRUCT_RET);
 
 #if 0
@@ -6272,14 +6272,14 @@ rs6000_file_start (void)
          start = "";
        }
 
-      if (global_options_set.x_rs6000_cpu_index)
+      if (OPTION_SET_P (rs6000_cpu_index))
        {
          fprintf (file, "%s -mcpu=%s", start,
                   processor_target_table[rs6000_cpu_index].name);
          start = "";
        }
 
-      if (global_options_set.x_rs6000_tune_index)
+      if (OPTION_SET_P (rs6000_tune_index))
        {
          fprintf (file, "%s -mtune=%s", start,
                   processor_target_table[rs6000_tune_index].name);
@@ -21053,7 +21053,7 @@ rs6000_darwin_file_start (void)
   if (rs6000_default_cpu != 0 && rs6000_default_cpu[0] != '\0')
     cpu_id = rs6000_default_cpu;
 
-  if (global_options_set.x_rs6000_cpu_index)
+  if (OPTION_SET_P (rs6000_cpu_index))
     cpu_id = processor_target_table[rs6000_cpu_index].name;
 
   /* Look through the mapping array.  Pick the first name that either
index 872cc2849af008d4701359a08b2b39cc921c65b0..6184c5fde450d08a6782d8540f6784702e91ebc0 100644 (file)
          if ((rs6000_isa_flags_explicit                        \
                & OPTION_MASK_MINIMAL_TOC) != 0)                \
            {                                                   \
-             if (global_options_set.x_rs6000_current_cmodel    \
+             if (OPTION_SET_P (rs6000_current_cmodel)  \
                  && rs6000_current_cmodel != CMODEL_SMALL)     \
                error ("%<-mcmodel%> incompatible with other toc options"); \
              SET_CMODEL (CMODEL_SMALL);                        \
            }                                                   \
          else                                                  \
            {                                                   \
-             if (!global_options_set.x_rs6000_current_cmodel)  \
+             if (!OPTION_SET_P (rs6000_current_cmodel))        \
                SET_CMODEL (CMODEL_MEDIUM);                     \
              if (rs6000_current_cmodel != CMODEL_SMALL)        \
                {                                               \
index 23ff59403a31032792c9a356daf2f177f4782325..96ee5524224efa45d89e83d9c3e44dad9c216c28 100644 (file)
@@ -70,7 +70,7 @@
 
 #define SUBTARGET_OVERRIDE_OPTIONS                                     \
 do {                                                                   \
-  if (!global_options_set.x_g_switch_value)                            \
+  if (!OPTION_SET_P (g_switch_value))                          \
     g_switch_value = SDATA_DEFAULT_SIZE;                               \
                                                                        \
   if (rs6000_abi_name == NULL)                                         \
@@ -197,16 +197,16 @@ do {                                                                      \
     }                                                                  \
                                                                        \
   if (TARGET_PLTSEQ != rs6000_pltseq                                   \
-      && global_options_set.x_rs6000_pltseq)                           \
+      && OPTION_SET_P (rs6000_pltseq))                         \
     {                                                                  \
       error ("%qs not supported by your assembler", "-mpltseq");       \
     }                                                                  \
                                                                        \
   if (DEFAULT_ABI == ABI_V4 && TARGET_PLTSEQ && !TARGET_SECURE_PLT)    \
     {                                                                  \
-      if (global_options_set.x_rs6000_pltseq)                          \
+      if (OPTION_SET_P (rs6000_pltseq))                                \
        {                                                               \
-         if (global_options_set.x_secure_plt)                          \
+         if (OPTION_SET_P (secure_plt))                                \
            error ("%qs and %qs are incompatible",                      \
                   "-mpltseq", "-mbss-plt");                            \
          else                                                          \
index d8ecc0296c8c27322e659f64311750dba309d960..ca21a3a7bd3fb172e021c2325ea738cd1b7e1617 100644 (file)
@@ -155,7 +155,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef SUB3TARGET_OVERRIDE_OPTIONS
 #define SUB3TARGET_OVERRIDE_OPTIONS           \
   do {                                          \
-  if (!global_options_set.x_g_switch_value)     \
+  if (!OPTION_SET_P (g_switch_value))     \
     g_switch_value = SDATA_DEFAULT_SIZE;        \
   VXWORKS_OVERRIDE_OPTIONS;                     \
   } while (0)
index e04385451cf45c968be6d8800875421804488f43..4f144d1b0eb67d137512aa08a85b14689a80c864 100644 (file)
@@ -15746,9 +15746,9 @@ s390_option_override (void)
     {
       /* Don't emit DWARF3/4 unless specifically selected.  The TPF
         debuggers do not yet support DWARF 3/4.  */
-      if (!global_options_set.x_dwarf_strict)
+      if (!OPTION_SET_P (dwarf_strict))
        dwarf_strict = 1;
-      if (!global_options_set.x_dwarf_version)
+      if (!OPTION_SET_P (dwarf_version))
        dwarf_version = 2;
     }
 }
index 7558d2f7195b8af385231b37186a6f8bd9fa246d..b75a7b8250e25316ea0b5b600fa255ec9ec6fbde 100644 (file)
@@ -126,7 +126,7 @@ along with GCC; see the file COPYING3.  If not see
   do                                                                   \
     {                                                                  \
       /* Set default atomic model if it hasn't been specified.  */     \
-      if (global_options_set.x_sh_atomic_model_str == 0)               \
+      if (OPTION_SET_P (sh_atomic_model_str) == 0)             \
        {                                                               \
          if (TARGET_SH3)                                               \
            sh_atomic_model_str = "soft-gusa";                          \
@@ -134,7 +134,7 @@ along with GCC; see the file COPYING3.  If not see
            sh_atomic_model_str = "soft-imask";                         \
        }                                                               \
       /* Set -musermode if it hasn't been specified.  */               \
-      if (global_options_set.x_TARGET_USERMODE == 0)                   \
+      if (OPTION_SET_P (TARGET_USERMODE) == 0)                 \
        TARGET_USERMODE = true;                                         \
     }                                                                  \
   while (0)
index f0b75419855a9ea2c9ed1ee364c081eb95ce4591..39eb773001da7a6eb496fd7a2370c8af440c3eee 100644 (file)
@@ -85,7 +85,7 @@ while (0)
   do                                                                   \
     {                                                                  \
       /* Set -musermode if it hasn't been specified.  */               \
-      if (global_options_set.x_TARGET_USERMODE == 0)                   \
+      if (OPTION_SET_P (TARGET_USERMODE) == 0)                 \
        TARGET_USERMODE = true;                                         \
     }                                                                  \
   while (0)
index 1564109c9425752f7ceb8e6c7d67910a9d3f8b8b..0628f059ca2d5937f94b78f8f5c9ec9f4b162fc7 100644 (file)
@@ -893,7 +893,7 @@ sh_option_override (void)
     }
 
   /* Set -mzdcbranch for SH4 / SH4A if not otherwise specified by the user.  */
-  if (! global_options_set.x_TARGET_ZDCBRANCH && TARGET_HARD_SH4)
+  if (! OPTION_SET_P (TARGET_ZDCBRANCH) && TARGET_HARD_SH4)
     TARGET_ZDCBRANCH = 1;
 
   /* FDPIC code is a special form of PIC, and the vast majority of code
@@ -932,13 +932,13 @@ sh_option_override (void)
         <http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00816.html>.  */
       else if (flag_exceptions)
        {
-         if (flag_schedule_insns && global_options_set.x_flag_schedule_insns)
+         if (flag_schedule_insns && OPTION_SET_P (flag_schedule_insns))
            warning (0, "ignoring %<-fschedule-insns%> because of exception "
                        "handling bug");
          flag_schedule_insns = 0;
        }
       else if (flag_schedule_insns
-              && !global_options_set.x_flag_schedule_insns)
+              && !OPTION_SET_P (flag_schedule_insns))
        flag_schedule_insns = 0;
     }
 
@@ -958,12 +958,12 @@ sh_option_override (void)
   if (flag_unsafe_math_optimizations)
     {
       /* Enable fsca insn for SH4A if not otherwise specified by the user.  */
-      if (global_options_set.x_TARGET_FSCA == 0
+      if (OPTION_SET_P (TARGET_FSCA) == 0
          && (TARGET_SH4A_FP || TARGET_FPU_SH4_300))
        TARGET_FSCA = 1;
 
       /* Enable fsrra insn for SH4A if not otherwise specified by the user.  */
-      if (global_options_set.x_TARGET_FSRRA == 0
+      if (OPTION_SET_P (TARGET_FSRRA) == 0
          && (TARGET_SH4A_FP || TARGET_FPU_SH4_300))
        TARGET_FSRRA = 1;
     }
@@ -976,7 +976,7 @@ sh_option_override (void)
 
   /* If the -mieee option was not explicitly set by the user, turn it on
      unless -ffinite-math-only was specified.  See also PR 33135.  */
-  if (! global_options_set.x_TARGET_IEEE)
+  if (! OPTION_SET_P (TARGET_IEEE))
     TARGET_IEEE = ! flag_finite_math_only;
 
   if (sh_fixed_range_str)
index 1fbdbf5046c31edebe061886466b74fdf5b30302..517816a1fe6f22cb6ba2fc524f0b21cd07e027cb 100644 (file)
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "varasm.h"
 #include "output.h"
+#include "opts.h"
 
 tree solaris_pending_aligns, solaris_pending_inits, solaris_pending_finis;
 
@@ -296,6 +297,6 @@ solaris_override_options (void)
 {
   /* Older versions of Solaris ld cannot handle CIE version 3 in .eh_frame.
      Don't emit DWARF3/4 unless specifically selected if so.  */
-  if (!HAVE_LD_EH_FRAME_CIEV3 && !global_options_set.x_dwarf_version)
+  if (!HAVE_LD_EH_FRAME_CIEV3 && !OPTION_SET_P (dwarf_version))
     dwarf_version = 2;
 }
index 6bc6f0ace6ae87bd307835975c3e101e8dd4ae8e..ca91be4c8e9aa13f6aa191bdb720dbb3ea5158aa 100644 (file)
@@ -1859,7 +1859,7 @@ sparc_option_override (void)
       }
 
   /* Set the default CPU if no -mcpu option was specified.  */
-  if (!global_options_set.x_sparc_cpu_and_features)
+  if (!OPTION_SET_P (sparc_cpu_and_features))
     {
       for (def = &cpu_default[0]; def->cpu != -1; ++def)
        if (def->cpu == TARGET_CPU_DEFAULT)
@@ -1869,7 +1869,7 @@ sparc_option_override (void)
     }
 
   /* Set the default CPU if no -mtune option was specified.  */
-  if (!global_options_set.x_sparc_cpu)
+  if (!OPTION_SET_P (sparc_cpu))
     sparc_cpu = sparc_cpu_and_features;
 
   cpu = &cpu_table[(int) sparc_cpu_and_features];
@@ -1975,7 +1975,7 @@ sparc_option_override (void)
     dump_target_flags ("Final target_flags", target_flags);
 
   /* Set the code model if no -mcmodel option was specified.  */
-  if (global_options_set.x_sparc_code_model)
+  if (OPTION_SET_P (sparc_code_model))
     {
       if (TARGET_ARCH32)
        error ("%<-mcmodel=%> is not supported in 32-bit mode");
@@ -1989,7 +1989,7 @@ sparc_option_override (void)
     }
 
   /* Set the memory model if no -mmemory-model option was specified.  */
-  if (!global_options_set.x_sparc_memory_model)
+  if (!OPTION_SET_P (sparc_memory_model))
     {
       /* Choose the memory model for the operating system.  */
       enum sparc_memory_model_type os_default = SUBTARGET_DEFAULT_MEMORY_MODEL;
@@ -2177,12 +2177,12 @@ sparc_option_override (void)
   /* Disable save slot sharing for call-clobbered registers by default.
      The IRA sharing algorithm works on single registers only and this
      pessimizes for double floating-point registers.  */
-  if (!global_options_set.x_flag_ira_share_save_slots)
+  if (!OPTION_SET_P (flag_ira_share_save_slots))
     flag_ira_share_save_slots = 0;
 
   /* Only enable REE by default in 64-bit mode where it helps to eliminate
      redundant 32-to-64-bit extensions.  */
-  if (!global_options_set.x_flag_ree && TARGET_ARCH32)
+  if (!OPTION_SET_P (flag_ree) && TARGET_ARCH32)
     flag_ree = 0;
 
   /* Do various machine dependent initializations.  */
index 64e28f641d808ba286aa80f213009e096f5080ab..08d1126c49e6bbc0deb595f3344325d0d84cdb42 100644 (file)
@@ -56,6 +56,7 @@
 #include "tilegx-builtins.h"
 #include "tilegx-multiply.h"
 #include "builtins.h"
+#include "opts.h"
 
 /* This file should be included last.  */
 #include "target-def.h"
@@ -76,7 +77,7 @@ static bool output_memory_autoinc_first;
 static void
 tilegx_option_override (void)
 {
-  if (global_options_set.x_tilegx_cmodel)
+  if (OPTION_SET_P (tilegx_cmodel))
     {
       switch (tilegx_cmodel)
        {
index 58e5355e7127de8357fbf55f555cfaa3ad99fa1d..ffa2243f155b527e5d4bdbadf60cd5890b343f7f 100644 (file)
@@ -443,7 +443,7 @@ visium_option_override (void)
     }
 
   /* Set -mtune from -mcpu if not specified.  */
-  if (!global_options_set.x_visium_cpu)
+  if (!OPTION_SET_P (visium_cpu))
     visium_cpu = visium_cpu_and_features;
 
   /* Align functions on 256-byte (32-quadword) for GR5 and 64-byte (8-quadword)
index 51f4675d7c683151352076d274d28dae5c69aad3..29ec0604b6262623f7d0c3cc62c321fd01818331 100644 (file)
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl.h"
 #include "memmodel.h"
 #include "optabs.h"
+#include "opts.h"
 
 #if !HAVE_INITFINI_ARRAY_SUPPORT
 /* Like default_named_section_asm_out_constructor, except that even
@@ -167,10 +168,10 @@ vxworks_override_options (void)
      dwarf up to certain version.  Default dwarf control to friendly
      values for these.  */
 
-  if (!global_options_set.x_dwarf_strict)
+  if (!OPTION_SET_P (dwarf_strict))
     dwarf_strict = 1;
 
-  if (!global_options_set.x_dwarf_version)
+  if (!OPTION_SET_P (dwarf_version))
     dwarf_version = VXWORKS_DWARF_VERSION_DEFAULT;
 
 }
index 66d5221692ab6adb980e3f1e8a06d59dbbaa3d64..08f8514d08deebdd08d0ea654c07dd16513baa9e 100644 (file)
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "fold-const-call.h"
 #include "stor-layout.h"
 #include "cgraph.h"
+#include "opts.h"
 
 static bool verify_constant (tree, bool, bool *, bool *);
 #define VERIFY_CONSTANT(X)                                             \
@@ -6107,7 +6108,7 @@ maybe_warn_about_constant_value (location_t loc, tree decl)
   static bool explained = false;
   if (cxx_dialect >= cxx17
       && warn_interference_size
-      && !global_options_set.x_param_destruct_interfere_size
+      && !OPTION_SET_P (param_destruct_interfere_size)
       && DECL_CONTEXT (decl) == std_node
       && id_equal (DECL_NAME (decl), "hardware_destructive_interference_size")
       && (LOCATION_FILE (input_location) != main_input_filename
index 2d30c790b930dd089e9d8b7e37f6c0156325e287..561debe6a0e9902e733cda0b15fbeec570ceab32 100644 (file)
@@ -56,6 +56,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "context.h"  /* For 'g'.  */
 #include "omp-general.h"
 #include "omp-offload.h"  /* For offload_vars.  */
+#include "opts.h"
 
 /* Possible cases of bad specifiers type used by bad_specifiers. */
 enum bad_spec_place {
@@ -3228,7 +3229,7 @@ redeclaration_error_message (tree newdecl, tree olddecl)
        {
          DECL_EXTERNAL (newdecl) = 1;
          /* For now, only warn with explicit -Wdeprecated.  */
-         if (global_options_set.x_warn_deprecated)
+         if (OPTION_SET_P (warn_deprecated))
            {
              auto_diagnostic_group d;
              if (warning_at (DECL_SOURCE_LOCATION (newdecl), OPT_Wdeprecated,
@@ -4756,7 +4757,7 @@ cxx_init_decl_processing (void)
   /* Check that the hardware interference sizes are at least
      alignof(max_align_t), as required by the standard.  */
   const int max_align = max_align_t_align () / BITS_PER_UNIT;
-  if (global_options_set.x_param_destruct_interfere_size)
+  if (OPTION_SET_P (param_destruct_interfere_size))
     {
       if (param_destruct_interfere_size < max_align)
        error ("%<--param destructive-interference-size=%d%> is less than "
@@ -4773,7 +4774,7 @@ cxx_init_decl_processing (void)
     param_destruct_interfere_size = param_l1_cache_line_size;
   /* else leave it unset.  */
 
-  if (global_options_set.x_param_construct_interfere_size)
+  if (OPTION_SET_P (param_construct_interfere_size))
     {
       if (param_construct_interfere_size < max_align)
        error ("%<--param constructive-interference-size=%d%> is less than "
index fa29a46ab1ebf3b514e8a854a2e8475d7c712f8d..be6330fbdfb29d8429e100cfa389bd65894822f5 100644 (file)
@@ -792,13 +792,13 @@ d_post_options (const char ** fn)
 
   if (global.params.betterC)
     {
-      if (!global_options_set.x_flag_moduleinfo)
+      if (!OPTION_SET_P (flag_moduleinfo))
        global.params.useModuleInfo = false;
 
-      if (!global_options_set.x_flag_rtti)
+      if (!OPTION_SET_P (flag_rtti))
        global.params.useTypeInfo = false;
 
-      if (!global_options_set.x_flag_exceptions)
+      if (!OPTION_SET_P (flag_exceptions))
        global.params.useExceptions = false;
 
       global.params.checkAction = CHECKACTION_C;
@@ -810,7 +810,7 @@ d_post_options (const char ** fn)
   /* Turn off partitioning unless it was explicitly requested, as it doesn't
      work with D exception chaining, where EH handler uses LSDA to determine
      whether two thrown exception are in the same context.  */
-  if (!global_options_set.x_flag_reorder_blocks_and_partition)
+  if (!OPTION_SET_P (flag_reorder_blocks_and_partition))
     global_options.x_flag_reorder_blocks_and_partition = 0;
 
   /* Error about use of deprecated features.  */
@@ -819,7 +819,7 @@ d_post_options (const char ** fn)
     global.params.useDeprecated = DIAGNOSTICerror;
 
   /* Make -fmax-errors visible to frontend's diagnostic machinery.  */
-  if (global_options_set.x_flag_max_errors)
+  if (OPTION_SET_P (flag_max_errors))
     global.params.errorLimit = flag_max_errors;
 
   if (flag_excess_precision == EXCESS_PRECISION_DEFAULT)
index 016b70443aec23ea67f45129150cbe4f2128dfce..3499a1caa6d279ea667dfe5f652d961eda34955d 100644 (file)
@@ -260,7 +260,7 @@ gfc_post_options (const char **pfilename)
      If not enabled explicitly by the user, only warn for -I
      and -J, otherwise warn for all include paths.  */
   verbose_missing_dir_warn
-    = (global_options_set.x_cpp_warn_missing_include_dirs
+    = (OPTION_SET_P (cpp_warn_missing_include_dirs)
        && global_options.x_cpp_warn_missing_include_dirs);
   SET_OPTION_IF_UNSET (&global_options, &global_options_set,
                       cpp_warn_missing_include_dirs, 1);
@@ -309,7 +309,7 @@ gfc_post_options (const char **pfilename)
     flag_dump_fortran_original = 0;
 
   /* Make -fmax-errors visible to gfortran's diagnostic machinery.  */
-  if (global_options_set.x_flag_max_errors)
+  if (OPTION_SET_P (flag_max_errors))
     gfc_option.max_errors = flag_max_errors;
 
   /* Verify the input file name.  */
@@ -388,7 +388,7 @@ gfc_post_options (const char **pfilename)
 
       /* Enable -Werror=line-truncation when -Werror and -Wno-error have
         not been set.  */
-      if (warn_line_truncation && !global_options_set.x_warnings_are_errors
+      if (warn_line_truncation && !OPTION_SET_P (warnings_are_errors)
          && (global_dc->classify_diagnostic[OPT_Wline_truncation] ==
              DK_UNSPECIFIED))
        diagnostic_classify_diagnostic (global_dc, OPT_Wline_truncation,
index 9496b3c8e0b165713dff04167828db94b092c8c2..7b2ad74e69a68b40f3afad035a8d9e4ed58e1d82 100644 (file)
@@ -70,17 +70,17 @@ lto_write_options (void)
 
   obstack_init (&temporary_obstack);
 
-  if (!global_options_set.x_flag_openmp
+  if (!OPTION_SET_P (flag_openmp)
       && !global_options.x_flag_openmp)
     append_to_collect_gcc_options (&temporary_obstack, &first_p,
                                   "-fno-openmp");
-  if (!global_options_set.x_flag_openacc
+  if (!OPTION_SET_P (flag_openacc)
       && !global_options.x_flag_openacc)
     append_to_collect_gcc_options (&temporary_obstack, &first_p,
                                   "-fno-openacc");
   /* Append PIC/PIE mode because its default depends on target and it is
      subject of merging in lto-wrapper.  */
-  if (!global_options_set.x_flag_pic && !global_options_set.x_flag_pie)
+  if (!OPTION_SET_P (flag_pic) && !OPTION_SET_P (flag_pie))
     {
        append_to_collect_gcc_options (&temporary_obstack, &first_p,
                                      global_options.x_flag_pic == 2
@@ -94,7 +94,7 @@ lto_write_options (void)
                                      : "-fno-pie");
     }
 
-  if (!global_options_set.x_flag_cf_protection)
+  if (!OPTION_SET_P (flag_cf_protection))
     {
       append_to_collect_gcc_options (
        &temporary_obstack, &first_p,
index 183fc01abb2888c894df971dd1ceb8a0d53b6b63..17c8618992365ad97f95222fb704da773a6760af 100644 (file)
@@ -259,7 +259,7 @@ static void next_runtime_01_initialize (void)
 #ifdef OBJCPLUS
   /* For all NeXT objc ABIs -fobjc-call-cxx-cdtors is on by
      default.  */
-  if (!global_options_set.x_flag_objc_call_cxx_cdtors)
+  if (!OPTION_SET_P (flag_objc_call_cxx_cdtors))
     global_options.x_flag_objc_call_cxx_cdtors = 1;
 #endif
 
index 9c35738a95cf89162720289e6e15d343f1918861..677b75f0334c357c688c49b4d2c8d251d79be2fd 100644 (file)
@@ -255,7 +255,7 @@ objc_next_runtime_abi_02_init (objc_runtime_hooks *rthooks)
     }
 
   /* NeXT ABI 2 is intended to default to checking for nil receivers.  */
-  if (! global_options_set.x_flag_objc_nilcheck)
+  if (! OPTION_SET_P (flag_objc_nilcheck))
     flag_objc_nilcheck = 1;
 
   rthooks->initialize = next_runtime_02_initialize;
@@ -366,7 +366,7 @@ static void next_runtime_02_initialize (void)
 #ifdef OBJCPLUS
   /* For all NeXT objc ABIs -fobjc-call-cxx-cdtors is on by
      default.  */
-  if (!global_options_set.x_flag_objc_call_cxx_cdtors)
+  if (!OPTION_SET_P (flag_objc_call_cxx_cdtors))
     global_options.x_flag_objc_call_cxx_cdtors = 1;
 #endif
 
index 496c0e6cdd6a8a5c821ce1ab5d678a29bd594a38..9715ef50e627fd29eb1033d280c539a750623d19 100644 (file)
@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "stringpool.h"
 #include "attribs.h"
 #include "tree-eh.h"
+#include "opts.h"
 
 /* OMP region information.  Every parallel and workshare
    directive is enclosed between two markers, the OMP_* directive
@@ -6960,7 +6961,7 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd)
       /* If not -fno-tree-loop-vectorize, hint that we want to vectorize
         the loop.  */
       if ((flag_tree_loop_vectorize
-          || !global_options_set.x_flag_tree_loop_vectorize)
+          || !OPTION_SET_P (flag_tree_loop_vectorize))
          && flag_tree_loop_optimize
          && loop->safelen > 1)
        {
index 1e4c0b2553154c7123f6824bf9ec3aee252a5658..3e5ca94c2a7f91206f873c75932d841e8819d836 100644 (file)
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-iterator.h"
 #include "data-streamer.h"
 #include "streamer-hooks.h"
+#include "opts.h"
 
 enum omp_requires omp_requires_mask;
 
@@ -952,7 +953,7 @@ omp_max_vf (void)
       || optimize_debug
       || !flag_tree_loop_optimize
       || (!flag_tree_loop_vectorize
-         && global_options_set.x_flag_tree_loop_vectorize))
+         && OPTION_SET_P (flag_tree_loop_vectorize)))
     return 1;
 
   auto_vector_modes modes;
index d881426ae65a6a9516aed3849c6e985ae4914cec..833f7ddea58ffb9585f9e5ea0720795cb762481d 100644 (file)
@@ -54,6 +54,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cfgloop.h"
 #include "context.h"
 #include "convert.h"
+#include "opts.h"
 
 /* Describe the OpenACC looping structure of a function.  The entire
    function is held in a 'NULL' loop.  */
@@ -633,7 +634,7 @@ oacc_xform_loop (gcall *call)
          /* If not -fno-tree-loop-vectorize, hint that we want to vectorize
             the loop.  */
          && (flag_tree_loop_vectorize
-             || !global_options_set.x_flag_tree_loop_vectorize))
+             || !OPTION_SET_P (flag_tree_loop_vectorize)))
        {
          basic_block bb = gsi_bb (gsi);
          class loop *parent = bb->loop_father;
index bafc790112b6ac9800cc9e6c6afc3158b1de17ff..f5bc9a3149c911d7dc56b6752c156598f91b9db0 100644 (file)
@@ -500,4 +500,8 @@ extern char *gen_producer_string (const char *language_string,
   } \
   while (false)
 
+/* Return true if OPTION is set by user in global options.  */
+
+#define OPTION_SET_P(OPTION) global_options_set.x_ ## OPTION
+
 #endif
index c9b5208853dbc15706a65d1eb335e28e0564325e..cbbcedf790fcf69025eb830789679ec78de01564 100644 (file)
@@ -2453,12 +2453,12 @@ default_max_noce_ifcvt_seq_cost (edge e)
 
   if (predictable_p)
     {
-      if (global_options_set.x_param_max_rtl_if_conversion_predictable_cost)
+      if (OPTION_SET_P (param_max_rtl_if_conversion_predictable_cost))
        return param_max_rtl_if_conversion_predictable_cost;
     }
   else
     {
-      if (global_options_set.x_param_max_rtl_if_conversion_unpredictable_cost)
+      if (OPTION_SET_P (param_max_rtl_if_conversion_unpredictable_cost))
        return param_max_rtl_if_conversion_unpredictable_cost;
     }
 
index 1bb1794be964df8468c9993d8d59ab85b27d3bf0..81748b1152ac21a68d84483540dbb0ab46e45ff2 100644 (file)
@@ -1753,7 +1753,7 @@ process_options (bool no_backend)
 
   /* Enable -Werror=coverage-mismatch when -Werror and -Wno-error
      have not been set.  */
-  if (!global_options_set.x_warnings_are_errors)
+  if (!OPTION_SET_P (warnings_are_errors))
     {
       if (warn_coverage_mismatch
          && (global_dc->classify_diagnostic[OPT_Wcoverage_mismatch] ==
index 6b195d1914f53d79594d3eb79c55f8ec63f5ddce..ce1f08f7d22c071bcddaf5cb9f3064b5af5fd29f 100644 (file)
@@ -233,6 +233,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "tree-affine.h"
 #include "builtins.h"
+#include "opts.h"
 
 /* The maximum number of iterations between the considered memory
    references.  */
@@ -3492,7 +3493,7 @@ public:
        only if predictive commoning isn't set explicitly, and it
        doesn't allow unrolling.  */
     if (flag_tree_loop_vectorize
-       && !global_options_set.x_flag_predictive_commoning)
+       && !OPTION_SET_P (flag_predictive_commoning))
       return true;
 
     return false;
index 0363c5efb7861499c032e63bedd6dccfddeceb81..9b786e29e4e59382e39616d659747faeeb1d3e6b 100644 (file)
@@ -99,7 +99,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "dbgcnt.h"
 #include "builtins.h"
 #include "tree-sra.h"
-
+#include "opts.h"
 
 /* Enumeration of all aggregate reductions we can do.  */
 enum sra_mode { SRA_MODE_EARLY_IPA,   /* early call regularization */
@@ -3427,12 +3427,12 @@ analyze_all_variable_accesses (void)
 
   if (optimize_speed_p)
     {
-      if (global_options_set.x_param_sra_max_scalarization_size_speed)
+      if (OPTION_SET_P (param_sra_max_scalarization_size_speed))
        max_scalarization_size = param_sra_max_scalarization_size_speed;
     }
   else
     {
-      if (global_options_set.x_param_sra_max_scalarization_size_size)
+      if (OPTION_SET_P (param_sra_max_scalarization_size_size))
        max_scalarization_size = param_sra_max_scalarization_size_size;
     }
   max_scalarization_size *= BITS_PER_UNIT;