From de273d3f1c1843fc93aeed17015062ddccdc6bc7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 1 Aug 2002 16:53:58 -0700 Subject: [PATCH] toplev.c (parse_options_and_default_flags): Don't set flag_reorder_blocks for -Os. * 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 | 10 ++++++++++ gcc/config/avr/avr.c | 10 ---------- gcc/config/avr/avr.h | 3 --- gcc/config/m68hc11/m68hc11.c | 15 --------------- gcc/config/m68hc11/m68hc11.h | 4 ---- gcc/toplev.c | 9 +++++++++ 6 files changed, 19 insertions(+), 32 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22f4ba17a4e..70a5c6b8661 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2002-08-01 Richard Henderson + + * 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 Richard Henderson diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index e55c33ce7b9..a8f9bda5df6 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -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 () diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index a405cac8c7c..274d42700f9 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -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 diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 515f92ca324..1c85ca592a9 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -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 () { diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h index aec92b781ff..5a9fc529c64 100644 --- a/gcc/config/m68hc11/m68hc11.h +++ b/gcc/config/m68hc11/m68hc11.h @@ -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) - /* Define cost parameters for a given processor variant. */ struct processor_costs { diff --git a/gcc/toplev.c b/gcc/toplev.c index 9fe5cade312..25d3cd2b400 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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. */