This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: inlining across .java files?
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Adam Megacz <gcj at lists dot megacz dot com>, <java at gcc dot gnu dot org>
- Date: Mon, 14 Oct 2002 16:00:02 -0400 (EDT)
- Subject: Re: inlining across .java files?
On Fri, 11 Oct 2002, Andrew Haley wrote:
> Adam Megacz writes:
> >
> > If I compile multiple .java files as one "compilation unit" (one
> > invocation of gcj), will gcj inline *across* files? If not, is there
> > any way I can get it to do this?
>
> It could be made to, but we don't yet support it.
I tried this. It doesn't quite work yet. For one thing,
soft_initclass_node doesn't get inlined on static methods, since it isn't
in the method's tree representation. Instead, it is expanded directly
into RTL by complete_start_java_method. Ditto for synchronization.
Although I observed a ~10% speedup by inlining an entire application, it
isn't clear how much of that was actually due to inlining vs. dropping the
class initialization.
Jeff