diff options
author | ciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-28 20:49:36 +0000 |
---|---|---|
committer | ciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-28 20:49:36 +0000 |
commit | 3d160bfabfd1fede44ca0adc97c0811931d8b268 (patch) | |
tree | 6f5bac02b790f4a91494f2b7dbca54ba429177fa /gcc | |
parent | 9a26b86fda84a56f2b05134b88723118da7a2cc9 (diff) | |
download | gcc-3d160bfabfd1fede44ca0adc97c0811931d8b268.tar.gz |
* config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define.
* config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options):
Declare.
* config/m68hc11/m68hc11.c (m68hc11_optimization_options): New,
do not reorder basic blocks at the end when optimizing for size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.c | 15 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.h | 6 |
4 files changed, 30 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f38b0f8c5a..1f8fbd58ec7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,14 @@ 2002-06-28 Stephane Carrez <stcarrez@nerim.fr> + * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define. + * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options): + Declare. + * config/m68hc11/m68hc11.c (m68hc11_optimization_options): New, + do not reorder basic blocks at the end when optimizing for size. + +2002-06-28 Stephane Carrez <stcarrez@nerim.fr> + * config/m68hc11/m68hc11.c (autoinc_mode): New function. (m68hc11_make_autoinc_notes): New function. (m68hc11_split_move): Be very cautious when spliting a move with diff --git a/gcc/config/m68hc11/m68hc11-protos.h b/gcc/config/m68hc11/m68hc11-protos.h index ee5bd6a7844..20bc83e152e 100644 --- a/gcc/config/m68hc11/m68hc11-protos.h +++ b/gcc/config/m68hc11/m68hc11-protos.h @@ -1,6 +1,6 @@ /* Prototypes for exported functions defined in m68hc11.c Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Stephane Carrez (stcarrez@worldnet.fr) + Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. @@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */ extern int m68hc11_override_options PARAMS((void)); +extern int m68hc11_optimization_options PARAMS((int,int)); extern void m68hc11_conditional_register_usage PARAMS((void)); extern int hard_regno_mode_ok PARAMS((int, enum machine_mode)); diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 4fb054d348e..be7b24b084a 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -288,6 +288,21 @@ 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 42950e79c3c..467862f3655 100644 --- a/gcc/config/m68hc11/m68hc11.h +++ b/gcc/config/m68hc11/m68hc11.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler. Motorola 68HC11 and 68HC12. Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - Contributed by Stephane Carrez (stcarrez@worldnet.fr) + Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of GNU CC. @@ -214,6 +214,10 @@ 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 { |