]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Don't use RTL inlining. Fix for PR java/6820.
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>
Tue, 11 Jun 2002 06:20:12 +0000 (06:20 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 11 Jun 2002 06:20:12 +0000 (07:20 +0100)
* lang.c (LANG_HOOKS_POST_OPTIONS): Define.
(flag_really_inline): New.
(java_decode_option): Set flag_really_inline if -finline-functions
is seen.
(java_post_options): New function. Turn off inlining unless
flag_really_inline is set.

From-SVN: r54487

gcc/java/ChangeLog
gcc/java/lang.c

index 6f4a6dca1eb9103fe1952affe0826d22edc3094c..5b8edc088fdb431b403ad65a091302f1ae42ecdd 100644 (file)
@@ -1,3 +1,13 @@
+2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
+
+       Don't use RTL inlining. Fix for PR java/6820.
+       * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
+       (flag_really_inline): New.
+       (java_decode_option): Set flag_really_inline if -finline-functions
+       is seen.
+       (java_post_options): New function. Turn off inlining unless
+       flag_really_inline is set.
+
 2002-06-08  H.J. Lu  (hjl@gnu.org)
 
        * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
index 64059368987a01e209176e47fbe060723d71cd6c..99c4547bdc61906eadc08ce360007941affb1bea 100644 (file)
@@ -51,6 +51,8 @@ struct string_option
 static const char *java_init PARAMS ((const char *));
 static void java_finish PARAMS ((void));
 static void java_init_options PARAMS ((void));
+static void java_post_options PARAMS ((void));
+
 static int java_decode_option PARAMS ((int, char **));
 static void put_decl_string PARAMS ((const char *, int));
 static void put_decl_node PARAMS ((tree));
@@ -163,6 +165,10 @@ int flag_store_check = 1;
 /* When non zero, print extra version information.  */
 static int version_flag = 0;
 
+/* Set non-zero if the user specified -finline-functions on the command 
+   line.  */
+int flag_really_inline = 0;
+
 /* Table of language-dependent -f options.
    STRING is the option name.  VARIABLE is the address of the variable.
    ON_VALUE is the value to store in VARIABLE
@@ -216,6 +222,8 @@ static int dependency_tracking = 0;
 #define LANG_HOOKS_INIT_OPTIONS java_init_options
 #undef LANG_HOOKS_DECODE_OPTION
 #define LANG_HOOKS_DECODE_OPTION java_decode_option
+#undef LANG_HOOKS_POST_OPTIONS
+#define LANG_HOOKS_POST_OPTIONS java_post_options
 #undef LANG_HOOKS_SET_YYDEBUG
 #define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
 
@@ -353,6 +361,14 @@ java_decode_option (argc, argv)
       return 1;
     }
 #undef ARG
+#define ARG "-finline-functions"
+  if (strncmp (p, ARG, sizeof (ARG) - 1) == 0)
+    {
+      flag_inline_functions = 1;
+      flag_really_inline = 1;
+      return 1;
+    }
+#undef ARG
 
   if (p[0] == '-' && p[1] == 'f')
     {
@@ -762,3 +778,15 @@ java_init_options ()
   flag_exceptions = 1;
   flag_non_call_exceptions = 1;
 }
+
+/* Post-switch processing.  */
+static void
+java_post_options ()
+{
+  /* Turn off RTL inliner unless -finline-functions was really specified.  */
+  if (flag_really_inline == 0)
+    {
+      flag_no_inline = 1;
+      flag_inline_functions = 0;
+    }
+}