Disable sibcalls for all targets
Andrew Pinski
pinskia@physics.uc.edu
Mon May 19 15:28:00 GMT 2003
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
More information about the Java-patches
mailing list