This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: does gcj do inlining when generating bytecodes?
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 12:17:53 +1300
- Subject: Re: does gcj do inlining when generating bytecodes?
- References: <867krlsqba.fsf@megacz.com>
Adam Megacz wrote:
>I asked earlier if .java -> .o would inline, and the answer was
>yes.
>
The answer is yes, sometimes. It has a bug that causes it to not do so
when the method being inlined appears after the method doing the call.
This will be fixed when we implement tree inlining.
>Will GCJ inline small final/private methods within a single class
>when compiling .java -> .class?
>
No.
>If so, that makes it the only remaining compiler that does
>this... jikes won't even try, and javac >= 1.1 won't either (-O is
>ignored starting with JDK1.2).
>
The reason for this is that you can do a much better job of inlining and
optimization during JIT compilation than you can at the bytecode level.
Inlining bytecode just makes it bigger and debugging harder, and causes
issues with respect to the binary compatibility rules.
regards
Bryce.