]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
m68hc11.h (OPTIMIZATION_OPTIONS): Define.
authorStephane Carrez <stcarrez@nerim.fr>
Fri, 28 Jun 2002 20:55:10 +0000 (22:55 +0200)
committerStephane Carrez <ciceron@gcc.gnu.org>
Fri, 28 Jun 2002 20:55:10 +0000 (22:55 +0200)
* 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.

From-SVN: r55080

gcc/ChangeLog
gcc/config/m68hc11/m68hc11-protos.h
gcc/config/m68hc11/m68hc11.c
gcc/config/m68hc11/m68hc11.h

index a086326d7ccf97f7265e8b1b24452ea5c884ee5e..d44083de90f9e95c53f93c5d6b1a9870cd590ef5 100644 (file)
@@ -1,3 +1,11 @@
+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.
index 7e1bee35f38f9bd41a9ca2f05ae10d5ccfda321d..a9b984f127a0481ab61432c6f163487f95028f22 100644 (file)
@@ -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));
 
index 1094aa74872b01ed6d02dabcf9812a1acbb93628..87cc7c40e38ebb2bfaed2a63da85177c7f542004 100644 (file)
@@ -286,6 +286,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 ()
 {
index e40e115d609a65af6af3c0fce3501888ce3676d8..b50c1f828d1a5a9506df9ff7944c3441432c29bd 100644 (file)
@@ -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)
+
 \f
 /* Define cost parameters for a given processor variant.  */
 struct processor_costs {