flag_section_anchors to 1 not 2.
* config/i386/i386.c (ix86_option_override_internal): Check
global_options_set.x_flag_zee and
global_options_set.x_flag_omit_frame_pointer.
(ix86_option_optimization): Don't set flag_omit_frame_pointer and
flag_zee to 2.
* config/i386/sol2-10.h (SUBTARGET_OVERRIDE_OPTIONS): Check
global_options_set.x_flag_omit_frame_pointer.
* config/rs6000/rs6000.c (rs6000_option_init_struct): Set
opts->x_flag_section_anchors to 1 not 2.
* config/sh/sh.c (sh_option_optimization): Don't set
flag_schedule_insns to 2.
(sh_option_override): Check
global_options_set.x_flag_schedule_insns.
* opts.c (finish_options): Check opts_set->x_flag_section_anchors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165539
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-10-16 Joseph Myers <joseph@codesourcery.com>
+
+ * config/arm/arm.c (arm_option_optimization): Set
+ flag_section_anchors to 1 not 2.
+ * config/i386/i386.c (ix86_option_override_internal): Check
+ global_options_set.x_flag_zee and
+ global_options_set.x_flag_omit_frame_pointer.
+ (ix86_option_optimization): Don't set flag_omit_frame_pointer and
+ flag_zee to 2.
+ * config/i386/sol2-10.h (SUBTARGET_OVERRIDE_OPTIONS): Check
+ global_options_set.x_flag_omit_frame_pointer.
+ * config/rs6000/rs6000.c (rs6000_option_init_struct): Set
+ opts->x_flag_section_anchors to 1 not 2.
+ * config/sh/sh.c (sh_option_optimization): Don't set
+ flag_schedule_insns to 2.
+ (sh_option_override): Check
+ global_options_set.x_flag_schedule_insns.
+ * opts.c (finish_options): Check opts_set->x_flag_section_anchors.
+
2010-10-16 Kai Tietz <kai.tietz@onevision.com>
* configure.ac: Make sure inhibit_libc remains false for mingw targets
static void
arm_option_optimization (int level, int size ATTRIBUTE_UNUSED)
{
- /* Enable section anchors by default at -O1 or higher.
- Use 2 to distinguish from an explicit -fsection-anchors
- given on the command line. */
+ /* Enable section anchors by default at -O1 or higher. */
if (level > 0)
- flag_section_anchors = 2;
+ flag_section_anchors = 1;
}
/* Implement TARGET_FRAME_POINTER_REQUIRED. */
in case they weren't overwritten by command line options. */
if (TARGET_64BIT)
{
- if (flag_zee == 2)
+ if (optimize > 1 && !global_options_set.x_flag_zee)
flag_zee = 1;
- if (flag_omit_frame_pointer == 2)
+ if (optimize >= 1 && !global_options_set.x_flag_omit_frame_pointer)
flag_omit_frame_pointer = 1;
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = 1;
}
else
{
- if (flag_zee == 2)
- flag_zee = 0;
- if (flag_omit_frame_pointer == 2)
+ if (optimize >= 1 && !global_options_set.x_flag_omit_frame_pointer)
flag_omit_frame_pointer = !(USE_IX86_FRAME_POINTER || optimize_size);
if (flag_asynchronous_unwind_tables == 2)
flag_asynchronous_unwind_tables = !USE_IX86_FRAME_POINTER;
flag_schedule_insns = 0;
#endif
- /* The default values of these switches depend on the TARGET_64BIT
- that is not known at this moment. Mark these values with 2 and
- let user the to override these. In case there is no command line
- option specifying them, we will set the defaults in
- ix86_option_override_internal. */
- if (optimize >= 1)
- flag_omit_frame_pointer = 2;
-
- /* For -O2 and beyond, turn on -fzee for x86_64 target. */
- if (level > 1)
- flag_zee = 2;
-
#ifdef SUBTARGET_OPTIMIZATION_OPTIONS
SUBTARGET_OPTIMIZATION_OPTIONS;
#endif
#define SUBTARGET_OVERRIDE_OPTIONS \
do \
{ \
- if (flag_omit_frame_pointer == 2) \
+ if (!global_options_set.x_flag_omit_frame_pointer) \
flag_omit_frame_pointer = 0; \
} \
while (0)
/* Enable section anchors by default. */
if (!TARGET_MACHO)
- opts->x_flag_section_anchors = 2;
+ opts->x_flag_section_anchors = 1;
}
/* Implement TARGET_OPTION_DEFAULT_PARAMS. */
if (!size)
target_flags |= MASK_SAVE_ALL_TARGET_REGS;
}
- /* If flag_schedule_insns is 1, we set it to 2 here so we know if
- the user explicitly requested this to be on or off. */
- if (flag_schedule_insns > 0)
- flag_schedule_insns = 2;
}
/* Implement TARGET_OPTION_INIT_STRUCT. */
<http://gcc.gnu.org/ml/gcc-patches/2005-10/msg00816.html>. */
else if (flag_exceptions)
{
- if (flag_schedule_insns == 1)
+ if (flag_schedule_insns && global_options_set.x_flag_schedule_insns)
warning (0, "ignoring -fschedule-insns because of exception handling bug");
flag_schedule_insns = 0;
}
- else if (flag_schedule_insns == 2)
+ else if (flag_schedule_insns
+ && !global_options_set.x_flag_schedule_insns)
flag_schedule_insns = 0;
}
section-anchors. */
if (!flag_unit_at_a_time)
{
- if (flag_section_anchors == 1)
+ if (flag_section_anchors && opts_set->x_flag_section_anchors)
error ("Section anchors must be disabled when unit-at-a-time "
"is disabled.");
flag_section_anchors = 0;
/* Unless the user has asked for section anchors, we disable toplevel
reordering at -O0 to disable transformations that might be surprising
to end users and to get -fno-toplevel-reorder tested. */
- if (!optimize && flag_toplevel_reorder == 2 && flag_section_anchors != 1)
+ if (!optimize
+ && flag_toplevel_reorder == 2
+ && !(flag_section_anchors && opts_set->x_flag_section_anchors))
{
flag_toplevel_reorder = 0;
flag_section_anchors = 0;
}
if (!flag_toplevel_reorder)
{
- if (flag_section_anchors == 1)
+ if (flag_section_anchors && opts_set->x_flag_section_anchors)
error ("section anchors must be disabled when toplevel reorder"
" is disabled");
flag_section_anchors = 0;