OSDN Git Service

* config/arm/arm.c (arm_option_optimization): Set
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Oct 2010 12:12:24 +0000 (12:12 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Oct 2010 12:12:24 +0000 (12:12 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/i386/i386.c
gcc/config/i386/sol2-10.h
gcc/config/rs6000/rs6000.c
gcc/config/sh/sh.c
gcc/opts.c

index 16aa3df..55d179f 100644 (file)
@@ -1,3 +1,22 @@
+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
index 3bcd1a9..4f6bea1 100644 (file)
@@ -22823,11 +22823,9 @@ arm_order_regs_for_local_alloc (void)
 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.  */
index 4536ef2..cf70018 100644 (file)
@@ -3276,9 +3276,9 @@ ix86_option_override_internal (bool main_args_p)
      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;
@@ -3287,9 +3287,7 @@ ix86_option_override_internal (bool main_args_p)
     }
   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;
@@ -4537,18 +4535,6 @@ ix86_option_optimization (int level, int size ATTRIBUTE_UNUSED)
     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
index d4f6450..e972ece 100644 (file)
@@ -84,7 +84,7 @@ along with GCC; see the file COPYING3.  If not see
 #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)
index a1baa59..69c3969 100644 (file)
@@ -3693,7 +3693,7 @@ rs6000_option_init_struct (struct gcc_options *opts)
 
   /* 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.  */
index 41cc8b7..9850969 100644 (file)
@@ -728,10 +728,6 @@ sh_option_optimization (int level, int size)
       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.  */
@@ -932,11 +928,12 @@ sh_option_override (void)
          <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;
     }
 
index 81514ba..69d1359 100644 (file)
@@ -1005,7 +1005,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set)
      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;
@@ -1022,14 +1022,16 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set)
   /* 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;