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: values types for Java


Adam Megacz writes:
 > 
 > >  > >  > 1. They use interprocedural analysis, which is not compatible with
 > >  > >  >    separate compilation.
 > 
 > > > > gcj -c Main.java
 > > > > gcj -c Foo.java
 > 
 > > You're doing it wrong.
 > > gcj -c Main.java Foo.java -o bar.o
 > 
 > This distinction is what I was referring to when I wrote "separate
 > compilation".

I said:

 > > Why is that a problem?  You want intraprocedural optimzation, you
 > > compile the files together.

 > I guess if you're going to recompile the entire JDK every time you
 > change one line in your app, then this would work.

What for?  You don't need to recompile the JDK to get the benefit of
escape analysis for your application.  When you don't know if a
variable escapes you have to act conservatively, as the paper
describes.  So, if you invoke System.out.println(foo) you might have
to assume that foo escapes, even though it doesn't.

But of course there's no reason why we shouldn't save escape analysis
data when we build libgcj, as we do precompiled headers for C.

Andrew.


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