This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: does gcj do inlining when generating bytecodes?


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.



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