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: status of inter-class inlining in Java?


Am Freitag, 16. Juli 2004 10:08 schrieb Nathanael Nerode:
> Consider the following sort of potential situation in libgcj:
>
> class System {
>   public static final foo() {
>     B.foo();
>   }
> }
>
> class VMSystem {
>   static final foo() {
>     ...
>   }
> }
>
> Preferably VMSystem.foo should be inlined into System.foo during
> compilation. (This would make it reasonable to merge a bunch more
> with Classpath, and would more generally help with the indirection
> penalty caused by the rampant forwarding methods used in much of
> Java.)
>
> From what I can tell, however, this doesn't seem to happen.  I
> suppose this is because the VMSystem class might theoretically
> change after compilation of the System class; the two are compiled
> separately.
>
> Is it reasonable to consider using -combine to build parts of the
> libraries with intermodule optimization?  Would this work?  Is
> there an analogue when building the .class files?
>
> (It would clearly be impossible, memory-wise, to compile the whole
> library at once. But significant gains could still be had, most
> likely, by compiling collections of particularly interwined classes
> this way.)
>
> So is this worth looking into?

I think with the new BC-ABI this will be much much simpler. Currently 
its very difficult.


Michael


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