toplev.c (parse_options_and_default_flags): Don't set flag_reorder_blocks for -Os.
authorRichard Henderson <rth@redhat.com>
Thu, 1 Aug 2002 23:53:58 +0000 (16:53 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 1 Aug 2002 23:53:58 +0000 (16:53 -0700)
        * toplev.c (parse_options_and_default_flags): Don't set
        flag_reorder_blocks for -Os.

        * config/avr/avr.c (avr_optimization_options): Remove.
        * config/avr/avr.h (OPTIMIZATION_OPTIONS): Remove.
        * config/m68hc11/m68hc11.c (m68hc11_optimization_options): Remove.
        * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Remove.

From-SVN: r55958

gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/m68hc11/m68hc11.c
gcc/config/m68hc11/m68hc11.h
gcc/toplev.c

index 22f4ba17a4e94563deb080618259fdfa885966b5..70a5c6b86610392a44ab938a4820fbd4f0bb73eb 100644 (file)
@@ -1,3 +1,13 @@
+2002-08-01  Richard Henderson  <rth@redhat.com>
+
+       * toplev.c (parse_options_and_default_flags): Don't set 
+       flag_reorder_blocks for -Os.
+
+       * config/avr/avr.c (avr_optimization_options): Remove.
+       * config/avr/avr.h (OPTIMIZATION_OPTIONS): Remove.
+       * config/m68hc11/m68hc11.c (m68hc11_optimization_options): Remove.
+       * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Remove.
+
 2002-08-01  H.J. Lu <hjl@gnu.org>
            Richard Henderson  <rth@redhat.com>
 
index e55c33ce7b9c1ebf2d40cf8fcbf00a52cd544cdb..a8f9bda5df67e143844f23cd67bba3aecdfaa94b 100644 (file)
@@ -258,16 +258,6 @@ avr_override_options ()
 }
 
 
-void
-avr_optimization_options (level, size)
-     int level ATTRIBUTE_UNUSED;
-     int size;
-{
-  if (size)
-    flag_reorder_blocks = 0;
-}
-
-
 /* Initialize TMP_REG_RTX and ZERO_REG_RTX */
 void
 avr_init_once ()
index a405cac8c7c3139ea1ad774c231f036ba7961739..274d42700f944f00524897bae4fca7f51c33e966 100644 (file)
@@ -132,9 +132,6 @@ extern int avr_asm_only_p;
    Don't use this macro to turn on various extra optimizations for
    `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
 
-#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
-   avr_optimization_options (LEVEL, SIZE)
-
 #define CAN_DEBUG_WITHOUT_FP
 /* Define this macro if debugging can be performed even without a
    frame pointer.  If this macro is defined, GNU CC will turn on the
index 515f92ca3249c69243e625c9a83aec809b136e9f..1c85ca592a9ee7c7db62b1128700909b9ebaa39a 100644 (file)
@@ -288,21 +288,6 @@ m68hc11_override_options ()
 }
 
 
-int
-m68hc11_optimization_options (level, size)
-     int level ATTRIBUTE_UNUSED;
-     int size;
-{
-  /* When optimizing for size, do not reorder basic blocks because
-     it duplicates some insns for speed and this results in larder code.
-     This reordering can still be enabled but explicitly.  */
-  if (size)
-    {
-      flag_reorder_blocks = 0;
-    }
-  return 0;
-}
-
 void
 m68hc11_conditional_register_usage ()
 {
index aec92b781ff61df23c31536738cb321dadefd223..5a9fc529c64250d9740d0ebac336ea2a062841a3 100644 (file)
@@ -214,10 +214,6 @@ extern const char *m68hc11_soft_reg_count;
 
 #define OVERRIDE_OPTIONS       m68hc11_override_options ();
 
-/* Define this to change the optimizations performed by default.  */
-#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
-m68hc11_optimization_options(LEVEL, SIZE)
-
 \f
 /* Define cost parameters for a given processor variant.  */
 struct processor_costs {
index 9fe5cade312eee39eb0054382c9e27c84de4fa4e..25d3cd2b4000d41a97dc15b661a28b8ca87f4987 100644 (file)
@@ -4813,6 +4813,15 @@ parse_options_and_default_flags (argc, argv)
       align_jumps = 1;
       align_labels = 1;
       align_functions = 1;
+
+      /* Don't reorder blocks when optimizing for size because extra
+        jump insns may be created; also barrier may create extra padding.
+
+        More correctly we should have a block reordering mode that tried
+        to minimize the combined size of all the jumps.  This would more
+        or less automatically remove extra jumps, but would also try to
+        use more short jumps instead of long jumps.  */
+      flag_reorder_blocks = 0;
     }
 
   /* Initialize whether `char' is signed.  */