OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / opts.c
index a4267f8..a2df41a 100644 (file)
@@ -100,7 +100,7 @@ bool warn_shadow;
 
 /* Nonzero means warn about constructs which might not be
    strict-aliasing safe.  */
-bool warn_strict_aliasing;
+int warn_strict_aliasing;
 
 /* True to warn if a switch on an enum, that does not have a default
    case, fails to have a case for every enum value.  */
@@ -403,7 +403,7 @@ handle_option (const char **argv, unsigned int lang_mask)
 
   if (arg == NULL && (option->flags & (CL_JOINED | CL_SEPARATE)))
     {
-      if (!(*lang_hooks.missing_argument) (opt, opt_index))
+      if (!lang_hooks.missing_argument (opt, opt_index))
        error ("missing argument to \"%s\"", opt);
       goto done;
     }
@@ -421,7 +421,7 @@ handle_option (const char **argv, unsigned int lang_mask)
     }
 
   if (option->flags & lang_mask)
-    if ((*lang_hooks.handle_option) (opt_index, arg, value) == 0)
+    if (lang_hooks.handle_option (opt_index, arg, value) == 0)
       result = 0;
 
   if (result && (option->flags & CL_COMMON))
@@ -483,7 +483,7 @@ decode_options (unsigned int argc, const char **argv)
   unsigned int i, lang_mask;
 
   /* Perform language-specific options initialization.  */
-  lang_mask = (*lang_hooks.init_options) (argc, argv);
+  lang_mask = lang_hooks.init_options (argc, argv);
 
   lang_hooks.initialize_diagnostics (global_dc);
 
@@ -574,6 +574,7 @@ decode_options (unsigned int argc, const char **argv)
       flag_rename_registers = 1;
       flag_unswitch_loops = 1;
       flag_web = 1;
+      flag_gcse_after_reload = 1;
     }
 
   if (optimize < 2 || optimize_size)
@@ -591,6 +592,16 @@ decode_options (unsigned int argc, const char **argv)
         or less automatically remove extra jumps, but would also try to
         use more short jumps instead of long jumps.  */
       flag_reorder_blocks = 0;
+      flag_reorder_blocks_and_partition = 0;
+    }
+
+  if (optimize_size)
+    {
+      /* Inlining of very small functions usually reduces total size.  */
+      set_param_value ("max-inline-insns-single", 5);
+      set_param_value ("max-inline-insns-auto", 5);
+      set_param_value ("max-inline-insns-rtl", 10);
+      flag_inline_functions = 1;
     }
 
   /* Initialize whether `char' is signed.  */
@@ -647,6 +658,19 @@ decode_options (unsigned int argc, const char **argv)
 
   if (flag_really_no_inline == 2)
     flag_really_no_inline = flag_no_inline;
+
+  /* The optimization to partition hot and cold basic blocks into separate
+     sections of the .o and executable files does not work (currently)
+     with exception handling.  If flag_exceptions is turned on we need to
+     turn off the partitioning optimization.  */
+
+  if (flag_exceptions && flag_reorder_blocks_and_partition)
+    {
+      warning 
+           ("-freorder-blocks-and-partition does not work with exceptions");
+      flag_reorder_blocks_and_partition = 0;
+      flag_reorder_blocks = 1;
+    }
 }
 
 /* Handle target- and language-independent options.  Return zero to
@@ -746,6 +770,7 @@ common_handle_option (size_t scode, const char *arg,
       break;
 
     case OPT_Wstrict_aliasing:
+    case OPT_Wstrict_aliasing_:
       warn_strict_aliasing = value;
       break;
 
@@ -1035,6 +1060,10 @@ common_handle_option (size_t scode, const char *arg,
       flag_gcse_sm = value;
       break;
 
+    case OPT_fgcse_after_reload:
+      flag_gcse_after_reload = value;
+      break;
+
     case OPT_fgcse_las:
       flag_gcse_las = value;
       break;
@@ -1253,6 +1282,10 @@ common_handle_option (size_t scode, const char *arg,
       flag_reorder_blocks = value;
       break;
 
+    case OPT_freorder_blocks_and_partition:
+      flag_reorder_blocks_and_partition = value;
+      break;
+  
     case OPT_freorder_functions:
       flag_reorder_functions = value;
       break;