Patch: trivial optimizations

Alexandre Petit-Bianco apbianco@cygnus.com
Sun Apr 9 10:35:00 GMT 2000


Jeff Sturm writes:

> In theory, making VectorEnumeration and/or hasMoreElements final would
> be sufficient to inline the call.  But inlining never really worked in
> gcj, I don't think... Alexandre submitted a patch to calls.c as a
> special case for gcj, and I don't think it was accepted:

Oh, I don't believe that was actually a submission.

> http://gcc.gnu.org/ml/gcc-patches/1999-11n/msg00628.html

> Even with this patch, gcj inlining only works in special cases.  The
> inlined method must be defined before it is used, and must be in the
> same source file.

I was planning on fixing that, especially in the case of methods
defined in the class for which code is being generated. Having
inlining working for methods defined somewhere else would require some
tweaks -- but we're very close from that; we're just not doing it now.

> There are other problems with integrate.c.  I think tree-based
> inlining (ala g++) would be better for gcj.

Especially since we're ready for it (methods are wholly represented as
trees.)

./A


More information about the Java-patches mailing list