This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Disable RTL inlininer for Java?

The RTL inliner seems to be the cause of several crashes and 
miscompilations of Java code. In the past I've noticed a few EH-related 
gcj crashes that went away with -fno-inline, but more disturbing is PR6820:

The evaluation order for the arguments is apparantly disregarded when 
the call is inlined.

In addition, the inliner has never really worked very well anyway - only 
private/final/static methods that preceded the call in a class got 
inlined, and methods from other classes never get inlined, afaik.

Turning the inlining off does not significantly affect GCJ's score on 
scimark or jBYTEmark and it makes about 200k smaller. Note 
that this doesn't turn off the inlining of "java builtins" such as 
Math.cos() which is done in java/builtins.

It is unlikely that any bugs in the old inliner will be fixed since it 
is no longer used by C and C++. So, I propose to disable inlining in GCJ 
until we make it use the tree inliner.


2002-05-30  Bryce McKinlay  <>

	* lang.c (java_init_options): Turn off inlining.

Index: lang.c
RCS file: /cvs/gcc/gcc/gcc/java/lang.c,v
retrieving revision 1.101
diff -u -r1.101 lang.c
--- lang.c	25 Apr 2002 06:24:40 -0000	1.101
+++ lang.c	30 May 2002 06:38:16 -0000
@@ -769,4 +769,8 @@
   /* In Java floating point operations never trap.  */
   flag_trapping_math = 0;
+  /* Turn off RTL inliner.  */
+  flag_no_inline = 1;
+  flag_inline_functions = 0;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]