This is the mail archive of the java-patches@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: Disable sibcalls for all targets



On Monday, May 19, 2003, at 11:21 US/Eastern, Andrew Haley wrote:


It seems that tail call optimization can break Java.  Such
optimizations didn't used to matter, since all that happened was that
we'd get an inaccurate backtrace.  Nowadays, we use that backtrace to
find the class loader of a caller, and sibcalls breaks that.

Another fix might allow sibcalls when calling a method that we know
will be loaded by the same class loader.  However, accurate debugging
backtraces are very useful, and Java users expect them.  Comments
welcome...

Andrew.

sibcall optimization usually speeds up many programs and makes them smaller (in fact on ppc, if there
is only one call at the end, it does not have to save the link register at all,
so it can speed up considerably on the 750/7400/7500 series because they mflr
and mtlr and serializing instructions because lr is not renamed).


In fact I think Java is faulty if depends on what is in the backtrace but that is a different argument.

Thanks,
Andrew Pinski


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