does gcj do inlining when generating bytecodes?
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Mon Dec 17 15:16:00 GMT 2001
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.
More information about the Java
mailing list