opts.c (decode_options): Do function inlining with very small max-inline-insns-*...
authorGabor Loki <loki@inf.u-szeged.hu>
Fri, 2 Apr 2004 22:17:49 +0000 (00:17 +0200)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 2 Apr 2004 22:17:49 +0000 (22:17 +0000)
2004-04-02  Gabor Loki <loki@inf.u-szeged.hu>

       * opts.c (decode_options): Do function inlining with very small
       max-inline-insns-* parameters when optimizing for size.

From-SVN: r80359

gcc/ChangeLog
gcc/opts.c

index e9b7dbc7960a84a38a7fd30a2762db8e9db1d03f..2a0fbb720b4d648a59e971fdf2cbbad04c07da62 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-02  Gabor Loki <loki@inf.u-szeged.hu>
+
+       * opts.c (decode_options): Do function inlining with very small
+       max-inline-insns-* parameters when optimizing for size.
+
 2004-04-02  Vladimir Makarov  <vmakarov@redhat.com>
 
        * config/i386/i386.h (TARGET_NOCONA): New macro.
index f21cf250d21e4489ffe8d7dad163846813894402..b5cb3d99c0a76addd7a303bb98e45b197ebb5edd 100644 (file)
@@ -594,6 +594,15 @@ decode_options (unsigned int argc, const char **argv)
       flag_reorder_blocks = 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.  */
   flag_signed_char = DEFAULT_SIGNED_CHAR;
   /* Initialize how much space enums occupy, by default.  */