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
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;
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;
}
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;
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
/* 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)
}
/* 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. */
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. */
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. */
#include "gimple.h"
#include "selftest.h"
#include "tree-vectorizer.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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;
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;
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
#include "hw-doloop.h"
#include "dumpfile.h"
#include "builtins.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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
#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%>");
#include "dumpfile.h"
#include "builtins.h"
#include "flags.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
{
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;
#include "pass_manager.h"
#include "tree-pass.h"
#include "context.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
#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 ();
#include "intl.h"
#include "optabs.h"
#include "flags.h"
+#include "opts.h"
/* Fix and Continue.
}
/* 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
: (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. */
/* 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;
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 "
/* 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;
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)
{
#include "ifcvt.h"
#include "rtl-iter.h"
#include "calls.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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;
}
}
/* 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
\
/* 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; \
\
} \
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;
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;
}
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);
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;
#include "expr.h"
#include "tm-constrs.h"
#include "builtins.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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);
#include "expr.h"
#include "tm-constrs.h"
#include "builtins.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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;
}
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:
#include "cfgloop.h"
#include "insn-addr.h"
#include "cfgrtl.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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);
#include "builtins.h"
#include "rtl-iter.h"
#include "flags.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
{
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
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);
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)
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)
#include "builtins.h"
#include "tree-pass.h"
#include "xregex.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
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)
/* 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;
/* 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. */
{
/* 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;
}
#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) \
#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%>",
}
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);
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;
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) \
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); \
/* 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)
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) \
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); \
/* 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)
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) \
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); \
/* 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)
&& !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;
}
{
/* 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;
}
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)
{
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)
}
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;
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");
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:
/* 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)
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. */
#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
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;
: 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
; /* 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");
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
/* 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");
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 &&
/* 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)
}
/* 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
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;
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);
/* 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
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);
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
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) \
{ \
#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) \
} \
\
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 \
#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)
{
/* 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;
}
}
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"; \
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)
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)
}
/* 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
<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;
}
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;
}
/* 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)
#include "diagnostic-core.h"
#include "varasm.h"
#include "output.h"
+#include "opts.h"
tree solaris_pending_aligns, solaris_pending_inits, solaris_pending_finis;
{
/* 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;
}
}
/* 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)
}
/* 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];
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");
}
/* 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;
/* 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. */
#include "tilegx-builtins.h"
#include "tilegx-multiply.h"
#include "builtins.h"
+#include "opts.h"
/* This file should be included last. */
#include "target-def.h"
static void
tilegx_option_override (void)
{
- if (global_options_set.x_tilegx_cmodel)
+ if (OPTION_SET_P (tilegx_cmodel))
{
switch (tilegx_cmodel)
{
}
/* 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)
#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
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;
}
#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) \
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
#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 {
{
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,
/* 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 "
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 "
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;
/* 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. */
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)
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);
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. */
/* 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,
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
: "-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,
#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
}
/* 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;
#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
#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
/* 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)
{
#include "tree-iterator.h"
#include "data-streamer.h"
#include "streamer-hooks.h"
+#include "opts.h"
enum omp_requires omp_requires_mask;
|| 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;
#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. */
/* 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;
} \
while (false)
+/* Return true if OPTION is set by user in global options. */
+
+#define OPTION_SET_P(OPTION) global_options_set.x_ ## OPTION
+
#endif
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;
}
/* 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] ==
#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. */
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;
#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 */
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;