This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
cross-module inlining (was Re: using gcj for a different language- is it possible?)
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 8 Feb 2004 23:18:37 -0500 (EST)
- Subject: cross-module inlining (was Re: using gcj for a different language- is it possible?)
On 8 Jan 2004, Tom Tromey wrote:
> Offhand I don't remember what sort of inlining we can do. We're sort
> of moving away from doing inlining by default, since that breaks
> binary compatibility. But, yes, if the user asks for it, gcj will
> inline methods, hopefully even across class boundaries.
I've been thinking a little about this since it can restrict inlining,
escape analysis, and any other sort of useful IPA gcj might perform.
C/C++ have a related problem that public functions cannot normally be
inlined into library code because they may be overriden by the dynamic
linker at runtime. This inlining is controlled by the binds_local_p
target hook. The default hook checks flag_pic to determine if it is
compiling a shared library or not.
Similarly in Java, why not leave the most aggressive optimizations for the
main executable (non-PIC) and stick to conservative binary-compatible
optimizations for libraries? Does binary compatibility really matter for
non-library code?
If not, maybe there is no need for a special flag.
Jeff